Skip to content

Commit 80e4a68

Browse files
committed
fix ci
1 parent 8e86882 commit 80e4a68

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/validate-pr-title.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,61 @@ jobs:
2121
uses: amannn/action-semantic-pull-request@v5
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
25+
test-runtime-benchmarks:
26+
name: Test runtime benchmarks
27+
runs-on: ubuntu-latest
28+
env:
29+
# Configured by the Docker image. We can't change this unless the image does it.
30+
CARGO_HOME: /usr/local/cargo
31+
#needs: cargo-clippy
32+
#if: ${{ github.event_name == 'push'}}
33+
34+
strategy:
35+
matrix:
36+
runtime:
37+
- peregrine
38+
- spiritnet
39+
fail-fast: false
40+
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
45+
- name: Free Disk Space
46+
uses: jlumbroso/free-disk-space@main
47+
with:
48+
tool-cache: true
49+
50+
- name: Set up Cargo cache
51+
uses: actions/cache@v4
52+
with:
53+
# These paths are mounted inside the Docker container.
54+
# We cannot mount the `.cargo/bin` folder since the container already contains binaries, and overriding with an empty one breaks compilation.
55+
path: |
56+
~/.cargo/registry/index/
57+
~/.cargo/registry/cache/
58+
~/.cargo/git/db/
59+
key: ${{ github.job }}-${{ github.ref }}-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
60+
61+
- name: Install frame-omni-bencher
62+
run: |
63+
docker run --rm \
64+
-v "${GITHUB_WORKSPACE}:/workspace" \
65+
-v "${HOME}/.cargo/registry/index:${{ env.CARGO_HOME }}/registry/index" \
66+
-v "${HOME}/.cargo/registry/cache:${{ env.CARGO_HOME }}/registry/cache" \
67+
-v "${HOME}/.cargo/git/db:${{ env.CARGO_HOME }}/git/db" \
68+
-w /workspace \
69+
paritytech/ci-unified:bullseye-1.81.0 \
70+
bash -c "cargo install frame-omni-bencher --locked"
71+
72+
- name: Run runtime benchmarks
73+
run: |
74+
docker run --rm \
75+
-v "${GITHUB_WORKSPACE}:/workspace" \
76+
-v "${HOME}/.cargo/registry/index:${{ env.CARGO_HOME }}/registry/index" \
77+
-v "${HOME}/.cargo/registry/cache:${{ env.CARGO_HOME }}/registry/cache" \
78+
-v "${HOME}/.cargo/git/db:${{ env.CARGO_HOME }}/git/db" \
79+
-w /workspace \
80+
paritytech/ci-unified:bullseye-1.81.0 \
81+
bash -c "bash -x scripts/run_benches_for_runtime.sh ${{ matrix.runtime }} dev"

0 commit comments

Comments
 (0)