-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (60 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
77 lines (60 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
permissions:
contents: read
jobs:
lint:
name: Code Quality & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Check Formatting
run: cargo fmt --all --check
- name: Clippy (Default Features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Clippy (No Default Features)
run: cargo clippy --all-targets --no-default-features -- -D warnings
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install Fossil (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y fossil
- name: Install Fossil (macOS)
if: runner.os == 'macOS'
run: brew install fossil
- name: Install Fossil (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
choco install fossil --no-progress
"C:\ProgramData\chocolatey\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"C:\tools\fossil" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build All Binaries
run: cargo build --bins
- name: Run Tests (Default Features)
run: cargo test --all-targets
- name: Run Tests (No Default Features)
run: cargo test --no-default-features