Skip to content

[WIP] Add CI benchmarking #7

[WIP] Add CI benchmarking

[WIP] Add CI benchmarking #7

Workflow file for this run

name: checks
permissions:
contents: read
on:
push:
merge_group:
branches:
- main
jobs:
bench:
name: Benchmark
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- rust: stable
os: [benchmark, X64]
target: "x86_64-unknown-linux-gnu"
# - rust: "stable"
# os: macos-latest
# target: "x86_64-apple-darwin"
# - rust: "stable"
# os: macos-14
# target: "aarch64-apple-darwin"
# - rust: stable-x86_64-gnu
# os: windows-2022
# target: "x86_64-pc-windows-gnu"
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
persist-credentials: false
- name: cargo build
run: |
. "$HOME/.cargo/env"
cargo build --target ${{matrix.target}} -p test-libz-rs-sys --release --examples
cd benchmarker && cargo build --release
- name: Benchmark
run: |
benchmarker/target/release/benchmarker "target/${{matrix.target}}/release/examples/blogpost-compress 9 rs silesia-small.tar" "target/${{matrix.target}}/release/examples/blogpost-compress 9 ng silesia-small.tar" > bench_results.json
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: bench_results.json