• 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  minimal:
51    name: Minimal versions
52    needs: pre_ci
53    if: needs.pre_ci.outputs.continue
54    runs-on: ubuntu-latest
55    timeout-minutes: 45
56    steps:
57      - uses: actions/checkout@v3
58      - uses: dtolnay/rust-toolchain@nightly
59      - run: cargo update -Z minimal-versions
60      - run: cargo test
61
62  clippy:
63    name: Clippy
64    runs-on: ubuntu-latest
65    if: github.event_name != 'pull_request'
66    timeout-minutes: 45
67    steps:
68      - uses: actions/checkout@v3
69      - uses: dtolnay/rust-toolchain@clippy
70      - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
71
72  miri:
73    name: Miri
74    needs: pre_ci
75    if: needs.pre_ci.outputs.continue
76    runs-on: ubuntu-latest
77    timeout-minutes: 45
78    steps:
79      - uses: actions/checkout@v3
80      - uses: dtolnay/rust-toolchain@miri
81      - run: cargo miri test
82        env:
83          MIRIFLAGS: -Zmiri-strict-provenance
84
85  outdated:
86    name: Outdated
87    runs-on: ubuntu-latest
88    if: github.event_name != 'pull_request'
89    timeout-minutes: 45
90    steps:
91      - uses: actions/checkout@v3
92      - uses: dtolnay/install@cargo-outdated
93      - run: cargo outdated --workspace --exit-code 1
94