Continuous Integration #455
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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: "0 0 1,15 * *" | |
| jobs: | |
| fmt: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: cargo fmt | |
| run: cargo fmt --check | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [stable, beta, nightly, 1.85] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: install toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Run tests | |
| run: | | |
| cargo test --all-features | |
| cargo test --no-default-features | |
| - name: Build benches | |
| if: ${{ matrix.rust == 'nightly' }} | |
| run: | | |
| cargo test --no-run --all-targets | |
| < 3E3C td id="LC48" class="blob-code blob-code-inner js-file-line"> doc: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [stable, beta, nightly, 1.85] | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: install toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Build docs | |
| run: | | |
| cargo doc | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: cargo clippy | |
| run: cargo clippy --all-features | |
| fuzz-tests: | |
| name: fuzz | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: install nightly toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: install cargo-fuzz | |
| run: cargo install cargo-fuzz | |
| - name: run tests | |
| run: for fuzz_test in `cargo fuzz list`; do cargo fuzz run $fuzz_test -- -len_control=0 -max_total_time=60 || exit 1; done |