Skip to content

Commit

Permalink
[WIP] Add CI benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Dec 17, 2024
1 parent f90e45c commit 014cd78
Show file tree
Hide file tree
Showing 4 changed files with 631 additions and 394 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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: |
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
Loading

0 comments on commit 014cd78

Please sign in to comment.