• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  push:
5  pull_request:
6  schedule: [cron: "40 1 * * *"]
7
8permissions:
9  contents: read
10
11env:
12  RUSTFLAGS: -Dwarnings
13
14jobs:
15  test:
16    name: Rust ${{matrix.rust}}
17    runs-on: ubuntu-latest
18    strategy:
19      fail-fast: false
20      matrix:
21        rust: [nightly, beta, stable, 1.36.0]
22    timeout-minutes: 45
23    steps:
24      - uses: actions/checkout@v3
25      - uses: dtolnay/rust-toolchain@master
26        with:
27          toolchain: ${{matrix.rust}}
28      - run: cargo build
29      - run: cargo test
30      - run: cargo test --release
31      - run: cargo build --no-default-features
32      - run: cargo test --tests --no-default-features
33      - run: cargo test --tests --no-default-features --release
34      - run: cargo build --tests --features no-panic --release
35        if: matrix.rust == 'nightly'
36      - run: cargo bench --no-run
37        if: matrix.rust == 'nightly'
38
39  miri:
40    name: Miri
41    runs-on: ubuntu-latest
42    timeout-minutes: 45
43    steps:
44      - uses: actions/checkout@v3
45      - uses: dtolnay/rust-toolchain@miri
46      - run: cargo miri test
47        env:
48          MIRIFLAGS: -Zmiri-strict-provenance
49
50  clippy:
51    name: Clippy
52    runs-on: ubuntu-latest
53    if: github.event_name != 'pull_request'
54    timeout-minutes: 45
55    steps:
56      - uses: actions/checkout@v3
57      - uses: dtolnay/rust-toolchain@clippy
58      - run: cargo clippy --tests --benches -- -Dclippy::all -Dclippy::pedantic
59
60  fuzz:
61    name: Fuzz
62    runs-on: ubuntu-latest
63    timeout-minutes: 45
64    steps:
65      - uses: actions/checkout@v3
66      - uses: dtolnay/rust-toolchain@nightly
67      - uses: dtolnay/install@cargo-fuzz
68      - run: cargo fuzz build -O
69
70  outdated:
71    name: Outdated
72    runs-on: ubuntu-latest
73    if: github.event_name != 'pull_request'
74    timeout-minutes: 45
75    steps:
76      - uses: actions/checkout@v3
77      - uses: dtolnay/install@cargo-outdated
78      - run: cargo outdated --workspace --exit-code 1
79      - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
80