fix: Workflow fix #11
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
| on: [push, pull_request] | |
| name: Continuous integration | |
| jobs: | |
| Stable: | |
| name: Test - stable toolchain | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout Crate | |
| uses: actions/checkout@v4 | |
| - name: Checkout Toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Running test script | |
| run: ./contrib/test.sh | |
| Beta: | |
| name: Test - beta toolchain | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout Crate | |
| uses: actions/checkout@v4 | |
| - name: Checkout Toolchain | |
| uses: dtolnay/rust-toolchain@beta | |
| with: | |
| components: rustfmt, clippy | |
| - name: Running test script | |
| run: ./contrib/test.sh | |
| Nightly: | |
| name: Test - nightly toolchain | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout Crate | |
| uses: actions/checkout@v4 | |
| - name: Checkout Toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt, clippy | |
| - name: Running test script | |
| run: ./contrib/test.sh | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Run security audit | |
| run: cargo audit | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| run: cargo install cargo-llvm-cov | |
| - name: Generate coverage | |
| run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: lcov.info | |
| fail_ci_if_error: false | |
| cross-compile: | |
| name: Cross Compile | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - x86_64-unknown-linux-musl | |
| - x86_64-pc-windows-gnu | |
| - aarch64-unknown-linux-musl | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross | |
| run: cargo install cross | |
| - name: Build for ${{ matrix.target }} | |
| run: cross build --release --target ${{ matrix.target }} |