From 89d9dc557c846886cb5023d3f9a59cba3fa7b998 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 23 Oct 2021 11:01:21 +0200 Subject: [PATCH] Add benchmark to build action Signed-off-by: trivernis --- .github/workflows/bench.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/bench.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 00000000..c3311d82 --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,37 @@ +name: Run the benchmarks of the crate + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache build data + uses: actions/cache@v2 + with: + path: | + target + ~/.cargo/ + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Run benchmark + run: cargo bench + + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: benchmark-results + path: tartet/criterion/ \ No newline at end of file