initial commit #1
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: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| deny: | |
| name: cargo deny | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: cargo deny | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| fmt: | |
| name: cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: install rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: cache rust toolchain | |
| uses: Swatinem/rust-cache@v2 | |
| - name: cargo fmt | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: cargo clippy | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [stable, beta, nightly, 1.80.0] # stable, beta, nightly, and MSRV | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: install rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: clippy | |
| - name: cache rust toolchain | |
| uses: Swatinem/rust-cache@v2 | |
| - name: cargo clippy | |
| run: cargo clippy --bins -- -D warnings | |
| build: | |
| name: cargo build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [stable, beta, nightly, 1.80.0] # stable, beta, nightly, and MSRV | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: install rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: cache rust toolchain | |
| uses: Swatinem/rust-cache@v2 | |
| - name: cargo build | |
| run: | | |
| cargo build # Debug | |
| cargo build --release # Release |