Breaking: Adapt coreutils dev file structure V2 #54
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # spell-checker:ignore backtest moonrepo | |
| name: CodSpeed | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| # `workflow_dispatch` allows CodSpeed to trigger backtest | |
| # performance analysis in order to generate initial data. | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| codspeed: | |
| name: Run benchmarks | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| strategy: | |
| matrix: | |
| type: [simulation, memory] | |
| package: [ | |
| uu_cmp, | |
| uu_diff, | |
| ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup rust toolchain, cache and cargo-codspeed binary | |
| uses: moonrepo/setup-rust@v1 | |
| with: | |
| channel: stable | |
| cache-target: release | |
| bins: cargo-codspeed | |
| - name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }}) | |
| shell: bash | |
| run: | | |
| echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}" | |
| cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }} | |
| - name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} | |
| uses: CodSpeedHQ/action@v4 | |
| env: | |
| CODSPEED_LOG: debug | |
| with: | |
| mode: ${{ matrix.type }} | |
| run: | | |
| echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}" | |
| cargo codspeed run -p ${{ matrix.package }} > /dev/null | |
| token: ${{ secrets.CODSPEED_TOKEN }} | |