|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - dev |
| 8 | + - boilerplate |
| 9 | + - idiomatic |
| 10 | + - rc1 |
| 11 | + - rc2 |
| 12 | + - rc3 |
| 13 | + pull_request: |
| 14 | + |
| 15 | +permissions: |
| 16 | + contents: read |
| 17 | + |
| 18 | +defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + |
| 22 | +env: |
| 23 | + CARGO_TERM_COLOR: always |
| 24 | + |
| 25 | +jobs: |
| 26 | + check: |
| 27 | + name: Stable checks |
| 28 | + runs-on: ubuntu-latest |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + |
| 32 | + - uses: dtolnay/rust-toolchain@stable |
| 33 | + with: |
| 34 | + components: clippy |
| 35 | + |
| 36 | + - uses: Swatinem/rust-cache@v2 |
| 37 | + |
| 38 | + - name: cargo test (all targets) |
| 39 | + run: cargo test --all-targets --locked |
| 40 | + |
| 41 | + - name: cargo test (no default features) |
| 42 | + run: cargo test --no-default-features --locked |
| 43 | + |
| 44 | + - name: cargo clippy |
| 45 | + run: cargo clippy --all-targets --locked -- -D warnings |
| 46 | + |
| 47 | + - name: cargo doc |
| 48 | + run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked |
| 49 | + |
| 50 | + - name: Install pinned nightly rustfmt |
| 51 | + run: rustup toolchain install nightly-2026-08-08 --profile minimal --component rustfmt |
| 52 | + |
| 53 | + - name: rustfmt |
| 54 | + run: ./scripts/fmt --check |
| 55 | + |
| 56 | + - name: DOC_76 checker |
| 57 | + run: python3 scripts/check_doc_76.py |
| 58 | + |
| 59 | + - name: RUST_TEST_NAMING checker |
| 60 | + run: python3 scripts/check_test_names.py |
| 61 | + |
| 62 | + - name: DERIVE_LAYOUT checker |
| 63 | + run: python3 scripts/check_derives.py |
| 64 | + |
| 65 | + - name: cargo build (libver) |
| 66 | + run: cargo build --bin libver --locked |
| 67 | + |
| 68 | + - name: cargo publish (dry run) |
| 69 | + run: cargo publish --dry-run --locked |
| 70 | + |
| 71 | + path-semantics: |
| 72 | + name: Path semantics (${{ matrix.os }}) |
| 73 | + runs-on: ${{ matrix.os }} |
| 74 | + strategy: |
| 75 | + fail-fast: false |
| 76 | + matrix: |
| 77 | + os: |
| 78 | + - ubuntu-latest |
| 79 | + - windows-latest |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@v4 |
| 82 | + |
| 83 | + - uses: dtolnay/rust-toolchain@stable |
| 84 | + |
| 85 | + - uses: Swatinem/rust-cache@v2 |
| 86 | + |
| 87 | + - name: cargo test (Unix path semantics) |
| 88 | + run: cargo test --lib --locked tests::unix:: |
| 89 | + |
| 90 | + - name: cargo test (Windows path semantics) |
| 91 | + run: cargo test --lib --locked tests::windows:: |
| 92 | + |
| 93 | + msrv: |
| 94 | + name: MSRV (1.74) |
| 95 | + runs-on: ubuntu-latest |
| 96 | + steps: |
| 97 | + - uses: actions/checkout@v4 |
| 98 | + |
| 99 | + - uses: dtolnay/rust-toolchain@1.74.0 |
| 100 | + |
| 101 | + - uses: Swatinem/rust-cache@v2 |
| 102 | + |
| 103 | + - name: cargo check (library) |
| 104 | + run: cargo check --lib --locked |
0 commit comments