Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 name: CI
2
3 permissions:
4 contents: read
5
6 on:
7 pull_request:
8 push:
9 branches:
10 - master
11 schedule:
12 - cron: '0 2 * * 0'
13
14 env:
15 CARGO_INCREMENTAL: 0
16 CARGO_NET_GIT_FETCH_WITH_CLI: true
17 CARGO_NET_RETRY: 10
18 CARGO_TERM_COLOR: always
19 RUST_BACKTRACE: 1
20 RUSTFLAGS: -D warnings
21 RUSTDOCFLAGS: -D warnings
22 RUSTUP_MAX_RETRIES: 10
23
24 defaults:
25 run:
26 shell: bash
27
28 jobs:
29 test:
30 runs-on: ${{ matrix.os }}
31 strategy:
32 fail-fast: false
33 matrix:
34 os: [ubuntu-latest, windows-latest, macos-latest]
35 rust: [nightly, beta, stable]
36 steps:
37 - uses: actions/checkout@v4
38 - name: Install Rust
39 run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
40 - run: cargo build --all --all-features --all-targets
41 - name: Run cargo check (without dev-dependencies to catch missing feature flags)
42 if: startsWith(matrix.rust, 'nightly')
43 run: cargo check -Z features=dev_dep
44 - run: cargo test
45
46 msrv:
47 runs-on: ${{ matrix.os }}
48 strategy:
49 fail-fast: false
50 matrix:
51 os: [ubuntu-latest, windows-latest]
52 # When updating this, the reminder to update the minimum supported
53 # Rust version in Cargo.toml.
54 rust: ['1.63']
55 steps:
56 - uses: actions/checkout@v4
57 - name: Install Rust
58 # --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
59 run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
60 - run: cargo build
61
62 clippy:
63 runs-on: ubuntu-latest
64 steps:
65 - uses: actions/checkout@v4
66 - name: Install Rust
67 run: rustup update stable
68 - run: cargo clippy --all-features --all-targets
69
70 fmt:
71 runs-on: ubuntu-latest
72 steps:
73 - uses: actions/checkout@v4
74 - name: Install Rust
75 run: rustup update stable
76 - run: cargo fmt --all --check
77
78 security_audit:
79 permissions:
80 checks: write
81 contents: read
82 issues: write
83 runs-on: ubuntu-latest
84 steps:
85 - uses: actions/checkout@v4
86 # https://github.com/rustsec/audit-check/issues/2
87 - uses: rustsec/audit-check@master
88 with:
89 token: ${{ secrets.GITHUB_TOKEN }}