diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 5e2784983fe3..c635c7be746c 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -38,8 +38,8 @@ jobs: id: list-crates run: echo "crates=$(./scripts/bench/list-crates-with-bench.sh)" >> $GITHUB_OUTPUT - build-crate: - name: Build benchmark for ${{ matrix.crate }} + benchmark-crate: + name: Benchmark ${{ matrix.crate }} runs-on: ubuntu-22.04 needs: list-crates strategy: @@ -64,52 +64,11 @@ jobs: - name: Install cargo-codspeed uses: taiki-e/install-action@v2 with: - tool: cargo-codspeed@2.7.2 + tool: cargo-codspeed@2.8.1 - name: Build the benchmark target(s) run: ./scripts/bench/build-crate.sh ${{ matrix.crate }} - - name: Upload built artifacts - uses: actions/upload-artifact@v4 - with: - name: bench-${{ matrix.crate }} - path: target/codspeed - - bench-all: - name: Run benchmarks - needs: build-crate - runs-on: - - self-hosted - - linux - - x64 - if: >- - ${{ !contains(github.event.head_commit.message, 'chore: ') }} - steps: - - uses: actions/checkout@v4 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - - - name: Install cargo-codspeed - uses: taiki-e/install-action@v2 - with: - tool: cargo-codspeed@2.7.2 - - - run: mkdir -p target/codspeed - - - name: Download built artifacts - uses: actions/download-artifact@v4 - with: - pattern: bench-* - path: target/codspeed - merge-multiple: true - - - run: ls -alR target/codspeed - - - run: chmod -R +x target/codspeed/* - - name: Run the benchmarks uses: CodSpeedHQ/action@v3 with: diff --git a/scripts/bench/list-crates-with-bench.sh b/scripts/bench/list-crates-with-bench.sh index 6122352bd20d..91bb0e11ea23 100755 --- a/scripts/bench/list-crates-with-bench.sh +++ b/scripts/bench/list-crates-with-bench.sh @@ -3,4 +3,4 @@ set -eu WS_CRATES=$(./scripts/cargo/get-workspace-crates-json.sh) -echo "$WS_CRATES" | jq -r -c '[.[] | select(.targets[] | .kind | contains(["bench"])) | .name] | sort | unique' | jq -r -c '[.[] | select(. != "swc_plugin_runner" and . != "swc_allocator")]' +echo "$WS_CRATES" | jq -r -c '[.[] | select(.targets[] | .kind | contains(["bench"])) | .name] | sort | unique' | jq -r -c '[.[] | select(. != "swc_plugin_runner" and . != "swc_allocator" and . != "swc")]'