2020-05-05 14:29:48 -04:00
|
|
|
name: CI
|
2020-05-03 02:33:01 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
2023-02-18 20:23:53 -05:00
|
|
|
workflow_dispatch:
|
2020-05-03 02:33:01 -04:00
|
|
|
schedule: [cron: "40 1 * * *"]
|
|
|
|
|
2022-09-02 18:09:29 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-01-01 01:22:30 -05:00
|
|
|
env:
|
2022-04-28 22:29:09 -04:00
|
|
|
RUSTFLAGS: -Dwarnings
|
2022-01-01 01:22:30 -05:00
|
|
|
|
2020-05-03 02:33:01 -04:00
|
|
|
jobs:
|
2023-02-01 20:55:23 -05:00
|
|
|
pre_ci:
|
|
|
|
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
|
|
|
|
|
2020-05-03 02:33:01 -04:00
|
|
|
test:
|
|
|
|
name: Rust ${{matrix.rust}}
|
2023-02-01 20:55:23 -05:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2020-05-03 02:33:01 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-12-11 03:24:49 -05:00
|
|
|
rust: [nightly, beta, stable, 1.36.0]
|
2022-11-25 21:56:17 -05:00
|
|
|
timeout-minutes: 45
|
2020-05-03 02:33:01 -04:00
|
|
|
steps:
|
2022-04-25 04:43:59 -04:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-03 02:33:01 -04:00
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.rust}}
|
2023-02-19 12:21:56 -05:00
|
|
|
- name: Enable type layout randomization
|
|
|
|
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
|
|
|
|
if: matrix.rust == 'nightly'
|
2020-05-03 02:33:01 -04:00
|
|
|
- run: cargo build
|
2021-12-11 03:41:24 -05:00
|
|
|
- run: cargo test
|
|
|
|
- run: cargo test --release
|
|
|
|
- run: cargo build --no-default-features
|
|
|
|
- run: cargo test --tests --no-default-features
|
|
|
|
- run: cargo test --tests --no-default-features --release
|
2022-10-06 18:08:37 -04:00
|
|
|
- run: cargo build --tests --features no-panic --release
|
|
|
|
if: matrix.rust == 'nightly'
|
2021-12-11 03:41:24 -05:00
|
|
|
- run: cargo bench --no-run
|
2020-05-03 02:33:01 -04:00
|
|
|
if: matrix.rust == 'nightly'
|
|
|
|
|
2021-12-11 02:06:40 -05:00
|
|
|
miri:
|
|
|
|
name: Miri
|
2023-02-01 20:55:23 -05:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2021-12-11 02:06:40 -05:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 21:56:17 -05:00
|
|
|
timeout-minutes: 45
|
2021-12-11 02:06:40 -05:00
|
|
|
steps:
|
2022-04-25 04:43:59 -04:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-24 18:47:45 -04:00
|
|
|
- uses: dtolnay/rust-toolchain@miri
|
2023-05-23 11:29:45 -04:00
|
|
|
- run: cargo miri setup
|
2021-12-11 02:06:40 -05:00
|
|
|
- run: cargo miri test
|
2021-12-11 03:04:28 -05:00
|
|
|
env:
|
2022-05-06 07:01:33 -04:00
|
|
|
MIRIFLAGS: -Zmiri-strict-provenance
|
2021-12-11 02:06:40 -05:00
|
|
|
|
2020-12-29 20:07:25 -05:00
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
2021-09-18 19:40:22 -04:00
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-25 21:56:17 -05:00
|
|
|
timeout-minutes: 45
|
2020-12-29 20:07:25 -05:00
|
|
|
steps:
|
2022-04-25 04:43:59 -04:00
|
|
|
- uses: actions/checkout@v3
|
2020-12-29 20:07:25 -05:00
|
|
|
- uses: dtolnay/rust-toolchain@clippy
|
2021-12-12 15:04:30 -05:00
|
|
|
- run: cargo clippy --tests --benches -- -Dclippy::all -Dclippy::pedantic
|
2022-05-15 16:53:20 -04:00
|
|
|
|
|
|
|
fuzz:
|
|
|
|
name: Fuzz
|
2023-02-01 20:55:23 -05:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-05-15 16:53:20 -04:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-25 21:56:17 -05:00
|
|
|
timeout-minutes: 45
|
2022-05-15 16:53:20 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- uses: dtolnay/install@cargo-fuzz
|
2023-01-19 20:28:30 -05:00
|
|
|
- run: cargo fuzz check
|
2022-06-06 20:01:48 -04:00
|
|
|
|
|
|
|
outdated:
|
|
|
|
name: Outdated
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-25 21:56:17 -05:00
|
|
|
timeout-minutes: 45
|
2022-06-06 20:01:48 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/install@cargo-outdated
|
|
|
|
- run: cargo outdated --workspace --exit-code 1
|
|
|
|
- run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
|