2022-07-08 12:00:25 -07:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule: [cron: "40 1 * * *"]
|
|
|
|
|
2022-09-02 15:09:32 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-07-08 12:02:02 -07:00
|
|
|
env:
|
|
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
|
2022-07-08 12:00:25 -07:00
|
|
|
jobs:
|
2023-02-01 17:55:25 -08:00
|
|
|
pre_ci:
|
|
|
|
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
|
|
|
|
|
2022-07-08 12:00:25 -07:00
|
|
|
test:
|
|
|
|
name: Rust ${{matrix.rust}}
|
2023-02-01 17:55:25 -08:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 12:00:25 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
rust: [nightly, beta, stable, 1.62.0]
|
2022-11-25 18:56:19 -08:00
|
|
|
timeout-minutes: 45
|
2022-07-08 12:00:25 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.rust}}
|
|
|
|
- run: cargo test
|
|
|
|
|
|
|
|
msrv:
|
|
|
|
name: Rust 1.56.0
|
2023-02-01 17:55:25 -08:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 12:00:25 -07:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 18:56:19 -08:00
|
|
|
timeout-minutes: 45
|
2022-07-08 12:00:25 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@1.56.0
|
|
|
|
- run: cargo check --lib
|
2022-07-08 12:00:50 -07:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-25 18:56:19 -08:00
|
|
|
timeout-minutes: 45
|
2022-07-08 12:00:50 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@clippy
|
|
|
|
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
|
2022-07-08 12:01:29 -07:00
|
|
|
|
|
|
|
miri:
|
|
|
|
name: Miri
|
2023-02-01 17:55:25 -08:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 12:01:29 -07:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 18:56:19 -08:00
|
|
|
timeout-minutes: 45
|
2022-07-08 12:01:29 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@miri
|
|
|
|
- run: cargo miri test
|
|
|
|
env:
|
|
|
|
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance
|
2022-07-08 12:01:50 -07:00
|
|
|
|
2022-07-08 12:04:06 -07:00
|
|
|
fuzz:
|
|
|
|
name: Fuzz
|
2023-02-01 17:55:25 -08:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 12:04:06 -07:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 18:56:19 -08:00
|
|
|
timeout-minutes: 45
|
2022-07-08 12:04:06 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- uses: dtolnay/install@cargo-fuzz
|
2023-01-19 17:28:31 -08:00
|
|
|
- run: cargo fuzz check
|
2022-07-08 12:04:06 -07:00
|
|
|
|
2022-07-08 12:01:50 -07:00
|
|
|
outdated:
|
|
|
|
name: Outdated
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-25 18:56:19 -08:00
|
|
|
timeout-minutes: 45
|
2022-07-08 12:01:50 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/install@cargo-outdated
|
|
|
|
- run: cargo outdated --workspace --exit-code 1
|
2022-07-08 12:04:06 -07:00
|
|
|
- run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
|