Skip to content

Commit

Permalink
Uniform indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Nov 21, 2022
1 parent f7972c9 commit b2e23de
Showing 1 changed file with 182 additions and 182 deletions.
364 changes: 182 additions & 182 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,50 +464,50 @@ jobs:
needs: [check]

steps:
- uses: actions/checkout@v2
- name: Load nightly Rust toolchain for WASM.
run: |
rustup install nightly-2022-04-05
rustup target add wasm32-unknown-unknown --toolchain nightly-2022-04-05
rustup target add wasm32-unknown-emscripten --toolchain nightly-2022-04-05
rustup component add rust-src --toolchain nightly-2022-04-05
- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-make-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/install@v0.1.2
with:
crate: cargo-make
version: latest
- name: Install emsdk
run: |
cd ~
git clone https://github.com/emscripten-core/emsdk.git --branch 2.0.27
cd emsdk
./emsdk install latest
./emsdk activate latest
- name: Install Node.js v16.18.0
uses: actions/setup-node@v3
with:
node-version: 16.18.0
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run emscripten test
run: |
. ~/emsdk/emsdk_env.sh
cargo make ci-job-wasm
- uses: actions/checkout@v2
- name: Load nightly Rust toolchain for WASM.
run: |
rustup install nightly-2022-04-05
rustup target add wasm32-unknown-unknown --toolchain nightly-2022-04-05
rustup target add wasm32-unknown-emscripten --toolchain nightly-2022-04-05
rustup component add rust-src --toolchain nightly-2022-04-05
- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-make-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/install@v0.1.2
with:
crate: cargo-make
version: latest
- name: Install emsdk
run: |
cd ~
git clone https://github.com/emscripten-core/emsdk.git --branch 2.0.27
cd emsdk
./emsdk install latest
./emsdk activate latest
- name: Install Node.js v16.18.0
uses: actions/setup-node@v3
with:
node-version: 16.18.0
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run emscripten test
run: |
. ~/emsdk/emsdk_env.sh
cargo make ci-job-wasm
# Fmt job - runs cargo fmt
fmt:
Expand Down Expand Up @@ -654,73 +654,73 @@ jobs:
needs: [check]

steps:
- uses: actions/checkout@v2

- name: Load the default Rust toolchain via the rust-toolchain file.
run: rustup show

- name: Create output dir
run: mkdir -p ./benchmarks/perf/${{ matrix.component }}

# Benchmarking & dashboards job > Run benchmark.

- name: Run benchmark
run: |
pushd $PWD && cd ${{ matrix.component }};
export REL_OUTPUT_PATH="`dirs +1`/benchmarks/perf/${{ matrix.component }}";
mkdir -p $REL_OUTPUT_PATH;
export OUTPUT_PATH_CMD="ls -d $REL_OUTPUT_PATH";
export OUTPUT_PATH=$(echo $OUTPUT_PATH_CMD | sh);
cargo bench --features bench -- --output-format bencher | tee $OUTPUT_PATH/output.txt;
popd
# In the following step(s) regarding converting benchmark output to dashboards, the branch in `gh-pages-branch` needs to exist.
# If it doesn't already exist, it should be created by someone with push permissions, like so:
# # Create a local branch
# $ git checkout --orphan <newbranch>
# $ git commit --allow-empty -m "root commit"
# # Push it to create a remote branch
# $ git push origin <newbranch>:<newbranch>

# Benchmarking & dashboards job > (unmerged PR only) Convert benchmark output into dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (unmerged PR only)
# any action that is not a merge to main implies unfinished PR
if: github.event_name != 'push' || github.ref != 'refs/heads/main'
uses: rhysd/github-action-benchmark@v1.8.1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: ./benchmarks/perf/${{ matrix.component }}/output.txt
benchmark-data-dir-path: ./benchmarks/perf/${{ matrix.component }}
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%' # If for nothing else, enabling the possibility of alerts with meaningful thresholds requires this job to be done per-component
fail-on-alert: true
gh-pages-branch: unmerged-pr-bench-data # Requires one-time-only creation of this branch on remote repo.
auto-push: false # Do not store historical benchmark info of unfinished PRs. Commits seem to get made anyways, so make sure
# that the branch in `gh-pages-branch` is different from the branch used for merges to main branch.
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true

