Edit ci #52
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - audit | |
| pull_request: | |
| types: [ opened, reopened, synchronize ] | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # We explicitly allow only the read permission for security reasons; no other permission is needed. | |
| permissions: | |
| contents: read | |
| # A workflow run is made up of one or more jobs, which run in parallel by default. | |
| # Each job runs in a runner environment specified by `runs-on`. | |
| jobs: | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ilammy/setup-nasm@v1 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Linting | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Enforce formatting | |
| run: cargo fmt -- --check --color always | |
| msrv: | |
| name: MSRV check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ilammy/setup-nasm@v1 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.89.0 | |
| components: clippy | |
| - run: cargo fetch | |
| - name: MSRV check with cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| publish-check: | |
| name: Publish check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ilammy/setup-nasm@v1 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo fetch | |
| - name: cargo publish dry run | |
| run: cargo publish --dry-run | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v5 | |
| - uses: ilammy/setup-nasm@v1 | |
| # This GitHub Action installs a Rust toolchain using "rustup". | |
| # It is designed for one-line concise usage and good defaults. | |
| - name: Install the Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| # A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults. | |
| - name: Rust Cache Action | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test --all --all-targets | |
| ci-success: | |
| name: CI success | |
| runs-on: ubuntu-latest | |
| needs: [clippy, fmt, publish-check, test] | |
| steps: | |
| - run: echo "All CI jobs successfully finished." |