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 pre_ci: 16 uses: dtolnay/.github/.github/workflows/pre_ci.yml@master 17 18 test: 19 name: Rust ${{matrix.rust}} 20 needs: pre_ci 21 if: needs.pre_ci.outputs.continue 22 runs-on: ubuntu-latest 23 strategy: 24 fail-fast: false 25 matrix: 26 rust: [nightly, beta, stable, 1.60.0] 27 timeout-minutes: 45 28 steps: 29 - uses: actions/checkout@v3 30 - uses: dtolnay/rust-toolchain@master 31 with: 32 toolchain: ${{matrix.rust}} 33 components: rust-src 34 - run: cargo test 35 - run: cargo check --no-default-features 36 - run: cargo check --features backtrace 37 38 build: 39 name: Rust ${{matrix.rust}} 40 needs: pre_ci 41 if: needs.pre_ci.outputs.continue 42 runs-on: ubuntu-latest 43 strategy: 44 fail-fast: false 45 matrix: 46 rust: [1.52.0, 1.51.0, 1.50.0, 1.42.0, 1.39.0] 47 timeout-minutes: 45 48 steps: 49 - uses: actions/checkout@v3 50 - uses: dtolnay/rust-toolchain@master 51 with: 52 toolchain: ${{matrix.rust}} 53 components: rust-src 54 - run: cargo check 55 - run: cargo check --no-default-features 56 57 windows: 58 name: Windows 59 needs: pre_ci 60 if: needs.pre_ci.outputs.continue 61 runs-on: windows-latest 62 timeout-minutes: 45 63 steps: 64 - uses: actions/checkout@v3 65 - uses: dtolnay/rust-toolchain@stable 66 with: 67 components: rust-src 68 - run: cargo check --features backtrace 69 70 clippy: 71 name: Clippy 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/rust-toolchain@nightly 78 with: 79 components: clippy, rust-src 80 - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic 81 82 miri: 83 name: Miri 84 needs: pre_ci 85 if: needs.pre_ci.outputs.continue 86 runs-on: ubuntu-latest 87 timeout-minutes: 45 88 steps: 89 - uses: actions/checkout@v3 90 - uses: dtolnay/rust-toolchain@miri 91 - run: cargo miri test 92 env: 93 MIRIFLAGS: -Zmiri-strict-provenance 94 95 outdated: 96 name: Outdated 97 runs-on: ubuntu-latest 98 if: github.event_name != 'pull_request' 99 timeout-minutes: 45 100 steps: 101 - uses: actions/checkout@v3 102 - uses: dtolnay/install@cargo-outdated 103 - run: cargo outdated --workspace --exit-code 1 104