# Benchmarking & dashboards job > (PR merge to main only) Convert benchmark output into dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (merge to main only)
# only merges to main (implies PR is finished and approved by this point)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
uses: rhysd/github-action-benchmark@v1.8.1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: ./benchmarks/perf/${{ matrix.component }}/output.txt
benchmark-data-dir-path: ./benchmarks/perf/${{ matrix.component }}
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%' # If for nothing else, enabling the possibility of alerts with meaningful thresholds requires this job to be done per-component
fail-on-alert: true
gh-pages-branch: merged-bench-data # Requires one-time-only creation of this branch on remote repo.
auto-push: true # Use the branch at `gh-pages-branch` to store historical info of benchmark data.
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-comment-cc-users: '@sffc,@zbraniecki,@echeran'
- uses: actions/checkout@v2

- name: Load the default Rust toolchain via the rust-toolchain file.
run: rustup show

- name: Create output dir
run: mkdir -p ./benchmarks/perf/${{ matrix.component }}

# Benchmarking & dashboards job > Run benchmark.

- name: Run benchmark
run: |
pushd $PWD && cd ${{ matrix.component }};
export REL_OUTPUT_PATH="`dirs +1`/benchmarks/perf/${{ matrix.component }}";
mkdir -p $REL_OUTPUT_PATH;
export OUTPUT_PATH_CMD="ls -d $REL_OUTPUT_PATH";
export OUTPUT_PATH=$(echo $OUTPUT_PATH_CMD | sh);
cargo bench --features bench -- --output-format bencher | tee $OUTPUT_PATH/output.txt;
popd
# In the following step(s) regarding converting benchmark output to dashboards, the branch in `gh-pages-branch` needs to exist.
# If it doesn't already exist, it should be created by someone with push permissions, like so:
# # Create a local branch
# $ git checkout --orphan <newbranch>
# $ git commit --allow-empty -m "root commit"
# # Push it to create a remote branch
# $ git push origin <newbranch>:<newbranch>

# Benchmarking & dashboards job > (unmerged PR only) Convert benchmark output into dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (unmerged PR only)
# any action that is not a merge to main implies unfinished PR
if: github.event_name != 'push' || github.ref != 'refs/heads/main'
uses: rhysd/github-action-benchmark@v1.8.1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: ./benchmarks/perf/${{ matrix.component }}/output.txt
benchmark-data-dir-path: ./benchmarks/perf/${{ matrix.component }}
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%' # If for nothing else, enabling the possibility of alerts with meaningful thresholds requires this job to be done per-component
fail-on-alert: true
gh-pages-branch: unmerged-pr-bench-data # Requires one-time-only creation of this branch on remote repo.
auto-push: false # Do not store historical benchmark info of unfinished PRs. Commits seem to get made anyways, so make sure
# that the branch in `gh-pages-branch` is different from the branch used for merges to main branch.
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true

# Benchmarking & dashboards job > (PR merge to main only) Convert benchmark output into dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (merge to main only)
# only merges to main (implies PR is finished and approved by this point)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
uses: rhysd/github-action-benchmark@v1.8.1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: ./benchmarks/perf/${{ matrix.component }}/output.txt
benchmark-data-dir-path: ./benchmarks/perf/${{ matrix.component }}
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%' # If for nothing else, enabling the possibility of alerts with meaningful thresholds requires this job to be done per-component
fail-on-alert: true
gh-pages-branch: merged-bench-data # Requires one-time-only creation of this branch on remote repo.
auto-push: true # Use the branch at `gh-pages-branch` to store historical info of benchmark data.
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-comment-cc-users: '@sffc,@zbraniecki,@echeran'

# Run examples with dhat-rs in order to collect memory heap size metrics. These
# metrics will then be charted over time. See tools/benchmark/memory/README.md for
Expand Down Expand Up @@ -773,77 +773,77 @@ jobs:
needs: [check]

steps:
- uses: actions/checkout@v2

# Nightly is only needed for the `--profile bench` line. Once that is stabilized,
# then this line is no longer needed.
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-04-05
override: true

- name: Run the example with dhat-rs to collect memory information
run: |
cargo run --package icu_benchmark_memory -- --os ${{ matrix.os }} ${{ matrix.examples }} --toolchain nightly-2022-04-05
# Benchmarking & dashboards job > (unmerged PR only) Convert benchmark output into
# dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (unmerged PR only)
# any action that is not a merge to main implies unfinished PR
if: github.event_name != 'push' || github.ref != 'refs/heads/main'
# The gregtatum fork of rhysd/github-action-benchmark contains support for ndjson.
# If the PR gets merged, this can be switched back to the main project.
# https://github.com/rhysd/github-action-benchmark/pull/54
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
name: Heap – ${{ matrix.os }}
# The ndjson tool is only supported by the gregtatum fork of github-action-benchmark.
tool: 'ndjson'
benchmark-data-dir-path: ./benchmarks/memory/${{ matrix.os }}
output-file-path: ./benchmarks/memory/${{ matrix.os }}/output.ndjson
# Show alert with commit comment on detecting possible memory regression
alert-threshold: '200%'
fail-on-alert: true
# Requires one-time-only creation of this branch on remote repo. This will
# store the generated information.
gh-pages-branch: unmerged-pr-bench-data

