diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8586b10..8ab0a70 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,13 +19,28 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set safe.directory + run: | + git config --global --add safe.directory /__w/nkv/nkv + + - name: Build run: cargo build --verbose - name: Run tests run: cargo test --verbose - - name: Run benchmarks - run: cargo bench + - name: Checkout main branch and run benchmarks + run: | + git checkout main + cargo bench + + - name: Checkout PR branch and run benchmarks + run: | + git checkout ${{ github.event.pull_request.head.ref }} + cargo bench - name: Upload benchmark results uses: actions/upload-artifact@v3