I'm siGit, running on siGit Code & Deploy platform, browsing siGit Code coding agent repo.

1 name: CI
2
3 # Runs on every push and pull request that can change what cargo builds.
4 # Splits formatting, clippy, and tests into separate jobs for clearer reporting
5 # across supported desktop targets.
6
7 on:
8 push:
9 branches: [main, development]
10 paths: &rust-paths
11 - "**"
12 # Nothing below can change what cargo builds, so a change that only
13 # touches these skips the nine jobs (four of them on macOS). Later
14 # entries win, which is how packaging/windows/ and this file get back in.
15 - "!**.md"
16 - "!docs/**"
17 - "!examples/**"
18 - "!LICENSE"
19 - "!NOTICE"
20 - "!.agents/**"
21 - "!npm/**"
22 - "!pypi/**"
23 - "!nuget/**"
24 - "!packaging/**"
25 - "packaging/windows/**"
26 - "!.github/**"
27 - ".github/workflows/ci.yml"
28 pull_request:
29 paths: *rust-paths
30 workflow_dispatch:
31
32 concurrency:
33 group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
34 cancel-in-progress: true
35
36 env:
37 CARGO_TERM_COLOR: always
38
39 jobs:
40 fmt:
41 name: Format
42 runs-on: macos-26
43
44 steps:
45 - name: Checkout
46 uses: actions/checkout@v6
47
48 - name: Install Rust toolchain
49 uses: dtolnay/rust-toolchain@stable
50 with:
51 components: rustfmt
52
53 - name: Setup Rust cache
54 uses: Swatinem/rust-cache@v2
55 with:
56 key: fmt
57
58 - name: Check formatting
59 run: cargo fmt -- --check
60
61 clippy:
62 name: Clippy — ${{ matrix.name }}
63 runs-on: ${{ matrix.os }}
64 strategy:
65 fail-fast: false
66 matrix:
67 include:
68 - name: macOS aarch64
69 os: macos-26
70 target: aarch64-apple-darwin
71
72 - name: macOS x86_64
73 os: macos-26
74 target: x86_64-apple-darwin
75
76 - name: Linux x86_64
77 os: ubuntu-latest
78 target: x86_64-unknown-linux-gnu
79
80 - name: Windows x86_64
81 os: windows-latest
82 target: x86_64-pc-windows-msvc
83
84 steps:
85 - name: Checkout
86 uses: actions/checkout@v6
87
88 - name: Install Rust toolchain
89 uses: dtolnay/rust-toolchain@stable
90 with:
91 targets: ${{ matrix.target }}
92 components: clippy
93
94 - name: Setup Rust cache
95 uses: Swatinem/rust-cache@v2
96 with:
97 key: clippy-${{ matrix.target }}
98
99 - name: Clippy
100 run: cargo clippy --locked --tests --target ${{ matrix.target }} -- -D warnings
101
102 test:
103 name: Test — ${{ matrix.name }}
104 runs-on: ${{ matrix.os }}
105 strategy:
106 fail-fast: false
107 matrix:
108 include:
109 - name: macOS aarch64
110 os: macos-26
111 target: aarch64-apple-darwin
112
113 - name: macOS x86_64
114 os: macos-26
115 target: x86_64-apple-darwin
116
117 - name: Linux x86_64
118 os: ubuntu-latest
119 target: x86_64-unknown-linux-gnu
120
121 - name: Windows x86_64
122 os: windows-latest
123 target: x86_64-pc-windows-msvc
124
125 steps:
126 - name: Checkout
127 uses: actions/checkout@v6
128
129 - name: Install Rust toolchain
130 uses: dtolnay/rust-toolchain@stable
131 with:
132 targets: ${{ matrix.target }}
133
134 - name: Setup Rust cache
135 uses: Swatinem/rust-cache@v2
136 with:
137 key: test-${{ matrix.target }}
138
139 - name: Test
140 run: cargo test --locked --target ${{ matrix.target }}
141
142 - name: Check Windows binary has no VC++ runtime dependency
143 if: runner.os == 'Windows'
144 shell: pwsh
145 run: ./packaging/windows/check-static-crt.ps1 -Path target/${{ matrix.target }}/debug/sigit.exe