# Do not store historical benchmark info of unfinished PRs. Commits seem to get
# made anyways, so make sure that the branch in `gh-pages-branch` is
# different from the branch used for merges to main branch.
auto-push: false

github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true

# Benchmarking & dashboards job > (PR merge to main only) Convert benchmark output
# into dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (merge to main only)
# only merges to main (implies PR is finished and approved by this point)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
# The gregtatum fork of rhysd/github-action-benchmark contains support for ndjson.
# If the PR gets merged, this can be switched back to the main project.
# https://github.com/rhysd/github-action-benchmark/pull/54
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
name: Heap – ${{ matrix.os }}
# The ndjson tool is only supported by the gregtatum fork of github-action-benchmark.
tool: 'ndjson'
benchmark-data-dir-path: ./benchmarks/memory/${{ matrix.os }}
output-file-path: ./benchmarks/memory/${{ matrix.os }}/output.ndjson
alert-threshold: '200%'
fail-on-alert: true
# The historical run information will be stored in this branch. This is the same
# branch that is being used by the performance benchmark. The information is
# computed by gregtatum/github-action-benchmark, and is added to a .js file in
# the branch, e.g. benchmarks/memory/{os}/data.js
gh-pages-branch: merged-bench-data
auto-push: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-comment-cc-users: '@sffc,@zbraniecki,@echeran'
- uses: actions/checkout@v2

# Nightly is only needed for the `--profile bench` line. Once that is stabilized,
# then this line is no longer needed.
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-04-05
override: true

- name: Run the example with dhat-rs to collect memory information
run: |
cargo run --package icu_benchmark_memory -- --os ${{ matrix.os }} ${{ matrix.examples }} --toolchain nightly-2022-04-05
# Benchmarking & dashboards job > (unmerged PR only) Convert benchmark output into
# dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (unmerged PR only)
# any action that is not a merge to main implies unfinished PR
if: github.event_name != 'push' || github.ref != 'refs/heads/main'
# The gregtatum fork of rhysd/github-action-benchmark contains support for ndjson.
# If the PR gets merged, this can be switched back to the main project.
# https://github.com/rhysd/github-action-benchmark/pull/54
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
name: Heap – ${{ matrix.os }}
# The ndjson tool is only supported by the gregtatum fork of github-action-benchmark.
tool: 'ndjson'
benchmark-data-dir-path: ./benchmarks/memory/${{ matrix.os }}
output-file-path: ./benchmarks/memory/${{ matrix.os }}/output.ndjson
# Show alert with commit comment on detecting possible memory regression
alert-threshold: '200%'
fail-on-alert: true
# Requires one-time-only creation of this branch on remote repo. This will
# store the generated information.
gh-pages-branch: unmerged-pr-bench-data

# Do not store historical benchmark info of unfinished PRs. Commits seem to get
# made anyways, so make sure that the branch in `gh-pages-branch` is
# different from the branch used for merges to main branch.
auto-push: false

github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true

# Benchmarking & dashboards job > (PR merge to main only) Convert benchmark output
# into dashboard HTML in a commit of a branch of the local repo.

- name: Store benchmark result & create dashboard (merge to main only)
# only merges to main (implies PR is finished and approved by this point)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
# The gregtatum fork of rhysd/github-action-benchmark contains support for ndjson.
# If the PR gets merged, this can be switched back to the main project.
# https://github.com/rhysd/github-action-benchmark/pull/54
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
name: Heap – ${{ matrix.os }}
# The ndjson tool is only supported by the gregtatum fork of github-action-benchmark.
tool: 'ndjson'
benchmark-data-dir-path: ./benchmarks/memory/${{ matrix.os }}
output-file-path: ./benchmarks/memory/${{ matrix.os }}/output.ndjson
alert-threshold: '200%'
fail-on-alert: true
# The historical run information will be stored in this branch. This is the same
# branch that is being used by the performance benchmark. The information is
# computed by gregtatum/github-action-benchmark, and is added to a .js file in
# the branch, e.g. benchmarks/memory/{os}/data.js
gh-pages-branch: merged-bench-data
auto-push: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-comment-cc-users: '@sffc,@zbraniecki,@echeran'

# Binary size benchmark: build and size wasm binaries; creates ndjson output data format

Expand Down

0 comments on commit b2e23de

Please sign in to comment.