diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 9b79ad7..c512e0a 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -11,34 +11,28 @@ on: required: true default: true +permissions: + contents: write + deployments: write + jobs: benchmark: name: Run Rust benchmark runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.build }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.9 - - uses: actions-rs/toolchain@v1 + python-version: 3.11 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly - profile: minimal - override: true - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ~/.cache/pip - target - key: ubuntu-latest-cargo-${{ hashFiles('**/Cargo.lock') }} - run: pip install -r bench-requirements.txt - name: Run benchmark run: cargo +nightly bench --bench comparison | tee output.txt - name: Store benchmark result - uses: rhysd/github-action-benchmark@v1 + uses: benchmark-action/github-action-benchmark@v1 with: name: Rust Benchmark tool: 'cargo' @@ -47,4 +41,4 @@ jobs: benchmark-data-dir-path: docs/bench output-file-path: output.txt auto-push: true - github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }}