libyaml-safer/.github/workflows/ci.yml

110 lines
2.6 KiB
YAML
Raw Normal View History

2022-07-08 19:00:25 +00:00
name: CI
on:
push:
pull_request:
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:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
2022-07-08 19:00:25 +00:00
test:
name: Rust ${{matrix.rust}}
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]
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}}
- name: Enable type layout randomization
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
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
needs: pre_ci
if: needs.pre_ci.outputs.continue
2022-07-08 19:00:25 +00:00
runs-on: ubuntu-latest
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'
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
needs: pre_ci
if: needs.pre_ci.outputs.continue
2022-07-08 19:01:29 +00:00
runs-on: ubuntu-latest
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
- 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:04:06 +00:00
fuzz:
name: Fuzz
needs: pre_ci
if: needs.pre_ci.outputs.continue
2022-07-08 19:04:06 +00:00
runs-on: ubuntu-latest
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
- run: cargo fuzz check
2022-07-08 19:04:06 +00:00
outdated:
name: Outdated
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
2023-09-05 05:35:02 +00:00
- uses: actions/checkout@v4
- 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