• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  push:
5  pull_request:
6  workflow_dispatch:
7  schedule: [cron: "40 1 * * *"]
8
9permissions:
10  contents: read
11
12env:
13  RUSTFLAGS: -Dwarnings
14
15jobs:
16  pre_ci:
17    uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
18
19  test:
20    name: Rust ${{matrix.rust}}
21    needs: pre_ci
22    if: needs.pre_ci.outputs.continue
23    runs-on: ubuntu-latest
24    strategy:
25      fail-fast: false
26      matrix:
27        rust: [nightly, beta, stable, 1.56.0]
28    timeout-minutes: 45
29    steps:
30      - uses: actions/checkout@v3
31      - uses: dtolnay/rust-toolchain@master
32        with:
33          toolchain: ${{matrix.rust}}
34      - name: Enable type layout randomization
35        run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
36        if: matrix.rust == 'nightly'
37      - run: cargo test
38
39  msrv:
40    name: Rust 1.31.0
41    needs: pre_ci
42    if: needs.pre_ci.outputs.continue
43    runs-on: ubuntu-latest
44    timeout-minutes: 45
45    steps:
46      - uses: actions/checkout@v3
47      - uses: dtolnay/rust-toolchain@1.31.0
48      - run: cargo check
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 -- -Dclippy::all -Dclippy::pedantic
59
60  miri:
61    name: Miri
62    needs: pre_ci
63    if: needs.pre_ci.outputs.continue
64    runs-on: ubuntu-latest
65    timeout-minutes: 45
66    steps:
67      - uses: actions/checkout@v3
68      - uses: dtolnay/rust-toolchain@miri
69      - run: cargo miri setup
70      - run: cargo miri test
71        env:
72          MIRIFLAGS: -Zmiri-strict-provenance
73
74  outdated:
75    name: Outdated
76    runs-on: ubuntu-latest
77    if: github.event_name != 'pull_request'
78    timeout-minutes: 45
79    steps:
80      - uses: actions/checkout@v3
81      - uses: dtolnay/install@cargo-outdated
82      - run: cargo outdated --workspace --exit-code 1
83