Repository navigation
feat(toolchain): harden inputs and add integer lowering and interpret… #45
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
| name: Quality | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: whale-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: short | |
| RUSTUP_TOOLCHAIN: stable | |
| jobs: | |
| format: | |
| name: Rust formatting | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: '3.13' | |
| - run: rustup toolchain install stable --profile minimal --component rustfmt | |
| - run: python tools/ci.py run --name toolchain -- rustc -vV | |
| - run: python tools/ci.py run --name format -- cargo fmt --all -- --check | |
| - name: Retain command logs and reproduction evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: format | |
| path: .ci-artifacts/ | |
| include-hidden-files: true | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| clippy: | |
| name: Clippy / ${{ matrix.features }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| features: [default, all] | |
| env: | |
| FEATURE_FLAGS: ${{ matrix.features == 'all' && '--all-features' || '' }} | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: '3.13' | |
| - run: rustup toolchain install stable --profile minimal --component clippy | |
| - run: python tools/ci.py run --name toolchain -- rustc -vV | |
| - name: Reject warnings in every workspace target | |
| run: python tools/ci.py run --name clippy -- cargo clippy --workspace --all-targets --locked ${{ env.FEATURE_FLAGS }} -- -D warnings | |
| - name: Retain command logs and reproduction evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: clippy-${{ matrix.features }} | |
| path: .ci-artifacts/ | |
| include-hidden-files: true | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| docs: | |
| name: Public crate documentation | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: '3.13' | |
| - run: rustup toolchain install stable --profile minimal | |
| - run: python tools/ci.py run --name toolchain -- rustc -vV | |
| - run: python tools/ci.py run --name rustdoc -- cargo doc --workspace --all-features --no-deps --locked | |
| - name: Retain command logs and reproduction evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: rustdoc | |
| path: .ci-artifacts/ | |
| include-hidden-files: true | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| workflows: | |
| name: Workflow syntax and CI helpers | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install checksum-verified actionlint | |
| run: | | |
| curl --fail --location --retry 3 --max-time 120 -o /tmp/actionlint.tar.gz https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz | |
| echo '8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 /tmp/actionlint.tar.gz' | sha256sum --check | |
| tar -xzf /tmp/actionlint.tar.gz -C /tmp actionlint | |
| - name: Check all workflows and expressions | |
| run: python tools/ci.py run --name actionlint -- /tmp/actionlint -color | |
| - name: Check CI helper failure handling | |
| run: python tools/ci.py run --name runner-tests -- python -m unittest discover -s tools -p test_*.py -v | |
| - name: Retain command logs and reproduction evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: workflow-validation | |
| path: .ci-artifacts/ | |
| include-hidden-files: true | |
| if-no-files-found: warn | |
| retention-days: 7 |