• 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  clippy:
40    name: Clippy
41    runs-on: ubuntu-latest
42    if: github.event_name != 'pull_request'
43    timeout-minutes: 45
44    steps:
45      - uses: actions/checkout@v3
46      - uses: dtolnay/rust-toolchain@clippy
47      - run: cargo clippy -- -Dclippy::all -Dclippy::pedantic
48
49  outdated:
50    name: Outdated
51    runs-on: ubuntu-latest
52    if: github.event_name != 'pull_request'
53    timeout-minutes: 45
54    steps:
55      - uses: actions/checkout@v3
56      - uses: dtolnay/install@cargo-outdated
57      - run: cargo outdated --workspace --exit-code 1
58