99env :
1010 CARGO_TERM_COLOR : always
1111 RUST_BACKTRACE : 1
12- # Nightly multithreaded frontend for faster compilation
13- RUSTFLAGS : " -Zthreads=16 "
12+ # Nightly multithreaded frontend for faster compilation (32 threads for 32 vCPU runners)
13+ RUSTFLAGS : " -Zthreads=32 "
1414 # Sparse registry for faster index updates
1515 CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
1616 # Incremental compilation off for CI (more reproducible, better caching)
1717 CARGO_INCREMENTAL : 0
1818
19- # Ensure only one CI run per branch at a time
19+ # Ensure only one CI run per branch at a time - prevents overloading when many PRs merge
2020concurrency :
2121 group : ${{ github.workflow }}-${{ github.ref }}
2222 cancel-in-progress : true
2323
2424jobs :
2525 # ==========================================================================
26- # Version consistency check
26+ # Version consistency check (lightweight - 4 vCPU)
2727 # ==========================================================================
2828 version-check :
2929 name : CLI Version Check
30- runs-on : ubuntu-latest
30+ runs-on : blacksmith-4vcpu- ubuntu-2404
3131 steps :
3232 - uses : actions/checkout@v4
3333
3434 - name : Verify CLI version consistency
3535 run : ./scripts/check-cli-version.sh
3636
3737 # ==========================================================================
38- # Setup job to prepare shared cache
38+ # Setup job to prepare shared cache (lightweight - 4 vCPU)
3939 # ==========================================================================
4040 setup-cache :
4141 name : Setup Cache
42- runs-on : ubuntu-latest
42+ runs-on : blacksmith-4vcpu- ubuntu-2404
4343 outputs :
4444 cache-key : ${{ steps.cache-key.outputs.key }}
4545 steps :
5555 # ==========================================================================
5656 fmt :
5757 name : Format
58- runs-on : ubuntu-latest
58+ runs-on : blacksmith-4vcpu- ubuntu-2404
5959 steps :
6060 - uses : actions/checkout@v4
6161
6969
7070 clippy :
7171 name : Clippy
72- runs-on : ubuntu-latest
72+ runs-on : blacksmith-32vcpu- ubuntu-2404
7373 needs : setup-cache
7474 steps :
7575 - uses : actions/checkout@v4
8484 with :
8585 components : clippy
8686
87- - name : Setup Rust cache
88- uses : Swatinem /rust-cache@v2
87+ - name : Setup Rust cache (Blacksmith optimized)
88+ uses : useblacksmith /rust-cache@v3
8989 with :
9090 prefix-key : " rust-clippy"
9191 shared-key : ${{ needs.setup-cache.outputs.cache-key }}
9494 run : cargo +nightly clippy --workspace --all-targets --all-features --exclude cortex-gui -- -D warnings
9595
9696 # ==========================================================================
97- # Test jobs - Matrix for all platforms
97+ # Test jobs - Matrix for all platforms (32 vCPU for compilation)
9898 # ==========================================================================
9999 test :
100100 name : Test (${{ matrix.name }})
@@ -105,11 +105,11 @@ jobs:
105105 matrix :
106106 include :
107107 - name : ubuntu
108- runner : ubuntu-latest
108+ runner : blacksmith-32vcpu- ubuntu-2404
109109 - name : macos
110110 runner : macos-latest
111111 - name : windows
112- runner : windows-latest
112+ runner : blacksmith-32vcpu- windows-2025
113113 steps :
114114 - uses : actions/checkout@v4
115115
@@ -122,7 +122,15 @@ jobs:
122122 - name : Install Rust nightly
123123 uses : dtolnay/rust-toolchain@nightly
124124
125- - name : Setup Rust cache
125+ - name : Setup Rust cache (Blacksmith optimized)
126+ if : contains(matrix.runner, 'blacksmith')
127+ uses : useblacksmith/rust-cache@v3
128+ with :
129+ prefix-key : " rust-test-${{ matrix.name }}"
130+ shared-key : ${{ needs.setup-cache.outputs.cache-key }}
131+
132+ - name : Setup Rust cache (non-Blacksmith)
133+ if : " !contains(matrix.runner, 'blacksmith')"
126134 uses : Swatinem/rust-cache@v2
127135 with :
128136 prefix-key : " rust-test-${{ matrix.name }}"
@@ -131,10 +139,10 @@ jobs:
131139 - name : Run tests
132140 run : cargo +nightly test --workspace --all-features --exclude cortex-gui
133141 env :
134- RUSTFLAGS : " -Zthreads=16 "
142+ RUSTFLAGS : " -Zthreads=32 "
135143
136144 # ==========================================================================
137- # Build check - All platforms
145+ # Build check - All platforms (32 vCPU for compilation)
138146 # ==========================================================================
139147 build-check :
140148 name : Build Check (${{ matrix.name }})
@@ -145,11 +153,11 @@ jobs:
145153 matrix :
146154 include :
147155 - name : ubuntu
148- runner : ubuntu-latest
156+ runner : blacksmith-32vcpu- ubuntu-2404
149157 - name : macos
150158 runner : macos-latest
151159 - name : windows
152- runner : windows-latest
160+ runner : blacksmith-32vcpu- windows-2025
153161 steps :
154162 - uses : actions/checkout@v4
155163
@@ -162,7 +170,15 @@ jobs:
162170 - name : Install Rust nightly
163171 uses : dtolnay/rust-toolchain@nightly
164172
165- - name : Setup Rust cache
173+ - name : Setup Rust cache (Blacksmith optimized)
174+ if : contains(matrix.runner, 'blacksmith')
175+ uses : useblacksmith/rust-cache@v3
176+ with :
177+ prefix-key : " rust-build-${{ matrix.name }}"
178+ shared-key : ${{ needs.setup-cache.outputs.cache-key }}
179+
180+ - name : Setup Rust cache (non-Blacksmith)
181+ if : " !contains(matrix.runner, 'blacksmith')"
166182 uses : Swatinem/rust-cache@v2
167183 with :
168184 prefix-key : " rust-build-${{ matrix.name }}"
@@ -171,10 +187,10 @@ jobs:
171187 - name : Check build
172188 run : cargo +nightly check --workspace --all-features --exclude cortex-gui
173189 env :
174- RUSTFLAGS : " -Zthreads=16 "
190+ RUSTFLAGS : " -Zthreads=32 "
175191
176192 # ==========================================================================
177- # GUI Check - All platforms
193+ # GUI Check - All platforms (32 vCPU for compilation)
178194 # ==========================================================================
179195 gui-check :
180196 name : GUI Check (${{ matrix.name }})
@@ -185,11 +201,11 @@ jobs:
185201 matrix :
186202 include :
187203 - name : ubuntu
188- runner : ubuntu-latest
204+ runner : blacksmith-32vcpu- ubuntu-2404
189205 - name : macos
190206 runner : macos-latest
191207 - name : windows
192- runner : windows-latest
208+ runner : blacksmith-32vcpu- windows-2025
193209 steps :
194210 - uses : actions/checkout@v4
195211
@@ -205,7 +221,7 @@ jobs:
205221 sudo apt-get update
206222 sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libglib2.0-dev
207223
208- - name : Cache npm
224+ - name : Cache npm (Blacksmith 4x faster cache)
209225 uses : actions/cache@v4
210226 with :
211227 path : |
@@ -226,7 +242,15 @@ jobs:
226242 - name : Install Rust nightly
227243 uses : dtolnay/rust-toolchain@nightly
228244
229- - name : Setup Rust cache
245+ - name : Setup Rust cache (Blacksmith optimized)
246+ if : contains(matrix.runner, 'blacksmith')
247+ uses : useblacksmith/rust-cache@v3
248+ with :
249+ prefix-key : " rust-gui-${{ matrix.name }}"
250+ shared-key : ${{ needs.setup-cache.outputs.cache-key }}
251+
252+ - name : Setup Rust cache (non-Blacksmith)
253+ if : " !contains(matrix.runner, 'blacksmith')"
230254 uses : Swatinem/rust-cache@v2
231255 with :
232256 prefix-key : " rust-gui-${{ matrix.name }}"
@@ -235,21 +259,21 @@ jobs:
235259 - name : Check GUI build
236260 run : cargo +nightly check -p cortex-gui
237261 env :
238- RUSTFLAGS : " -Zthreads=16 "
262+ RUSTFLAGS : " -Zthreads=32 "
239263
240264 # ==========================================================================
241- # Security Audit
265+ # Security Audit (lightweight - 4 vCPU)
242266 # ==========================================================================
243267 audit :
244268 name : Security Audit
245- runs-on : ubuntu-latest
269+ runs-on : blacksmith-4vcpu- ubuntu-2404
246270 permissions :
247271 checks : write
248272 contents : read
249273 steps :
250274 - uses : actions/checkout@v4
251275
252- - name : Cache cargo-audit
276+ - name : Cache cargo-audit (Blacksmith 4x faster cache)
253277 uses : actions/cache@v4
254278 with :
255279 path : |
@@ -262,11 +286,11 @@ jobs:
262286 token : ${{ secrets.GITHUB_TOKEN }}
263287
264288 # ==========================================================================
265- # Final status check (for branch protection)
289+ # Final status check (for branch protection) - lightweight - 4 vCPU
266290 # ==========================================================================
267291 ci-success :
268292 name : CI Success
269- runs-on : ubuntu-latest
293+ runs-on : blacksmith-4vcpu- ubuntu-2404
270294 needs : [version-check, fmt, clippy, test, build-check, gui-check, audit]
271295 if : always()
272296 steps :
0 commit comments