Normalize license files for GitHub detection #4
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: Rust CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| checks: | |
| name: Format, lint, test, and audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| run: rustup show | |
| - name: Cache Rust build output | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install security tools | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-deny,cargo-audit,cargo-sbom | |
| - name: Install cargo-license | |
| run: cargo install --locked cargo-license --version 0.7.0 | |
| - name: Run checks | |
| run: scripts/checks.sh | |
| - name: Generate SBOM | |
| run: scripts/generate-sbom.sh | |
| - name: Reproducible package/build check | |
| run: scripts/reproducible_build_check.sh | |
| platform: | |
| name: Platform tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| run: rustup show | |
| - name: Cache Rust build output | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Test default features | |
| run: cargo test --all-targets | |
| - name: Test no default features | |
| run: cargo test --no-default-features --all-targets | |
| miri: | |
| name: Miri | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install nightly with Miri | |
| run: | | |
| rustup toolchain install nightly --component miri | |
| cargo +nightly miri setup | |
| - name: Run Miri tests | |
| run: cargo +nightly miri test --no-default-features |