Skip to content

Commit 27b5bcd

Browse files
committed
containerised
1 parent f84257e commit 27b5bcd

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

.github/workflows/benchmark.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
runs-on: 'oracle-bare-metal-64cpu-512gb-x86-64'
3232
# runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }}
3333
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'performance')) || github.event_name == 'push' }}
34+
container:
35+
image: rust:slim-bullseye
3436
env:
3537
# For PRs, compare against the base branch - e.g., 'main'.
3638
# For pushes to main, compare against the previous commit
@@ -45,22 +47,19 @@ jobs:
4547
with:
4648
fetch-depth: 10 # Fetch current commit and its parent
4749

48-
- name: Run benchmark inside Docker
50+
- name: Setup container environment
4951
run: |
50-
docker run --rm \
51-
-v "$PWD":/workspace \
52-
-w /workspace \
53-
rust:slim-bullseye \
54-
bash -c "
55-
apt-get update && apt-get install --fix-missing -y unzip cmake build-essential pkg-config curl git && \
56-
cargo install cargo-criterion && \
57-
cargo bench && \
58-
echo 'Benchmark run complete inside Docker container'
59-
"
52+
apt-get update && apt-get install --fix-missing -y unzip cmake build-essential pkg-config curl git
53+
cargo install cargo-criterion
54+
55+
- name: Run benchmark
56+
run: |
57+
cargo bench
58+
echo 'Benchmark run complete'
6059
61-
# - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
62-
# with:
63-
# repo-token: ${{ secrets.GITHUB_TOKEN }}
60+
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
61+
with:
62+
repo-token: ${{ secrets.GITHUB_TOKEN }}
6463
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
6564
with:
6665
toolchain: stable

0 commit comments

Comments
 (0)