Skip to content

Commit

Permalink
ci(benchmark): fix linter benchmark triggering on unrelated files (#6840
Browse files Browse the repository at this point in the history
)

fixes #6824
  • Loading branch information
Boshen authored Oct 24, 2024
1 parent 63ce9be commit fb01208
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ jobs:
name: Build Linter Benchmark
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
any_changed: ${{ steps.filter.outputs.any_changed }}
steps:
- name: Checkout Branch
uses: taiki-e/checkout-action@v1

- uses: dorny/paths-filter@v3
- uses: tj-actions/changed-files@v45
id: filter
with:
filters: |
files_yaml: |
src:
- '!crates/oxc_isolated_declarations/**'
- '!crates/oxc_minifier/**'
Expand All @@ -144,13 +144,13 @@ jobs:
- '!crates/oxc/**'
- uses: Boshen/setup-rust@main
if: steps.filter.outputs.src == 'true'
if: steps.filter.outputs.any_changed == 'true'
with:
cache-key: benchmark-linter
save-cache: ${{ github.ref_name == 'main' }}

- name: Build benchmark
if: steps.filter.outputs.src == 'true'
if: steps.filter.outputs.any_changed== 'true'
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
run: |
Expand All @@ -161,7 +161,7 @@ jobs:
rm target/codspeed/oxc_benchmark/*.d
- name: Upload Binary
if: steps.filter.outputs.src == 'true'
if: steps.filter.outputs.any_changed== 'true'
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
Expand All @@ -174,7 +174,7 @@ jobs:
name: Benchmark linter
needs: build-linter
runs-on: ubuntu-latest
if: needs.build-linter.outputs.src == 'true'
if: needs.build-linter.outputs.any_changed == 'true'
strategy:
fail-fast: true
matrix:
Expand Down

0 comments on commit fb01208

Please sign in to comment.