Repository navigation
1252 lines (1224 loc) · 60.6 KB
/
Copy pathci.yml
File metadata and controls
1252 lines (1224 loc) · 60.6 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
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: CI
# Unified correctness gate for the firmware (host workspace + the workspace-excluded board
# crate), the wasm sim, the docs site, and the iOS companion app. Build surfaces and their
# structural gotchas:
#
# * The firmware/ manifest is a *virtual* workspace (no targets of its own) → workspace
# commands need `--workspace` / `--all`.
# * obc-fw-nrf54l is the **real device target** (nRF54L15; the display is the LS021 panel driven
# by the FLPR coprocessor). It's `exclude`d from that workspace and is its own cargo root → it
# needs its own invocation, run from inside the crate dir so its .cargo/config.toml selects the
# thumbv8m target (a `--manifest-path` from the root would build it for the host and fail on
# embassy-nrf). It has its own Cargo.lock, and no test harness (no_std on bare metal), so it gets
# `clippy`/`build` but not `--all-targets`/`test`. No `--all-features` build: each config is
# linted on its own. Every leg cross-compiles a RISC-V blob (see `embedded`).
# * nRF is the only board in the tree — optimise the shared crates for nRF freely.
# * There is no board in CI, so every embedded target is build-only.
# * The toolchain (channel + rustfmt/clippy + the thumbv8m / wasm32 targets) is declared once in
# //rust-toolchain.toml and shared with local dev. It intentionally tracks floating stable.
# * obc-boot (the 32 KB DFU bootloader, #617) is excluded + standalone the same way as the
# board crate; its job adds a flash-size guard against the 32 KB slot.
# * obc-builder-bridge is a workspace library and the builder's shared WASM core.
# The wasm-bridges job gates its production size and hands the same bytes to frontend jobs.
# * `--locked` everywhere so a stale Cargo.lock (any of them) fails CI.
on:
workflow_call:
inputs:
source_sha:
type: string
required: true
full_release:
type: boolean
default: false
pull_request:
push:
branches: [main, develop]
# One run per ref; a new push cancels the previous in-flight run for that ref.
concurrency:
group: ci-${{ github.workflow }}-${{ inputs.source_sha || github.ref }}-${{ inputs.full_release && github.run_id || 'development' }}
cancel-in-progress: ${{ !inputs.full_release }}
permissions:
contents: read
# No job below performs an authenticated git operation — the only git commands are local reads
# (`merge-base`, `diff`, `ls-files`) — so every checkout sets `persist-credentials: false` and the
# token never lands in a job's .git/config.
# Linux jobs name their image, never `ubuntu-latest`: the host tests resolve the image's Python
# 3.12, and the nRF bindgen build parses the MDK headers with the image's libclang 18.
jobs:
# `tools/test_plan.py` is the only selector. This job runs it and publishes two outputs: the
# per-suite plan the `ci` gate evaluates, and the list of jobs that plan requires. Every gated
# job below reads that list — there is no second path-filter selector, and no job decides its
# own policy. `python3 tools/test_plan.py select` is the same command `obc test affected`
# runs locally (just is not installed on the runners), so a developer and CI answer "which
# jobs does this change require" with one implementation.
selection:
runs-on: ubuntu-24.04
outputs:
plan: ${{ steps.plan.outputs.plan }}
jobs: ${{ steps.plan.outputs.jobs }}
base: ${{ steps.plan.outputs.base }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Select affected suites
id: plan
env:
FULL_RELEASE: ${{ inputs.full_release }}
EVENT_NAME: ${{ github.event_name }}
BASE_REF: ${{ github.base_ref }}
BEFORE_SHA: ${{ github.event.before }}
run: |
release_args=()
if [ "$FULL_RELEASE" = "true" ]; then
base="HEAD^"
release_args=(--release)
elif [ "$EVENT_NAME" = "pull_request" ]; then
base="$(git merge-base HEAD "origin/$BASE_REF")"
elif [ -n "$BEFORE_SHA" ] && [ "$BEFORE_SHA" != "0000000000000000000000000000000000000000" ]; then
base="$BEFORE_SHA"
else
base="HEAD^"
fi
echo '[]' > selection-jobs.json
set +e
python3 tools/test_plan.py select "${release_args[@]}" --base "$base" --format json \
--jobs-file selection-jobs.json > selection-plan.json
rc=$?
set -e
cat selection-plan.json
# A failed selection publishes nothing, so the gate fails on a missing plan instead of
# evaluating one the selector itself rejected.
[ "$rc" -eq 0 ] || exit "$rc"
echo "plan=$(cat selection-plan.json)" >> "$GITHUB_OUTPUT"
echo "jobs=$(cat selection-jobs.json)" >> "$GITHUB_OUTPUT"
echo "base=$base" >> "$GITHUB_OUTPUT"
echo "required jobs: $(cat selection-jobs.json)"
# Every guard is a fast Python check over the source tree. They share nothing but runner
# setup, so one job runs them all; each keeps its own step name and failure message. The
# job is unconditional: every guard suite is required on every pull request.
guards:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- name: Every fetched host is a declared data source
run: python3 tools/check_data_sources.py
- name: No memory.x shadows the board image's carved map
run: python3 firmware/tools/check_memory_x.py
- name: Prose budgets, published pages and links
run: python3 tools/prose.py --check
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: &python-uv-version "0.8.17"
- name: Install Python test reporter
run: uv sync --locked --group dev --group planner-snow --group forest-reference --group route-sources
- name: Test plan drift
run: uv run --locked --group dev python tools/test_plan.py check
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
with:
just-version: "1.57.0"
- name: Prepare native area-union tool
uses: ./.github/actions/apt-install
with:
packages: osmium-tool
- name: Repository tool unit tests
id: python-repository-tools
run: |
rm -rf .artifacts/python/repository-tools
uv run --locked --group dev --group planner-snow --group forest-reference --group route-sources python -m xmlrunner discover -s tools/tests -v -o .artifacts/python/repository-tools
- name: Upload repository Python test results
if: ${{ !cancelled() && (steps.python-repository-tools.outcome == 'success' || steps.python-repository-tools.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: python-repository-tools-${{ github.run_attempt }}
path: .artifacts/python/repository-tools/*.xml
if-no-files-found: error
- name: TrailView tool unit tests
id: python-trailview
run: |
rm -rf .artifacts/python/trailview
uv run --locked --group trailview --group dev python -m xmlrunner discover -s tools/trailview/tests -v -o .artifacts/python/trailview
- name: Upload TrailView tool Python test results
if: ${{ !cancelled() && (steps.python-trailview.outcome == 'success' || steps.python-trailview.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: python-trailview-${{ github.run_attempt }}
path: .artifacts/python/trailview/*.xml
if-no-files-found: error
- name: The job table and this workflow describe the same jobs
run: uv run --locked --group dev python tools/test_plan.py validate-filters
- name: Large fixture policy
run: python3 tools/check_fixture_policy.py
# Report only until a system doc is approved, but a stale system map always fails. The Rust
# adapter reads `cargo metadata`, so the job needs the toolchain but builds nothing.
cairn:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'cairn')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
# The baseline check reads the baseline at the plan's base commit.
fetch-depth: 0
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: cairn unit tests
run: python3 -m unittest discover -s tools/cairn/tests -v
# A baseline may not grow by hand, so this step fails on that even in report mode.
- name: System docs against the code
env:
BASE: ${{ needs.selection.outputs.base }}
run: python3 tools/cairn/cairn.py check --base "$BASE"
# cargo fmt --check for all Cargo roots. rustfmt walks up from each file and finds the
# shared .rustfmt.toml at the repo root, so the excluded crates inherit it; the virtual workspace
# manifest needs `--all`, the board crate + bootloader are checked on their own.
fmt:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'fmt')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: cargo fmt --check (host workspace + standalone crates)
run: |
rc=0
echo "::group::firmware workspace"
cargo fmt --all --check || rc=1
cargo fmt --check --manifest-path firmware/obc-sensor-sim/Cargo.toml || rc=1
echo "::endgroup::"
echo "::group::obc-fw-nrf54l (workspace-excluded)"
cargo fmt --check --manifest-path firmware/obc-fw-nrf54l/Cargo.toml || rc=1
echo "::endgroup::"
echo "::group::obc-boot (workspace-excluded)"
cargo fmt --check --manifest-path firmware/obc-boot/Cargo.toml || rc=1
echo "::endgroup::"
exit $rc
# Blocking clippy on the host workspace: -D warnings from day one (the baseline is clean).
clippy:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'clippy')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
key: host
# Native host build: system libGEOS (built from source — apt's is too old) + serialport/
# eframe system libs. See .github/actions/setup-host-deps.
- uses: ./.github/actions/setup-host-deps
- name: cargo clippy (workspace, all targets + features)
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
# The iOS portability gate: the shared stack has to keep type-checking for the phone, and
# only a Mac can link or run it. A type-check is cheap enough to ride this Linux job.
- name: cargo check (iOS host, aarch64-apple-ios)
run: cargo check -p obc-ios-host --target aarch64-apple-ios --locked
test:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'test')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
# `shared-key` (not `key`) so the three jobs that build the host workspace — this one, the
# snapshot sweep and the builder's packer tests — restore *one* cache instead of three: they
# run the same build, so further copies would only spend the cache budget again. This
# job is the one that writes it, and only on a push — a cache saved during a pull-request run
# is scoped to that pull request, so it can never warm anyone else's, and saving one costs
# every pull request the write while buying only its own re-runs. The cache that matters is
# the one develop's push writes, and every pull request restores that.
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
shared-key: host-tests
save-if: ${{ github.event_name == 'push' }}
# Native host build: system libGEOS (built from source — apt's is too old) + serialport/
# eframe system libs. See .github/actions/setup-host-deps.
- uses: ./.github/actions/setup-host-deps
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest@0.9.143
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Prepare locked planner artifact readers
run: npm ci --omit=dev --ignore-scripts --prefix builder/web
# obc-trailview-features cuts and bakes a small region with Osmium.
- name: Prepare Osmium
uses: ./.github/actions/apt-install
with:
packages: osmium-tool
# The planner Python steps run under uv: obc-data-steps runs one in its tests.
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
# The obc-data tests run Python steps on the system Python that .python-version names.
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: *python-uv-version
- name: Cache content-addressed developer fixtures
uses: actions/cache@v4
with:
path: ~/.cache/openbikecomputer/fixtures
key: obc-fixtures-${{ hashFiles('fixtures/catalog.toml') }}
# Each section is one step so it keeps its own step name and result artifact; the file
# is the same one `obc check test` runs.
- name: cargo nextest (fast hermetic binaries)
id: nextest
# The targets of a suite that owns some, such as the ground plan census, run only when the
# plan selects that suite.
env:
OBC_SELECTED_SUITES: ${{ join(fromJSON(needs.selection.outputs.plan).selected_suite_ids, ' ') }}
run: bash tools/ci/test.sh nextest-fast
- name: cargo nextest (captured fixture binaries)
id: nextest-fixtures
run: bash tools/ci/test.sh nextest-fixtures
- name: cargo test --doc (workspace, all features)
run: bash tools/ci/test.sh doctests
- name: cargo test (obc-formats, default features = the device's shape)
run: bash tools/ci/test.sh formats-default
- name: Install Python test reporter
run: uv sync --locked --group dev --group planner-snow --group forest-reference
- name: firmware resource/dependency tool unit tests
id: python-firmware-tools
run: |
rm -rf .artifacts/python/firmware-tools
uv run --locked --group dev --group planner-snow --group forest-reference python -m xmlrunner discover -s firmware/tools/tests -v -o .artifacts/python/firmware-tools
- name: reference archive ingest unit tests
id: python-dem-reference
run: |
rm -rf .artifacts/python/dem-reference
uv run --locked --group terrain-reference --group dev python -m xmlrunner discover -s host/obc-dem/reference/tests -v -o .artifacts/python/dem-reference
- name: Upload reference archive Python test results
if: ${{ !cancelled() && (steps.python-dem-reference.outcome == 'success' || steps.python-dem-reference.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: python-dem-reference-${{ github.run_attempt }}
path: .artifacts/python/dem-reference/*.xml
if-no-files-found: error
- name: firmware production dependency direction
run: python3 firmware/tools/check_dependencies.py
- name: obc-bench --check (render + read-counter golden gate)
run: bash tools/ci/test.sh bench-golden
- name: Upload firmware-tools Python test results
if: ${{ !cancelled() && (steps.python-firmware-tools.outcome == 'success' || steps.python-firmware-tools.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: python-firmware-tools-${{ github.run_attempt }}
path: .artifacts/python/firmware-tools/*.xml
if-no-files-found: error
- name: Upload Rust test results
if: ${{ !cancelled() && (steps.nextest.outcome == 'success' || steps.nextest.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: rust-test-${{ github.run_attempt }}
path: |
target/nextest/ci/junit.xml
.artifacts/rust/
if-no-files-found: error
- name: Upload Rust fixture test results
if: ${{ !cancelled() && (steps.nextest-fixtures.outcome == 'success' || steps.nextest-fixtures.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: rust-fixtures-${{ github.run_attempt }}
path: target/nextest/fixtures/junit.xml
if-no-files-found: error
# Screen pixel-hash tripwire: re-render every UI screen through the headless simulator and
# compare the frames to the committed digest manifest. The bench golden gate in `test` covers
# the map renderer's scenes; this covers the screens drawn over them, which is what a screen
# refactor moves. It is its own job so the sweep is off the `test` job's serial path. The debug
# binary is deliberate: its output is byte-identical to release. `--accept` is a developer
# command and never runs here — a self-regenerating manifest records nothing.
#
# The job starts for every suite that routes to it, which includes each package it compiles.
# The sweep itself still runs only for `ci.ui-snapshots`, the suite that owns the rendering
# input triggers, so its selection budget is exactly what it was.
ui-snapshots:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'ui-snapshots')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
shared-key: host-tests
save-if: false
- uses: ./.github/actions/setup-host-deps
- name: Cache content-addressed developer fixtures
uses: actions/cache@v4
with:
path: ~/.cache/openbikecomputer/fixtures
key: obc-fixtures-${{ hashFiles('fixtures/catalog.toml') }}
- name: ui-snapshots manifest check
id: ui-snapshots
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ci.ui-snapshots')
env:
PYTHONPATH: firmware/tools
run: |
cargo build -p obc-sim --locked
export SIM="$PWD/target/debug/obc-sim"
python3 -m ui_frames --all "$RUNNER_TEMP/ui-snapshots"
python3 -m ui_frames --check "$RUNNER_TEMP/ui-snapshots"
- name: Upload UI review frames
if: ${{ !cancelled() && (steps.ui-snapshots.outcome == 'success' || steps.ui-snapshots.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: ui-snapshots-${{ github.run_attempt }}
path: ${{ runner.temp }}/ui-snapshots/*.png
if-no-files-found: ignore
# Routing-profile round-trips through the obc-pack binary. These pack the tiny corpus with custom
# profiles and byte-compare the §8.6 profile table against independently quantized expectations,
# so they pin the packer's writer against the spec rather than against itself. The preflight is
# what stops a missing binary or corpus from turning the suite into a silent skip.
packer-python:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'packer-python')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
shared-key: host-tests
save-if: false
- uses: ./.github/actions/setup-host-deps
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: *python-uv-version
- name: Prepare the packer profile tests
run: |
uv sync --locked --group packer-test
cargo build -p obc-bake --bin obc-pack --release --locked
- name: Packer binary and corpus are present
run: |
test -x target/release/obc-pack
test -f builder/tests/corpus/data/tiny.osm.pbf
- name: Packer profile tests (pytest)
id: python-packer
run: |
mkdir -p .artifacts/python
rm -f .artifacts/python/packer.xml
uv run --locked --group packer-test python -m pytest host/obc-bake/tests/test_routing_profiles.py -v --junitxml=.artifacts/python/packer.xml
- name: Upload packer Python test results
if: ${{ !cancelled() && (steps.python-packer.outcome == 'success' || steps.python-packer.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: python-packer-${{ github.run_attempt }}
path: .artifacts/python/packer.xml
if-no-files-found: error
embedded:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'embedded')
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
# default = the shipping LS021/FLPR map + two-plane path (real sensors, no host feed).
# It is the whole device: the **USB device plane** (#889) since 2026-07-26 and the **radio**
# (#1530) since the `ble` feature was retired are compiled, linted and resource-gated by the
# default legs below — no separate USB or BLE matrix leg exists or is needed, and neither
# plane can rot in a profile nobody builds.
- { name: "clippy (default = LS021/FLPR)", cmd: "cargo clippy --locked -- -D warnings" }
# debug-uart = default + the VCOM host sensor/telemetry feed (the obc-platform debug codec).
- { name: "clippy (debug-uart)", cmd: "cargo clippy --locked --features debug-uart -- -D warnings" }
# The real flashed default artifact (LS021/FLPR) under fat LTO + the N3 RAM-budget assert.
- { name: "build (default = LS021/FLPR, release)", cmd: "set -o pipefail; cargo build --release --locked -vv 2>&1 | tee $RUNNER_TEMP/obc-fw-default-build.log" }
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
# An exported RUSTFLAGS value overrides the board crate's target rustflags wholesale.
rustflags: ""
- uses: Swatinem/rust-cache@v2
with:
workspaces: firmware/obc-fw-nrf54l
key: thumbv8m-nrf
# The FLPR `build.rs` cross-compiles src/flpr/*.c for the VPR with an rv32emc GNU gcc.
- uses: ./.github/actions/setup-riscv
- uses: taiki-e/install-action@v2
if: matrix.name == 'build (default = LS021/FLPR, release)'
with:
tool: cargo-nextest@0.9.143
- name: Sensor simulator tests, lint and device build
if: matrix.name == 'build (default = LS021/FLPR, release)'
run: |
bash firmware/obc-sensor-sim/check.sh
cd firmware/obc-sensor-sim
cargo clippy --locked --lib --tests -- -D warnings
cargo clippy --locked --features device --bin obc-sensor-sim --target thumbv8m.main-none-eabihf -- -D warnings
- name: "obc-fw-nrf54l: ${{ matrix.name }}"
working-directory: firmware/obc-fw-nrf54l
run: ${{ matrix.cmd }}
# FAR-00's one ELF parser extends the pre-existing boot/poll guards with actual linked
# `.bss + .data`, exact framebuffer count/size, and the report-only target `size_of` table.
# Run against the production ELF first; the resource-report rebuild is a separate diagnostic
# artifact and never changes what ships.
# `board` also subsumes #677's steady-state poll-frame parser: the largest single `sub sp` in
# every `TaskStorage<F>::poll`, capped at 12 KiB, with stale-symbol and stale-instruction
# diagnostics covered by unit tests.
- name: "obc-fw-nrf54l: default resource baseline"
if: matrix.name == 'build (default = LS021/FLPR, release)'
working-directory: firmware/obc-fw-nrf54l
run: |
python3 ../tools/resource_guard.py build-rustflags \
--log "$RUNNER_TEMP/obc-fw-default-build.log" --crate obc-fw-nrf54l
rustup component add llvm-tools
python3 ../tools/resource_guard.py board --profile default \
--elf target/thumbv8m.main-none-eabihf/release/obc-fw-nrf54l
# The resident `App`'s own construction frame (#1446), measured on the **shipping** link —
# hence here, before the resource-report rebuild below overwrites this same path.
# `App::init_idle` writes each field straight into the `.bss` slot, so its frame is small
# (1,572 B) and must stay that way: the field plan's two row forms differ by four tokens,
# and demoting a `=> Type::init_in_place` row to a plain one silently materialises that
# component on the boot stack. Nothing else here would notice — resident RAM, `.uninit`,
# flash, the poll frame and the task bodies are all unchanged by a stack temporary — while
# a by-value `App` is 50,520 B against 55,000 B of residual main stack, i.e. the MSPLIM
# HardFault `mount_in_place` already cost us once. 4,096 is the measured figure with
# headroom, on the same ratchet policy as the frame legs below.
python3 ../tools/resource_guard.py frames \
--elf target/thumbv8m.main-none-eabihf/release/obc-fw-nrf54l \
--match init_idle --limit 4096
cargo build --release --locked --features resource-report
python3 ../tools/resource_guard.py report --profile default \
--elf target/thumbv8m.main-none-eabihf/release/obc-fw-nrf54l
- name: "obc-fw-nrf54l: flat store frame ceiling"
if: matrix.name == 'build (default = LS021/FLPR, release)'
working-directory: firmware/obc-fw-nrf54l
run: |
cargo build --release --locked --bin flat_store_bench
python3 ../tools/resource_guard.py frames \
--elf target/thumbv8m.main-none-eabihf/release/flat_store_bench \
--match 'obc_storage::flat' --limit 16384
python3 ../tools/resource_guard.py frames \
--elf target/thumbv8m.main-none-eabihf/release/flat_store_bench \
--match flat_store_bench --limit 36864
# The same ceiling, on the **shipping image** — new with FS7.5-c1, because the app now links the
# flat store and the bench gates above cannot see it there.
#
# Two needles, because the frames land in two crates: `obc_storage::flat` is the store, and
# `flat_store` is the board's binding and storage task. The second one is where the largest frame
# in this image actually is — `flat_store::serve` at 10,688 B, which is `Store::commit`'s 9,984
# inlined into the task's out-of-line request handler — so a gate pointed only at the store would
# measure 6,336 and miss it. That is not hypothetical: this leg exists because the first build of
# the board mount had `FlatStore::mount` inlined into the board helper, which carried 22,656 B
# while the store's own needle read 6,336 and passed. `mount`/`mount_in_place` are
# `#[inline(never)]` now for exactly that reason, and these two needles are what says so.
#
# 16,384 is the bench's limit, deliberately: the same code, so the same ceiling — and the app has
# far less residual stack to spend it against (56,088 B since FS7.5-c2, 37,640 at c1) than the
# bench does.
#
# What keeps `mount_in_place` OUT OF LINE is not these needles — they only measure whichever
# symbols happen to exist. It is `boot_chain_roots` in resource_baseline.json:
# `resolve_symbol` raises a stale-root error when a baselined root stops being a symbol, which
# is exactly what inlining it away would do. These needles measure the frames; that check is
# what guarantees there is a frame here to measure at all.
- name: "obc-fw-nrf54l: flat store frame ceiling (shipping image)"
if: matrix.name == 'build (default = LS021/FLPR, release)'
working-directory: firmware/obc-fw-nrf54l
run: |
python3 ../tools/resource_guard.py frames \
--elf target/thumbv8m.main-none-eabihf/release/obc-fw-nrf54l \
--match 'obc_storage::flat' --limit 16384
python3 ../tools/resource_guard.py frames \
--elf target/thumbv8m.main-none-eabihf/release/obc-fw-nrf54l \
--match 'flat_store' --limit 16384
# The obc-boot bootloader (epic #615, #617): workspace-excluded like the board crate, built
# from its own directory so its .cargo/config.toml selects thumbv8m. No test harness and no
# FLPR blob (no RISC-V gcc needed). The size guard is the real gate: the shipping (default,
# no-rtt) release image's flash footprint — .vector_table + .text + .rodata + .data — must fit
# the 32 KB slot below the app (see firmware/obc-boot/memory.x), with the measured number in
# the failure so a regression is diagnosable from the log.
boot:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'boot')
runs-on: ubuntu-24.04
defaults:
run:
working-directory: firmware/obc-boot
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
# Preserve the boot crate's target-specific +strict-align Cargo configuration.
rustflags: ""
- uses: Swatinem/rust-cache@v2
with:
workspaces: firmware/obc-boot
key: thumbv8m-boot
- name: "obc-boot: clippy (default)"
run: cargo clippy --locked -- -D warnings
- name: "obc-boot: clippy (rtt)"
run: cargo clippy --locked --features rtt -- -D warnings
- name: "obc-boot: build (release)"
run: set -o pipefail; cargo build --release --locked -vv 2>&1 | tee "$RUNNER_TEMP/obc-boot-build.log"
- name: "obc-boot: 32 KB size guard"
run: |
python3 ../tools/resource_guard.py build-rustflags \
--log "$RUNNER_TEMP/obc-boot-build.log" --crate obc-boot
rustup component add llvm-tools
python3 ../tools/resource_guard.py boot \
--elf target/thumbv8m.main-none-eabihf/release/obc-boot
# std-creep guard for the real device: the shared no_std stack (obc-app pulls in reader /
# route / render) must still compile for the nRF54L's thumbv8m target.
device:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'device')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
key: thumbv8m
- name: cargo build -p obc-app (thumbv8m.main, nRF54L)
run: cargo build -p obc-app --target thumbv8m.main-none-eabihf --locked
# Keep the protocol-v4 engine and codec no_std; the fixture producer is host-only.
- name: cargo build -p obc-link (thumbv8m.main, nRF54L)
run: cargo build -p obc-link --target thumbv8m.main-none-eabihf --locked
- name: thumbv8m +strict-align backend probe
run: python3 firmware/tools/resource_guard.py strict-align
# Supply-chain gate: advisories + licenses + bans + sources, for both lockfiles (deny.toml).
deny:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'deny')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- name: cargo-deny (firmware workspace)
run: cargo deny --all-features --config tools/licenses/deny.toml check
- name: cargo-deny (obc-fw-nrf54l board crate)
run: cargo deny --manifest-path firmware/obc-fw-nrf54l/Cargo.toml --all-features --config tools/licenses/deny.toml check
- name: cargo-deny (obc-boot bootloader)
run: cargo deny --manifest-path firmware/obc-boot/Cargo.toml --all-features --config tools/licenses/deny.toml check
- name: cargo-deny (obc-sensor-sim)
run: cargo deny --manifest-path firmware/obc-sensor-sim/Cargo.toml --all-features --config tools/licenses/deny.toml check
# deny.toml skips the repository's own crates, so it cannot see obc-data reach one.
- name: obc-data depends on no GPL crate
run: python3 tools/check_obc_data_licence.py
# deny.toml gates which licences may enter the tree; THIRD-PARTY.md is the *text* those
# licences require us to hand over with a binary (#1149). Both belong to the same job:
# the dependency bump that changes one changes the other, and a stale notice file is only
# ever discovered at a release tag otherwise, where release.yml links it by tag.
# Pinned: the committed file is a byte-for-byte diff target, so a generator that changed
# its own formatting would fail this check with nothing wrong in the tree. Bump the pin
# and regenerate in the same commit.
- uses: taiki-e/install-action@v2
with:
tool: cargo-about@0.9.1
- name: THIRD-PARTY.md is current
run: tools/licenses/gen-third-party.sh --check
# The web demo (sim/web-demo) is the firmware's own render path compiled to wasm
# behind a thin JS-driven host; build it on PRs (not just on the deploy-to-Pages push) so a
# wasm-only breakage — bindgen surface, embedded assets, Trunk config — is caught before merge.
# (`ci.wasm-size` owns the Trunk build, so the plan starts this job for the demo's own inputs.)
wasm:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'wasm')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
key: wasm
- uses: taiki-e/install-action@v2
with:
tool: trunk@0.21.14
- name: trunk build (obc-web-demo → wasm)
run: trunk build --config docs/Trunk.toml
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install web demo browser runner
working-directory: sim/web-demo/tests/browser
run: |
npm ci
npx playwright install --with-deps chromium --only-shell
- name: Shipping web demo browser journey
id: browser-journey
run: npm test --prefix sim/web-demo/tests/browser
- name: Require browser journey execution
if: ${{ !cancelled() }}
env:
JOURNEY_OUTCOME: ${{ steps.browser-journey.outcome }}
run: test "$JOURNEY_OUTCOME" = success
- name: Upload web demo browser evidence
if: ${{ !cancelled() && (steps.browser-journey.outcome == 'success' || steps.browser-journey.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: web-demo-browser-${{ github.run_attempt }}
path: .artifacts/web-demo/
if-no-files-found: error
# The assembly engine (#1024) has to stay browser-shippable: P4 runs *this* code in a tab, so
# the library must carry no filesystem and no native dependency. Building it for wasm32 with
# the `cli` feature off is the guard — the CLI is the native driver and owns every std::fs call
# in the crate, so a stray `std::fs` in the engine fails here rather than in P4.
- name: cargo build -p obcm-assemble --lib (wasm32, engine only)
run: cargo build -p obcm-assemble --lib --no-default-features --locked --target wasm32-unknown-unknown
# Build the shared core, its test-device feature variant, the ground plan bridge and the parts
# bridge. Gate production bytes and run check 7 before handing the same artifacts to frontend
# tests and builds. The test device never ships.
wasm-bridges:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'wasm-bridges')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
key: wasm-bridges
- uses: taiki-e/install-action@v2
with:
tool: wasm-pack@0.15.0
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Build builder core, test device, ground plan and parts bridges
run: bash builder/build-wasm-bridges.sh
- name: Builder core size budget
run: python3 builder/wasm/wasm_size_guard.py
- name: Ground plan bridge size budget
run: python3 builder/wasm/wasm_size_guard.py --module ground-plan
- name: Parts bridge size budget
run: python3 builder/wasm/wasm_size_guard.py --module parts
# Every run: it writes the native digests that the browser jobs compare with the viewer's.
- name: Ground plan check 7, native and WASM bytes
run: bash builder/ground-plan-wasm/check-bytes.sh
- uses: actions/upload-artifact@v4
with:
name: obc-builder-bridge-pkg
path: builder/web/src/lib/core/pkg
retention-days: 1
- uses: actions/upload-artifact@v4
with:
name: obc-ground-plan-bridge-pkg
path: builder/web/src/lib/trailview/plan/pkg
retention-days: 1
- uses: actions/upload-artifact@v4
with:
name: obc-trailview-parts-bridge-pkg
path: builder/web/src/lib/trailview/structures/pkg
retention-days: 1
# The test device. No size budget: it ships to nobody and only the `web` job downloads it.
- uses: actions/upload-artifact@v4
with:
name: obc-flat-device-pkg
path: builder/web/test-support/flat-device/pkg
retention-days: 1
# Render the docs site (stdlib-only Python, no pip) and fail on error, plus the cross-page
# anchor audit AGENTS.md otherwise asks for by hand: every internal ../page/#anchor must
# resolve to a real heading id.
docs:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'docs')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
with:
just-version: "1.57.0"
- name: Documentation build and link check
run: just check-docs
# iOS companion, fast tier: the OBCKit package suite on the macOS host (no simulator).
# This is what enforces the architecture rules that are otherwise only "test-enforced"
# locally — CoreBluetoothSeamTests (CoreBluetooth stays inside OBCTransport/BLE/), the
# protocol vector/contract tests, and every model test.
#
# DEVELOPER_DIR pins the Xcode toolchain (project floor is Xcode 26.x, see
# companion-ios/README.md) so a runner-image update can't silently move it — when the
# image drops this version the job fails loudly and the pin gets bumped on purpose.
ios-unit:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'ios-unit')
runs-on: macos-26
env:
DEVELOPER_DIR: /Applications/Xcode_26.5.app
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Prepare replay assets
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.replay-camera') || contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'swift.obckit-host')
run: npm ci --prefix companion-ios/ReplayAssets
- name: Test camera engine
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.replay-camera')
run: npm test --prefix companion-ios/ReplayAssets
- uses: actions-rust-lang/setup-rust-toolchain@v1
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'swift.obckit-host')
with:
cache: false
- name: Pack the existing Rust host for package tests
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'swift.obckit-host')
run: tools/build-ios-host.sh --mac-only
- name: OBCKit package tests (XCTest and Swift Testing, host)
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'swift.obckit-host')
id: swift-tests
working-directory: companion-ios/Packages/OBCKit
run: |
rm -rf "$RUNNER_TEMP/ios-unit.xcresult" "$GITHUB_WORKSPACE/.artifacts/ios-unit"
mkdir -p "$GITHUB_WORKSPACE/.artifacts/ios-unit"
xcodebuild -version > "$GITHUB_WORKSPACE/.artifacts/ios-unit/toolchain.txt"
swift --version >> "$GITHUB_WORKSPACE/.artifacts/ios-unit/toolchain.txt"
xcodebuild test -scheme OBCKit-Package -destination 'platform=macOS' -parallel-testing-enabled NO -enableCodeCoverage NO -resultBundlePath "$RUNNER_TEMP/ios-unit.xcresult" CODE_SIGNING_ALLOWED=NO
- name: Export native XCTest and Swift Testing results
if: ${{ !cancelled() && (steps.swift-tests.outcome == 'success' || steps.swift-tests.outcome == 'failure') }}
run: |
xcrun xcresulttool get test-results summary --path "$RUNNER_TEMP/ios-unit.xcresult" > .artifacts/ios-unit/test-summary.json
xcrun xcresulttool get test-results tests --path "$RUNNER_TEMP/ios-unit.xcresult" > .artifacts/ios-unit/tests.json
- name: Upload native Swift results
if: ${{ !cancelled() && (steps.swift-tests.outcome == 'success' || steps.swift-tests.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: ios-tests-coverage-${{ github.run_attempt }}
path: |
${{ runner.temp }}/ios-unit.xcresult
.artifacts/ios-unit/
if-no-files-found: error
- name: Planner PMTiles reader
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'planner.native-tiles')
id: planner-tiles
shell: bash
run: bash companion-ios/PlannerNative/test-tiles.sh 2>&1 | tee "$RUNNER_TEMP/planner-tiles.log"
- name: Upload planner PMTiles results
if: ${{ !cancelled() && (steps.planner-tiles.outcome == 'success' || steps.planner-tiles.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: planner-tiles-${{ github.run_attempt }}
path: ${{ runner.temp }}/planner-tiles.log
if-no-files-found: error
# iOS app builds and companion screenshots.
# The screenshot suite builds its UI-test bundle once, then runs test-without-building.
# Each build and capture follows the selected suite IDs. The companion Debug build also
# runs for screenshot-only changes because the capture needs its app and test bundle.
ios-app:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'ios-app')
runs-on: macos-26
env:
DEVELOPER_DIR: /Applications/Xcode_26.5.app
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install XcodeGen
run: brew install xcodegen
- name: Install WebP tools
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.xcuitest')
run: brew install webp
# Xcode resolves the selected target's Rust framework before its script phases run.
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
key: ios-host
- name: Start the screenshot simulator
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.xcuitest')
run: companion-ios/scripts/capture-website-screenshots.sh --boot
- name: Pack the iOS host (simulator slice)
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ci.ios-device-build') || contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ci.ios-app-build') || contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.xcuitest')
run: tools/build-ios-host.sh --sim-only
- name: xcodegen generate
working-directory: companion-ios
run: xcodegen generate
# build-for-testing, not build: the same pass produces the app and the
# OBCCompanionUITests bundle the screenshot step runs.
- name: Build (Debug, simulator SDK)
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ci.ios-app-build') || contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.xcuitest')
working-directory: companion-ios
run: |
xcodebuild build-for-testing -project OBCCompanion.xcodeproj -scheme OBCCompanion \
-configuration Debug -destination 'generic/platform=iOS Simulator' \
-derivedDataPath DerivedData CODE_SIGNING_ALLOWED=NO
# -r -a over the whole bundle: in Debug the app code lives in the debug dylib
# (OBCCompanion.debug.dylib), not the stub executable; -a forces byte matching in
# binaries regardless of grep flavor.
- name: Mock marker present in Debug
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ci.ios-app-build') || contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.xcuitest')
working-directory: companion-ios
run: grep -raq "OBCMock:DEBUG-only" DerivedData/Build/Products/Debug-iphonesimulator/OBCCompanion.app
- name: Build OBCDevice (Debug, simulator SDK)
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ci.ios-device-build')
working-directory: companion-ios
run: |
xcodebuild build -project OBCCompanion.xcodeproj -scheme OBCDevice \
-configuration Debug -destination 'generic/platform=iOS Simulator' \
-derivedDataPath DerivedData CODE_SIGNING_ALLOWED=NO
- name: Companion website screenshots are current
if: contains(fromJSON(needs.selection.outputs.plan).selected_suite_ids, 'ios.xcuitest')
id: ios-screenshots
env:
OBC_DERIVED_DATA_PATH: ${{ github.workspace }}/companion-ios/DerivedData
OBC_XCRESULT_PATH: ${{ runner.temp }}/ios-screenshots.xcresult
run: companion-ios/scripts/capture-website-screenshots.sh --check
- name: Upload native screenshot results
if: ${{ !cancelled() && (steps.ios-screenshots.outcome == 'success' || steps.ios-screenshots.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: ios-screenshots-${{ github.run_attempt }}
path: ${{ runner.temp }}/ios-screenshots.xcresult
if-no-files-found: error
# The Release half of the mock-seam gate: mock and developer-panel code must never ship.
# It shares no build output with `ios-app` — a different configuration writes a different
# products directory — so it runs beside it instead of adding four minutes to the wall clock.
ios-release:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'ios-release')
runs-on: macos-26
env:
DEVELOPER_DIR: /Applications/Xcode_26.5.app
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install XcodeGen
run: brew install xcodegen
- uses: actions-rust-lang/setup-rust-toolchain@v1