rspack-lightningcss 0.1.2

A CSS parser, transformer, and minifier
Documentation
name: codspeed

on:
  push:
    branches: [master]
  pull_request:
  workflow_dispatch:

permissions:
  contents: read
  id-token: write

jobs:
  codspeed:
    name: ${{ matrix.package }} / ${{ matrix.bench }}
    # The pinned CodSpeed simulation runner does not support Ubuntu 26.04.
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        include:
          - package: rspack-lightningcss
            bench: transform

    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

      - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable
      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

      - name: Install cargo-codspeed
        run: cargo install cargo-codspeed --locked

      - name: Build benchmark target
        run: cargo codspeed build -p ${{ matrix.package }} --bench ${{ matrix.bench }}

      - name: Run benchmarks
        uses: CodSpeedHQ/action@f22792bfac16f3e14eb9fbea76f4a48e9cc22b93 # v4.19.1
        with:
          mode: simulation
          run: cargo codspeed run -p ${{ matrix.package }} --bench ${{ matrix.bench }}