| 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 |
fmt: |
| 30 |
uses: smol-rs/.github/.github/workflows/fmt.yml@main |
| 31 |
clippy: |
| 32 |
uses: smol-rs/.github/.github/workflows/clippy.yml@main |
| 33 |
with: |
| 34 |
|
| 35 |
additional-targets: x86_64-pc-windows-msvc |
| 36 |
security_audit: |
| 37 |
uses: smol-rs/.github/.github/workflows/security_audit.yml@main |
| 38 |
permissions: |
| 39 |
checks: write |
| 40 |
contents: read |
| 41 |
issues: write |
| 42 |
secrets: inherit |
| 43 |
|
| 44 |
test: |
| 45 |
runs-on: ${{ matrix.os }} |
| 46 |
strategy: |
| 47 |
fail-fast: false |
| 48 |
matrix: |
| 49 |
os: [ubuntu-latest, windows-latest, macos-latest] |
| 50 |
rust: [nightly, beta, stable] |
| 51 |
steps: |
| 52 |
- uses: actions/checkout@v4 |
| 53 |
- name: Install Rust |
| 54 |
|
| 55 |
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} |
| 56 |
- name: Install cargo-hack and cargo-minimal-versions |
| 57 |
uses: taiki-e/install-action@v2 |
| 58 |
with: |
| 59 |
tool: cargo-hack,cargo-minimal-versions |
| 60 |
- run: cargo build --all --all-features --all-targets |
| 61 |
- run: cargo hack build --feature-powerset --no-dev-deps |
| 62 |
- run: cargo minimal-versions build --all --all-features |
| 63 |
- run: cargo test |
| 64 |
|
| 65 |
msrv: |
| 66 |
runs-on: ${{ matrix.os }} |
| 67 |
strategy: |
| 68 |
fail-fast: false |
| 69 |
matrix: |
| 70 |
os: [ubuntu-latest, windows-latest] |
| 71 |
steps: |
| 72 |
- uses: actions/checkout@v4 |
| 73 |
- name: Install cargo-hack |
| 74 |
uses: taiki-e/install-action@cargo-hack |
| 75 |
- run: cargo hack build --rust-version |