-
Notifications
You must be signed in to change notification settings - Fork 342
636 lines (593 loc) · 23.1 KB
/
Copy pathci.yml
File metadata and controls
636 lines (593 loc) · 23.1 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
env:
CARGO_TERM_COLOR: always
# Must match rust-toolchain.toml (single source of truth for the nightly pin).
NIGHTLY_TOOLCHAIN: nightly-2026-06-20
jobs:
local-validation:
name: ${{ matrix.label }}
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
contents: read
statuses: read
strategy:
fail-fast: false
matrix:
include:
- label: fmt
context: local/fmt
- label: biome
context: local/biome
- label: i18n
context: local/i18n
- label: zizmor
context: local/zizmor
- label: clippy
context: local/lint
- label: test
context: local/test
- label: macos-app
context: local/macos-app
- label: ios-app
context: local/ios-app
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Verify local status context
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
REQUIRED_CONTEXT: ${{ matrix.context }}
run: python3 scripts/check-local-status.py
changelog-guard:
name: Changelog Guard
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
fetch-depth: 0
- name: Block manual CHANGELOG.md edits
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: bash ./scripts/check-changelog-guard.sh "$BASE_SHA" "$HEAD_SHA"
zizmor:
name: Workflow Security
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: zizmorcore/zizmor-action@135698455da5c3b3e55f73f4419e481ab68cdd95 # v0.4.1
with:
advanced-security: false
online-audits: false
biome:
name: Biome
if: ${{ github.event_name != 'pull_request' }}
needs: zizmor
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
cache: npm
cache-dependency-path: crates/web/ui/package-lock.json
- run: npm ci --ignore-scripts --prefix crates/web/ui
- run: ./crates/web/ui/node_modules/.bin/biome ci crates/web/ui/src/ crates/web/ui/e2e/
- run: ./scripts/i18n-check.sh
fmt:
name: Format
if: ${{ github.event_name != 'pull_request' }}
needs: zizmor
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Check Rust file size limit
run: ./scripts/check-file-size.sh
- name: Check website install script sync
run: ./scripts/check-website-install-sync.sh
- name: Check install script package names match release workflow
run: ./scripts/check-install-package-names.sh
- name: Check install docs avoid stale asset URLs
run: ./scripts/check-install-docs.sh
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: rustfmt
- run: cargo fmt --all -- --check
rust-clippy:
name: Rust CI (Clippy)
if: ${{ github.event_name != 'pull_request' }}
needs: [fmt, biome]
# Temporarily use GitHub-hosted runners while self-hosted runners are offline.
# Restore to [self-hosted, Linux, X64] when they are connected again.
runs-on: ubuntu-latest
permissions:
contents: read
container:
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
env:
LD_LIBRARY_PATH: /usr/local/cuda/compat:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
steps:
- name: Install git for proper clone (CUDA image has none)
run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates >/dev/null
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Mark workspace safe for gix (container uid mismatch)
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Clean up corrupted cargo config
run: rm -f ~/.cargo/config.toml
- name: Install build dependencies
run: bash ./scripts/install-linux-build-deps.sh
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: clippy
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: Install QMD CLI
run: |
npm install --prefix "$RUNNER_TEMP/qmd-cli" @tobilu/qmd
echo "$RUNNER_TEMP/qmd-cli/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$RUNNER_TEMP/qmd-cli/node_modules/.bin:$PATH"
qmd --version
- name: Initialize git repo in llama-cpp source to satisfy cmake
run: |
cargo fetch --locked
LLAMA_SRC=$(find ~/.cargo/registry/src -name "llama-cpp-sys-2-*" -type d 2>/dev/null | head -1)
if [ -n "$LLAMA_SRC" ] && [ ! -d "$LLAMA_SRC/.git" ]; then
cd "$LLAMA_SRC"
git init
git config user.email "ci@example.com"
git config user.name "CI"
git add -A
git commit -m "init" --allow-empty
git tag v0.0.0
fi
- name: Install npm dependencies
working-directory: crates/web/ui
run: npm ci --ignore-scripts
- name: Build web assets
run: |
./scripts/download-tailwindcss-cli.sh tailwindcss-linux-x64
TAILWINDCSS=./tailwindcss-linux-x64 ./scripts/build-web-assets.sh
- run: cargo clippy -Z unstable-options --workspace --all-features --all-targets --timings -- -D warnings
- name: Upload cargo timing reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: cargo-timings-rust-ci-${{ github.run_id }}-${{ github.run_attempt }}
path: target/cargo-timings/
if-no-files-found: ignore
rust-test:
name: Rust CI (Test)
if: ${{ github.event_name != 'pull_request' }}
needs: [fmt, biome]
# Temporarily use GitHub-hosted runners while self-hosted runners are offline.
# Restore to [self-hosted, Linux, X64] when they are connected again.
runs-on: ubuntu-latest
permissions:
contents: read
container:
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
env:
LD_LIBRARY_PATH: /usr/local/cuda/compat:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
steps:
- name: Install git for proper clone (CUDA image has none)
run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates >/dev/null
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Mark workspace safe for gix (container uid mismatch)
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Clean up corrupted cargo config
run: rm -f ~/.cargo/config.toml
- name: Install build dependencies
run: bash ./scripts/install-linux-build-deps.sh
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: Install QMD CLI
run: |
npm install --prefix "$RUNNER_TEMP/qmd-cli" @tobilu/qmd
echo "$RUNNER_TEMP/qmd-cli/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$RUNNER_TEMP/qmd-cli/node_modules/.bin:$PATH"
qmd --version
- name: Initialize git repo in llama-cpp source to satisfy cmake
run: |
cargo fetch --locked
LLAMA_SRC=$(find ~/.cargo/registry/src -name "llama-cpp-sys-2-*" -type d 2>/dev/null | head -1)
if [ -n "$LLAMA_SRC" ] && [ ! -d "$LLAMA_SRC/.git" ]; then
cd "$LLAMA_SRC"
git init
git config user.email "ci@example.com"
git config user.name "CI"
git add -A
git commit -m "init" --allow-empty
git tag v0.0.0
fi
- name: Install npm dependencies
working-directory: crates/web/ui
run: npm ci --ignore-scripts
- name: Build web assets
run: |
./scripts/download-tailwindcss-cli.sh tailwindcss-linux-x64
TAILWINDCSS=./tailwindcss-linux-x64 ./scripts/build-web-assets.sh
- uses: taiki-e/install-action@f176c07a0a40cbfdd08ee9aa8bf1655701d11e69 # v2.67.25
with:
tool: cargo-nextest
- run: cargo nextest run --all-features --profile ci
- name: Upload test results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: test-results-${{ github.run_id }}-${{ github.run_attempt }}
path: target/nextest/ci/junit.xml
if-no-files-found: ignore
sandbox-runtime-e2e:
name: Sandbox Runtime E2E
if: ${{ github.event_name != 'pull_request' }}
needs: [fmt, biome]
runs-on: ubuntu-latest
permissions:
contents: read
env:
MOLTIS_SANDBOX_RUNTIME_E2E: "1"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install runtime dependencies
run: |
sudo apt-get update \
-o Acquire::Retries=5 \
-o Acquire::http::Timeout=30 \
-o Acquire::https::Timeout=30 \
-o APT::Update::Error-Mode=any
sudo apt-get install -y podman uidmap slirp4netns fuse-overlayfs
- name: Verify runtimes
run: |
docker --version
docker info
podman --version
podman info
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
shared-key: sandbox-runtime-e2e-v1
cache-all-crates: true
- name: Exercise Docker and Podman OCI file transfers
run: cargo test -p moltis-tools runtime_oci_file_transfers -- --nocapture
coverage:
name: Code Coverage
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/share/boost
sudo apt-get clean
df -h /
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install build dependencies
run: |
sudo apt-get update \
-o Acquire::Retries=5 \
-o Acquire::http::Timeout=30 \
-o Acquire::https::Timeout=30 \
-o APT::Update::Error-Mode=any
sudo apt-get install -y cmake build-essential clang libclang-dev pkg-config
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: llvm-tools-preview
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
package-manager-cache: false
- name: Install QMD CLI
run: |
npm install --prefix "$RUNNER_TEMP/qmd-cli" @tobilu/qmd
echo "$RUNNER_TEMP/qmd-cli/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$RUNNER_TEMP/qmd-cli/node_modules/.bin:$PATH"
qmd --version
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
shared-key: coverage-v1
cache-all-crates: true
- name: Initialize git repo in llama-cpp source to satisfy cmake
run: |
cargo fetch --locked
LLAMA_SRC=$(find ~/.cargo/registry/src -name "llama-cpp-sys-2-*" -type d 2>/dev/null | head -1)
if [ -n "$LLAMA_SRC" ] && [ ! -d "$LLAMA_SRC/.git" ]; then
cd "$LLAMA_SRC"
git init
git config user.email "ci@example.com"
git config user.name "CI"
git add -A
git commit -m "init" --allow-empty
git tag v0.0.0
fi
- uses: taiki-e/install-action@f176c07a0a40cbfdd08ee9aa8bf1655701d11e69 # v2.67.25
with:
tool: cargo-llvm-cov
- name: Install npm dependencies
working-directory: crates/web/ui
run: npm ci --ignore-scripts
- name: Build web assets
run: |
./scripts/download-tailwindcss-cli.sh tailwindcss-linux-x64
TAILWINDCSS=./tailwindcss-linux-x64 ./scripts/build-web-assets.sh
- name: Generate coverage
run: cargo llvm-cov --workspace --exclude moltis-tools --exclude moltis-swift-bridge --lcov --output-path lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
use_pypi: true
e2e:
name: E2E Tests
if: ${{ github.event_name != 'pull_request' }}
needs: [fmt, biome]
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: stable
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: npm
cache-dependency-path: crates/web/ui/package-lock.json
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
shared-key: e2e-v1
cache-all-crates: true
- name: Install npm dependencies
working-directory: crates/web/ui
run: npm ci
- name: Build web assets
run: |
./scripts/download-tailwindcss-cli.sh tailwindcss-linux-x64
TAILWINDCSS=./tailwindcss-linux-x64 ./scripts/build-web-assets.sh
- name: Build moltis binary
timeout-minutes: 20
run: cargo build --bin moltis
- name: Reclaim Rust build disk for E2E
run: bash ./scripts/cleanup-e2e-build-artifacts.sh
- name: Cache Playwright browsers
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('crates/web/ui/package-lock.json') }}
- name: Install Playwright browsers
timeout-minutes: 2
working-directory: crates/web/ui
run: npx playwright install chromium
- name: Run E2E tests
working-directory: crates/web/ui
env:
CI: "true"
MOLTIS_BINARY: ${{ github.workspace }}/target/e2e-bin/moltis
run: ./e2e/run-ci.sh
- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: e2e-test-results-${{ github.run_id }}-${{ github.run_attempt }}
path: |
crates/web/ui/playwright-report/
crates/web/ui/test-results/
target/e2e-runtime*/gateway.log
if-no-files-found: ignore
retention-days: 14
- name: Clean E2E runtime directories
if: ${{ always() }}
run: sudo rm -rf target/e2e-runtime*
macos-app:
name: macOS App
if: ${{ github.event_name != 'pull_request' }}
needs: [fmt, biome]
runs-on: macos-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: stable
targets: aarch64-apple-darwin
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
shared-key: macos-app-v1
cache-all-crates: true
- name: Install Swift build dependencies
run: brew install xcodegen cbindgen swiftlint
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
package-manager-cache: false
- name: Install npm dependencies
working-directory: crates/web/ui
run: npm ci --ignore-scripts
- name: Build web assets
run: |
./scripts/download-tailwindcss-cli.sh tailwindcss-macos-arm64
TAILWINDCSS=./tailwindcss-macos-arm64 ./scripts/build-web-assets.sh
- name: Build Swift bridge and generate Xcode project
env:
MOLTIS_SWIFT_BRIDGE_PROFILE: swift-ci
MOLTIS_SWIFT_BRIDGE_TARGETS: aarch64-apple-darwin
MOLTIS_SWIFT_BRIDGE_SKIP_WASM_BUILD: "1"
MOLTIS_SWIFT_BRIDGE_SKIP_WASM_PRECOMPILE: "1"
run: |
./scripts/build-swift-bridge.sh
./scripts/generate-swift-project.sh
- name: Lint Swift
run: ./scripts/lint-swift.sh
- name: Build macOS app
run: |
xcodebuild \
-project apps/macos/Moltis.xcodeproj \
-scheme Moltis \
-configuration Release \
-destination "platform=macOS" \
-derivedDataPath apps/macos/.derivedData-ci \
ARCHS=arm64 \
ONLY_ACTIVE_ARCH=YES \
build
ios-app:
name: iOS App
if: ${{ github.event_name != 'pull_request' }}
needs: [fmt, biome]
runs-on: macos-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: stable
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
shared-key: ios-app-v1
cache-all-crates: true
- name: Install xcodegen
run: brew install xcodegen
- name: Export GraphQL schema and generate project
run: |
cargo run -p moltis-schema-export -- apps/ios/GraphQL/Schema/schema.graphqls
./scripts/generate-ios-project.sh
./scripts/generate-ios-graphql.sh
./scripts/generate-ios-project.sh
- name: Build iOS app
run: |
xcodebuild \
-project apps/ios/Moltis.xcodeproj \
-scheme Moltis \
-configuration Debug \
-destination "generic/platform=iOS" \
CODE_SIGNING_ALLOWED=NO \
build
rust-full-targets:
name: Rust Full Targets (scheduled)
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
continue-on-error: true
needs: [fmt, biome]
# Temporarily use GitHub-hosted runners while self-hosted runners are offline.
# Restore to [self-hosted, Linux, X64] when they are connected again.
runs-on: ubuntu-latest
permissions:
contents: read
container:
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
env:
LD_LIBRARY_PATH: /usr/local/cuda/compat:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
steps:
- name: Install git for proper clone (CUDA image has none)
run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates >/dev/null
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Mark workspace safe for gix (container uid mismatch)
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Clean up corrupted cargo config
run: rm -f ~/.cargo/config.toml
- name: Install build dependencies
run: bash ./scripts/install-linux-build-deps.sh
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: clippy
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
package-manager-cache: false
- name: Install QMD CLI
run: |
npm install --prefix "$RUNNER_TEMP/qmd-cli" @tobilu/qmd
echo "$RUNNER_TEMP/qmd-cli/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$RUNNER_TEMP/qmd-cli/node_modules/.bin:$PATH"
qmd --version
- name: Initialize git repo in llama-cpp source to satisfy cmake
run: |
cargo fetch --locked
LLAMA_SRC=$(find ~/.cargo/registry/src -name "llama-cpp-sys-2-*" -type d 2>/dev/null | head -1)
if [ -n "$LLAMA_SRC" ] && [ ! -d "$LLAMA_SRC/.git" ]; then
cd "$LLAMA_SRC"
git init
git config user.email "ci@example.com"
git config user.name "CI"
git add -A
git commit -m "init" --allow-empty
git tag v0.0.0
fi
- name: Install npm dependencies
working-directory: crates/web/ui
run: npm ci --ignore-scripts
- name: Build web assets
run: |
./scripts/download-tailwindcss-cli.sh tailwindcss-linux-x64
TAILWINDCSS=./tailwindcss-linux-x64 ./scripts/build-web-assets.sh
- run: cargo clippy -Z unstable-options --workspace --all-features --all-targets --timings -- -D warnings
- name: Upload cargo timing reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: cargo-timings-rust-full-targets-${{ github.run_id }}-${{ github.run_attempt }}
path: target/cargo-timings/
if-no-files-found: ignore