Skip to content

Commit

Permalink
CI Benchs: SCCache bin is cached
Browse files Browse the repository at this point in the history
  • Loading branch information
fmiguelgarcia committed Oct 24, 2023
1 parent 8c80d44 commit 632d8f9
Showing 1 changed file with 67 additions and 5 deletions.
72 changes: 67 additions & 5 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:

- uses: actions/cache@v3
with:
path: ~/.cache/
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-cache-bin-${{ env.CARGO_SCCACHE_COMMIT }}-v1

- name: Install system dependencies
Expand Down Expand Up @@ -115,7 +117,59 @@ jobs:
- name: Display SCCache Stats
run: sccache --show-stats

check_features:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2

- uses: actions/restore@v3
with:
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-cache-bin-${{ env.CARGO_SCCACHE_COMMIT }}-v1

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev valgrind git clang curl libssl-dev protobuf-compiler unzip python3-pip
# With rustup's nice new toml format, we just need to run rustup show to install the toolchain
# https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659
- name: Setup Rust toolchain
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup default ${{ env.BUILD_TOOLCHAIN }}
rustup target add wasm32-unknown-unknown --toolchain ${{ env.BUILD_TOOLCHAIN }}
- name: Set PATH for cargo
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "SCCACHE_DIR=${HOME}/.cache/sccache" >> $GITHUB_ENV
- name: SCCache
run: |
# We altered the path to avoid old actions to overwrite it
if [ ! -f ~/.cargo/bin/sccache ]; then
cargo install sccache \
--git https://github.com/purestake/sccache.git \
--rev $CARGO_SCCACHE_COMMIT \
--force --no-default-features --features=dist-client
fi
ls -la ~/.cargo/bin/
if [[ -z `pgrep sccache` ]]; then
chmod +x ~/.cargo/bin/sccache
sccache --start-server
fi
sccache -s
echo "RUSTC_WRAPPER=${HOME}/.cargo/bin/sccache" >> $GITHUB_ENV
- name: Check other features
env:
SKIP_WASM_BUILD: true
run: cargo check --release --workspace --features "runtime-benchmarks try-runtime" -p data-avail

benchmarks_iai:
Expand All @@ -129,7 +183,9 @@ jobs:

- uses: actions/cache@v3
with:
path: ~/.cache/
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-cache-iai-${{ env.CARGO_SCCACHE_COMMIT }}-v1

- name: Install system dependencies
Expand Down Expand Up @@ -215,7 +271,9 @@ jobs:

- uses: actions/cache@v3
with:
path: ~/.cache/
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-cache-cri-${{ env.CARGO_SCCACHE_COMMIT }}-v1

- name: Install system dependencies
Expand Down Expand Up @@ -300,7 +358,9 @@ jobs:

- uses: actions/cache@v3
with:
path: ~/.cache/
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-cache-ut-${{ env.CARGO_SCCACHE_COMMIT }}-v1

- name: Install system dependencies
Expand Down Expand Up @@ -375,7 +435,9 @@ jobs:

- uses: actions/cache@v3
with:
path: ~/.cache/
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-cache-bin-${{ env.CARGO_SCCACHE_COMMIT }}-v1

- name: Install system dependencies
Expand Down

2 comments on commit 632d8f9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 632d8f9 Previous: 8c80d44 Ratio
commitment_builder/32 4239305043 ns/iter (± 103025063) 4116085492 ns/iter (± 16888173) 1.03
commitment_builder/64 4146927392 ns/iter (± 96859072) 4068154998 ns/iter (± 54410585) 1.02
commitment_builder/128 4527921057 ns/iter (± 59996064) 4456239012 ns/iter (± 48333464) 1.02
commitment_builder/256 2205138657 ns/iter (± 36843535) 2188670549 ns/iter (± 46617824) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 632d8f9 Previous: 8c80d44 Ratio
commitment_builder_32 Instructions 42920265841 ops (± 0) 42920082536 ops (± 0) 1.00
commitment_builder_32 L1 Accesses 52858711440 ops (± 0) 52858462562 ops (± 0) 1.00
commitment_builder_32 L2 Accesses 430583 ops (± 0) 414150 ops (± 0) 1.04
commitment_builder_32 RAM Accesses 101017 ops (± 0) 99727 ops (± 0) 1.01
commitment_builder_32 Estimated Cycles 52864399950 ops (± 0) 52864023757 ops (± 0) 1.00
commitment_builder_64 Instructions 41390334795 ops (± 0) 41390348385 ops (± 0) 1.00
commitment_builder_64 L1 Accesses 50751723761 ops (± 0) 50751743316 ops (± 0) 1.00
commitment_builder_64 L2 Accesses 555435 ops (± 0) 556638 ops (± 0) 1.00
commitment_builder_64 RAM Accesses 199375 ops (± 0) 198779 ops (± 0) 1.00
commitment_builder_64 Estimated Cycles 50761479061 ops (± 0) 50761483771 ops (± 0) 1.00
commitment_builder_128 Instructions 53619537848 ops (± 0) 53619787330 ops (± 0) 1.00
commitment_builder_128 L1 Accesses 67644600246 ops (± 0) 67644958812 ops (± 0) 1.00
commitment_builder_128 L2 Accesses 1015589 ops (± 0) 1024101 ops (± 0) 0.99
commitment_builder_128 RAM Accesses 269618 ops (± 0) 268066 ops (± 0) 1.01
commitment_builder_128 Estimated Cycles 67659114821 ops (± 0) 67659461627 ops (± 0) 1.00
commitment_builder_256 Instructions 31178642102 ops (± 0) 31178759583 ops (± 0) 1.00
commitment_builder_256 L1 Accesses 40169352892 ops (± 0) 40169526784 ops (± 0) 1.00
commitment_builder_256 L2 Accesses 6485426 ops (± 0) 6484130 ops (± 0) 1.00
commitment_builder_256 RAM Accesses 268224 ops (± 0) 268339 ops (± 0) 1.00
commitment_builder_256 Estimated Cycles 40211167862 ops (± 0) 40211339299 ops (± 0) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.