Skip to content

chore(deps): update rust crate sort-package-json to 0.0.11 #60415

chore(deps): update rust crate sort-package-json to 0.0.11

chore(deps): update rust crate sort-package-json to 0.0.11 #60415

Workflow file for this run

# Benchmarks are sharded.
#
# Each benchmark (parser, transformer, etc) runs in parallel in a separate job.
#
# See https://docs.codspeed.io/features/sharded-benchmarks
name: Benchmark
permissions: {}
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
branches-ignore:
- "**/graphite-base/**"
paths: &paths
- "crates/**/*.rs"
- "tasks/benchmark/**/*.rs"
- "tasks/common/**/*.rs"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/benchmark.yml"
push:
branches:
- main
paths: *paths
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
determine-matrix:
name: Determine Benchmark
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, '0-merge') }}
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: taiki-e/checkout-action@3ab630d442e198ebb0ca30872832406ca01c46eb # v1.4.0
- name: Determine affected components
id: set-matrix
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
MATRIX=$(node .github/scripts/generate-benchmark-matrix.js)
echo "Matrix: $MATRIX"
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
benchmark:
needs: determine-matrix
if: needs.determine-matrix.outputs.matrix != '[]'
runs-on: ubuntu-latest
permissions:
id-token: write # required for OIDC authentication with CodSpeed
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.determine-matrix.outputs.matrix) }}
name: Bench ${{ matrix.component }}
steps:
- uses: taiki-e/checkout-action@3ab630d442e198ebb0ca30872832406ca01c46eb # v1.4.0
- uses: oxc-project/setup-rust@704e1648ce532a12b4d6fb98db0ba10afa3ae879 # v1.0.13
with:
cache-key: benchmark-${{ matrix.feature }}
save-cache: ${{ github.ref_name == 'main' }}
tools: cargo-codspeed
- name: Build benchmark
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
run: |
if [ "${{ matrix.component }}" = "linter" ]; then
cargo build --release -p oxc_benchmark --bench linter \
--no-default-features --features ${{ matrix.feature }} --features codspeed
else
cargo build --release -p oxc_benchmark \
--bench lexer --bench parser --bench transformer --bench semantic \
--bench minifier --bench codegen --bench formatter --bench pipeline \
--no-default-features --features ${{ matrix.feature }} --features codspeed
fi
mkdir -p target/codspeed/analysis/oxc_benchmark
mv target/release/deps/${{ matrix.component }}-* target/codspeed/analysis/oxc_benchmark
rm target/codspeed/analysis/oxc_benchmark/*.d
- name: Run benchmark
uses: CodSpeedHQ/action@2ac572851726409c88c02a307f1ea2632a9ea59b # v4.11.0
timeout-minutes: 30
with:
mode: simulation
run: cargo codspeed run ${{ matrix.component }}