From 449c72af1e6182dd8cc4c5068c8c1f366e720c93 Mon Sep 17 00:00:00 2001 From: Edgar Date: Tue, 19 Dec 2023 13:11:31 +0100 Subject: [PATCH] bench ci criterion --- .github/workflows/bench-criterion.yml | 38 +++++++++++++++++++++++++++ .github/workflows/bench-hyperfine.yml | 1 + 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/bench-criterion.yml diff --git a/.github/workflows/bench-criterion.yml b/.github/workflows/bench-criterion.yml new file mode 100644 index 000000000..3b4794acc --- /dev/null +++ b/.github/workflows/bench-criterion.yml @@ -0,0 +1,38 @@ +name: Bench + +on: + pull_request: + branches: [main] + merge_group: + types: [checks_requested] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: + bench-hyperfine: + name: Criterion Benches + runs-on: [self-hosted, macOS] + env: + CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse + MLIR_SYS_170_PREFIX: /opt/homebrew/opt/llvm@17 + LLVM_SYS_170_PREFIX: /opt/homebrew/opt/llvm@17 + TABLEGEN_170_PREFIX: /opt/homebrew/opt/llvm@17 + steps: + - uses: actions/checkout@v3 + - name: Rustup toolchain install + uses: dtolnay/rust-toolchain@1.72.1 + with: + components: clippy + - name: Install deps + run: make deps + - uses: boa-dev/criterion-compare-action@v3 + with: + # Needed. The name of the branch to compare with. This default uses the branch which is being pulled against + branchName: ${{ github.base_ref }} + # Optional. Default is `${{ github.token }}`. + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/bench-hyperfine.yml b/.github/workflows/bench-hyperfine.yml index 07bf0183d..33d335292 100644 --- a/.github/workflows/bench-hyperfine.yml +++ b/.github/workflows/bench-hyperfine.yml @@ -20,6 +20,7 @@ jobs: env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse MLIR_SYS_170_PREFIX: /usr/lib/llvm-17/ + LLVM_SYS_170_PREFIX: /usr/lib/llvm-17/ TABLEGEN_170_PREFIX: /usr/lib/llvm-17/ steps: - uses: actions/checkout@v3