2022-07-08 19:00:25 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
2023-02-19 01:23:57 +00:00
|
|
|
workflow_dispatch:
|
2022-07-08 19:00:25 +00:00
|
|
|
schedule: [cron: "40 1 * * *"]
|
|
|
|
|
2022-09-02 22:09:32 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-07-08 19:02:02 +00:00
|
|
|
env:
|
|
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
|
2022-07-08 19:00:25 +00:00
|
|
|
jobs:
|
2023-02-02 01:55:25 +00:00
|
|
|
pre_ci:
|
|
|
|
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
|
|
|
|
|
2022-07-08 19:00:25 +00:00
|
|
|
test:
|
|
|
|
name: Rust ${{matrix.rust}}
|
2023-02-02 01:55:25 +00:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 19:00:25 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-02-03 08:56:37 +00:00
|
|
|
rust: [nightly, beta, stable, 1.75.0]
|
2022-11-26 02:56:19 +00:00
|
|
|
timeout-minutes: 45
|
2022-07-08 19:00:25 +00:00
|
|
|
steps:
|
2023-09-05 05:35:02 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-08 19:00:25 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.rust}}
|
2023-02-19 17:22:00 +00:00
|
|
|
- name: Enable type layout randomization
|
|
|
|
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
|
2023-07-23 01:38:00 +00:00
|
|
|
if: matrix.rust == 'nightly'
|
2022-07-08 19:00:25 +00:00
|
|
|
- run: cargo test
|
|
|
|
|
|
|
|
msrv:
|
2024-02-03 08:56:37 +00:00
|
|
|
name: Rust 1.70.0
|
2023-02-02 01:55:25 +00:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 19:00:25 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-26 02:56:19 +00:00
|
|
|
timeout-minutes: 45
|
2022-07-08 19:00:25 +00:00
|
|
|
steps:
|
2023-09-05 05:35:02 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-02-03 08:56:37 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@1.70.0
|
2022-07-08 19:00:25 +00:00
|
|
|
- run: cargo check --lib
|
2022-07-08 19:00:50 +00:00
|
|
|
|
2023-09-24 17:53:44 +00:00
|
|
|
doc:
|
|
|
|
name: Documentation
|
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 45
|
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: -Dwarnings
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- uses: dtolnay/install@cargo-docs-rs
|
|
|
|
- run: cargo docs-rs
|
|
|
|
|
2022-07-08 19:00:50 +00:00
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-26 02:56:19 +00:00
|
|
|
timeout-minutes: 45
|
2022-07-08 19:00:50 +00:00
|
|
|
steps:
|
2023-09-05 05:35:02 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-08 19:00:50 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@clippy
|
|
|
|
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
|
2022-07-08 19:01:29 +00:00
|
|
|
|
|
|
|
miri:
|
|
|
|
name: Miri
|
2023-02-02 01:55:25 +00:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 19:01:29 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-26 02:56:19 +00:00
|
|
|
timeout-minutes: 45
|
2022-07-08 19:01:29 +00:00
|
|
|
steps:
|
2023-09-05 05:35:02 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-08 19:01:29 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@miri
|
2023-05-23 15:29:47 +00:00
|
|
|
- run: cargo miri setup
|
2022-07-08 19:01:29 +00:00
|
|
|
- run: cargo miri test
|
|
|
|
env:
|
|
|
|
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance
|
2022-07-08 19:01:50 +00:00
|
|
|
|
2022-07-08 19:04:06 +00:00
|
|
|
fuzz:
|
|
|
|
name: Fuzz
|
2023-02-02 01:55:25 +00:00
|
|
|
needs: pre_ci
|
|
|
|
if: needs.pre_ci.outputs.continue
|
2022-07-08 19:04:06 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-26 02:56:19 +00:00
|
|
|
timeout-minutes: 45
|
2022-07-08 19:04:06 +00:00
|
|
|
steps:
|
2023-09-05 05:35:02 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-08 19:04:06 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- uses: dtolnay/install@cargo-fuzz
|
2023-01-20 01:28:31 +00:00
|
|
|
- run: cargo fuzz check
|
2022-07-08 19:04:06 +00:00
|
|
|
|
2022-07-08 19:01:50 +00:00
|
|
|
outdated:
|
|
|
|
name: Outdated
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-26 02:56:19 +00:00
|
|
|
timeout-minutes: 45
|
2022-07-08 19:01:50 +00:00
|
|
|
steps:
|
2023-09-05 05:35:02 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-08 19:01:50 +00:00
|
|
|
- uses: dtolnay/install@cargo-outdated
|
|
|
|
- run: cargo outdated --workspace --exit-code 1
|
2022-07-08 19:04:06 +00:00
|
|
|
- run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
|