-
Notifications
You must be signed in to change notification settings - Fork 137
1405 lines (1242 loc) · 50.9 KB
/
Copy pathci.yml
File metadata and controls
1405 lines (1242 loc) · 50.9 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
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
windows_runtime_smoke:
description: Run native Windows runtime smoke checks
required: false
default: false
type: boolean
windows_package_smoke:
description: Run the Windows release package preflight
required: false
# Ordinary main pushes intentionally skip Windows package qualification;
# release qualification and v* tags enable it.
default: false
type: boolean
release_qualification:
description: Run the release-only delta after proving an exact fast main run
required: false
default: false
type: boolean
fast_run_id:
description: Exact successful main push CI run consumed by release qualification
required: false
default: ""
type: string
expected_source_sha:
description: Exact lowercase main SHA shared by the fast run and candidate
required: false
default: ""
type: string
release_intent_id:
description: Unique non-secret identifier for this candidate decision
required: false
default: ""
type: string
planned_release_ref:
description: Planned signed annotated tag, without creating it
required: false
default: ""
type: string
release_kind:
description: Non-authoritative candidate channel
required: false
default: shadow
type: choice
options: [shadow, rc, stable]
permissions:
contents: read
concurrency:
group: ${{ github.event_name == 'workflow_dispatch' && inputs.release_qualification && 'rmux-release-candidate' || format('rmux-ci-{0}', github.run_id) }}
cancel-in-progress: false
env:
CARGO_INCREMENTAL: "0"
CARGO_HTTP_MULTIPLEXING: "false"
CARGO_TERM_COLOR: always
RUSTUP_MAX_RETRIES: "10"
RUSTDOCFLAGS: -D warnings
TMPDIR: /tmp
RMUX_TMPDIR: /tmp
jobs:
verify-fast-evidence:
name: Verify exhaustive fast evidence
if: github.event_name == 'workflow_dispatch' && inputs.release_qualification
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
actions: read
contents: read
env:
CANDIDATE_EXPECTED_SOURCE_SHA: ${{ inputs.expected_source_sha }}
CANDIDATE_FAST_RUN_ID: ${{ inputs.fast_run_id }}
CANDIDATE_RELEASE_INTENT_ID: ${{ inputs.release_intent_id }}
CANDIDATE_PLANNED_RELEASE_REF: ${{ inputs.planned_release_ref }}
CANDIDATE_RELEASE_KIND: ${{ inputs.release_kind }}
outputs:
fast_nextest_artifact_digest: ${{ steps.fast-nextest.outputs.artifact_digest }}
fast_nextest_artifact_id: ${{ steps.fast-nextest.outputs.artifact_id }}
steps:
- name: Reject untrusted candidate inputs before checkout
shell: bash
run: |
set -euo pipefail
[[ "$CANDIDATE_EXPECTED_SOURCE_SHA" =~ ^[0-9a-f]{40}$ ]]
[[ "$CANDIDATE_FAST_RUN_ID" =~ ^[1-9][0-9]*$ ]]
[[ "$CANDIDATE_RELEASE_INTENT_ID" =~ ^[A-Za-z0-9._:-]{8,128}$ ]]
[[ "$CANDIDATE_PLANNED_RELEASE_REF" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$ ]]
[[ "$CANDIDATE_RELEASE_KIND" =~ ^(shadow|rc|stable)$ ]]
test "$GITHUB_REF" = refs/heads/main
test "$GITHUB_RUN_ATTEMPT" = 1
test "$GITHUB_SHA" = "$CANDIDATE_EXPECTED_SOURCE_SHA"
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
ref: ${{ github.sha }}
persist-credentials: false
- name: Validate immutable candidate intent
run: >-
scripts/release/validate-candidate-intent.py
--expected-source-sha "$CANDIDATE_EXPECTED_SOURCE_SHA"
--actual-source-sha "$(git rev-parse HEAD)"
--fast-run-id "$CANDIDATE_FAST_RUN_ID"
--release-intent-id "$CANDIDATE_RELEASE_INTENT_ID"
--planned-release-ref "$CANDIDATE_PLANNED_RELEASE_REF"
--release-kind "$CANDIDATE_RELEASE_KIND"
--github-ref "$GITHUB_REF"
--github-run-attempt "$GITHUB_RUN_ATTEMPT"
--output candidate-intent.json
- name: Verify the selected fast run and all of its jobs
env:
GH_TOKEN: ${{ github.token }}
run: >-
scripts/release/verify-fast-run.py
--repository "${{ github.repository }}"
--run-id "$CANDIDATE_FAST_RUN_ID"
--expected-source-sha "$CANDIDATE_EXPECTED_SOURCE_SHA"
--kind fast
> fast-proof.json
- id: fast-nextest
name: Resolve the exact fast Windows test archive
env:
GH_TOKEN: ${{ github.token }}
run: >-
scripts/release/actions-artifact.py resolve
--repository "$GITHUB_REPOSITORY"
--run-id "$CANDIDATE_FAST_RUN_ID"
--name "rmux-windows-nextest-$CANDIDATE_EXPECTED_SOURCE_SHA"
--expected-source-sha "$CANDIDATE_EXPECTED_SOURCE_SHA"
--github-output "$GITHUB_OUTPUT"
> fast-nextest-artifact.json
- name: Upload immutable input proofs
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: rmux-fast-proof-${{ inputs.expected_source_sha }}
path: |
candidate-intent.json
fast-nextest-artifact.json
fast-proof.json
if-no-files-found: error
retention-days: 7
release-candidate-delta:
name: Run release-only candidate delta
if: github.event_name == 'workflow_dispatch' && inputs.release_qualification
needs: verify-fast-evidence
uses: ./.github/workflows/release-candidate-delta.yml
with:
expected_source_sha: ${{ inputs.expected_source_sha }}
fast_run_id: ${{ inputs.fast_run_id }}
permissions:
actions: read
contents: read
release-candidate-delta-gate:
name: Release candidate delta gate
if: >-
always() && github.event_name == 'workflow_dispatch' &&
inputs.release_qualification
needs: [verify-fast-evidence, release-candidate-delta]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Require proof and every delta
env:
DELTA_RESULT: ${{ needs.release-candidate-delta.result }}
FAST_PROOF_RESULT: ${{ needs.verify-fast-evidence.result }}
run: |
test "$FAST_PROOF_RESULT" = success
test "$DELTA_RESULT" = success
release-canonical-native:
name: Build canonical native artifacts
if: github.event_name == 'workflow_dispatch' && inputs.release_qualification
needs: verify-fast-evidence
uses: ./.github/workflows/canonical-native-build.yml
with:
expected_source_sha: ${{ inputs.expected_source_sha }}
fast_run_id: ${{ inputs.fast_run_id }}
fast_nextest_artifact_id: ${{ needs.verify-fast-evidence.outputs.fast_nextest_artifact_id }}
fast_nextest_artifact_digest: ${{ needs.verify-fast-evidence.outputs.fast_nextest_artifact_digest }}
release_intent_id: ${{ inputs.release_intent_id }}
planned_release_ref: ${{ inputs.planned_release_ref }}
release_kind: ${{ inputs.release_kind }}
permissions:
actions: read
attestations: write
contents: read
id-token: write
release-candidate-gate:
name: Release candidate gate
if: >-
always() && github.event_name == 'workflow_dispatch' &&
inputs.release_qualification
needs: [release-candidate-delta-gate, release-canonical-native]
runs-on: ubuntu-22.04
timeout-minutes: 5
permissions: {}
steps:
- name: Require release delta and every canonical byte
env:
CANONICAL_RESULT: ${{ needs.release-canonical-native.result }}
DELTA_RESULT: ${{ needs.release-candidate-delta-gate.result }}
run: |
test "$DELTA_RESULT" = success
test "$CANONICAL_RESULT" = success
linux-quality:
name: Linux format, lint, and docs
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
RUST_MIN_STACK: "8388608"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
components: clippy, rustfmt
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Await-under-lock audit
run: scripts/audit-await-holding-lock.sh
- name: rustdoc with warnings denied
run: cargo doc --workspace --locked --no-deps
linux-build:
name: Linux workspace build
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
RUST_MIN_STACK: "8388608"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: cargo build
run: cargo build --workspace --locked
wasm-crypto:
name: WASM crypto build and supply-chain gate
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
# Pin the exact rustc that reproduces the shipped browser blob (mirrored
# in rmux-web-share PROVENANCE.json toolchain.rustc). A floating "stable"
# changes codegen and would break byte-for-byte reproducibility — the
# property rmux-web-share's verify-wasm-from-source.mjs gate enforces.
toolchain: "1.94.1"
targets: wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Fetch locked dependencies
run: cargo fetch --locked
# The browser bundle must NOT carry x25519-dalek/curve25519-dalek; the
# WebCrypto path replaces them. cargo tree -i exits non-zero when the
# package is absent, so success here means it leaked — fail closed.
- name: Assert x25519-dalek is excluded from the WASM build
run: |
if cargo tree -p rmux-web-crypto --no-default-features --features wasm --target wasm32-unknown-unknown -i x25519-dalek >/dev/null 2>&1; then
echo "::error::x25519-dalek must not enter the WASM crypto build"
exit 1
fi
echo "x25519-dalek correctly excluded from the WASM crypto build"
# Regression guard for the browser test gate: the wasm-test feature set must
# compile its test targets (tests/handshake.rs is x25519-gated out).
- name: Compile the wasm-test gate
run: cargo test -p rmux-web-crypto --no-default-features --features wasm-test --no-run --locked
- name: Install pinned wasm-pack
run: cargo install wasm-pack --version 0.13.1 --locked
# Rebuild the exact blobs rmux-web-share ships, via the canonical recipe and
# pinned toolchain, and publish them as an artifact for manual auditors. The
# authoritative byte-equality-to-shipped check is cross-repo, in
# rmux-web-share's verify-wasm-from-source.mjs (which rebuilds from this
# source at the pinned commit); here we prove the recipe still produces the
# browser primitive and expose the canonical bytes + their hashes.
- name: Build and publish the browser WASM blobs
env:
RUSTUP_TOOLCHAIN: "1.94.1"
run: |
set -euo pipefail
scripts/build-web-crypto-wasm.sh wasm
mkdir -p "$RUNNER_TEMP/wasm-pkg"
cp crates/rmux-web-crypto/pkg/rmux_web_crypto_wasm_bg.wasm \
crates/rmux-web-crypto/pkg/rmux_web_crypto_wasm.js \
"$RUNNER_TEMP/wasm-pkg/"
# The Playwright-only blob shares the recipe; build it too so a break in
# the test feature set is caught here, not in rmux-web-share CI.
scripts/build-web-crypto-wasm.sh wasm-test
{
echo "### Browser WASM crypto blob (production)"
echo ""
echo "rustc 1.94.1 · wasm-bindgen 0.2.123 · wasm-opt off"
echo ""
echo '```'
( cd "$RUNNER_TEMP/wasm-pkg" && sha256sum rmux_web_crypto_wasm_bg.wasm rmux_web_crypto_wasm.js )
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: rmux-web-crypto-wasm
path: ${{ runner.temp }}/wasm-pkg
if-no-files-found: error
linux-tests:
name: Linux tests (${{ matrix.group }})
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- group: core
packages: -p rmux-types -p rmux-os -p rmux-proto -p rmux-ipc -p rmux-core -p rmux-client -p rmux-render-core -p rmux-web-crypto
- group: pty-sdk
packages: -p rmux-pty -p rmux-sdk
- group: server
packages: -p rmux-server
- group: app-ui
packages: -p rmux -p ratatui-rmux -p xtask
env:
RUST_MIN_STACK: "8388608"
RUST_TEST_THREADS: "1"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ matrix.group }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ matrix.group }}-
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: cargo test
run: cargo test --locked --no-fail-fast ${{ matrix.packages }}
linux-source-gates:
name: Linux source boundary gates
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install the release writer Python baseline
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: "3.10"
- name: Validate release writers on Python 3.10
run: |
set -euo pipefail
for script in \
channel-execution.py \
prepare-channel-retry.py \
publish-crate-set.py \
publish-linux-repository.py \
publish-owned-repository.py \
snap-candidate-status.py; do
python "scripts/release/$script" --help >/dev/null
done
- name: Unsafe policy gate
run: scripts/unsafe-check.sh
- name: No network scoped runtime source scan
run: scripts/no-network-in-runtime.sh
- name: Platform neutrality source scan
run: scripts/check-platform-neutrality.sh
- name: No side effects in debug assertions
run: scripts/no-debug-assert-side-effects.sh
tmux-oracle-linux:
name: Linux tmux 3.7b oracle harness
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 120
env:
RUST_MIN_STACK: "8388608"
RMUX_REQUIRE_TMUX: "1"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Install tmux oracle build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
bison \
build-essential \
ca-certificates \
curl \
libevent-dev \
libncurses-dev \
libutf8proc-dev \
pkg-config
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Cache tmux oracle source
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: ~/.cache/rmux-oracle
key: tmux-oracle-3.7b-87f2e99e3b685973f2ca002ffd6ed7e51a5744f7009daae5a15670b6d532db96
- name: Build pinned tmux 3.7b oracle
run: scripts/oracle/build-tmux37.sh --prefix "$RUNNER_TEMP/rmux-oracle"
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: Source-file oracle must not skip
env:
RMUX_FROZEN_TMUX: ${{ runner.temp }}/rmux-oracle/tmux
run: cargo test --locked --test unix_source_file_tmux_oracle -- --test-threads=1
- name: Differential harness oracle self-tests
env:
RMUX_FROZEN_TMUX: ${{ runner.temp }}/rmux-oracle/tmux
run: cargo test --locked --test tmux_compat_harness -- --test-threads=1
- name: Upload exact tmux oracle for release delta
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: rmux-tmux-oracle-${{ github.sha }}
path: |
${{ runner.temp }}/rmux-oracle/tmux
${{ runner.temp }}/rmux-oracle/tmux.reference
if-no-files-found: error
retention-days: 7
compression-level: 0
release-review-perf:
name: Release review (perf)
if: startsWith(github.ref, 'refs/tags/v')
needs: windows-tests-gate
runs-on: ubuntu-latest
timeout-minutes: 90
env:
RUST_MIN_STACK: "8388608"
CARGO_BUILD_JOBS: "4"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: Release review performance section
env:
RMUX_PERF_AUTO_CURRENT: "1"
RMUX_PERF_GATE_MODE: portable-budget
RMUX_PERF_EXPECTED_GIT_SHA: ${{ github.sha }}
RMUX_PERF_EXPECTED_PLATFORM: linux
RMUX_PERF_EXPECTED_PROVENANCE: github-actions:${{ github.repository }}:${{ github.workflow }}:${{ github.job }}:perf:${{ github.run_id }}:${{ github.run_attempt }}
RMUX_PERF_MAX_CURRENT_AGE_SECONDS: "21600"
run: >-
scripts/release-review-gate.sh
--skip-package
--section perf
--target-dir target/release-review-ci-perf
release-review-sections:
name: Release review (${{ matrix.section }})
if: startsWith(github.ref, 'refs/tags/v')
needs: [linux-source-gates, windows-tests-gate]
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
max-parallel: 6
matrix:
section: [static, lint, server, cli, tmux, runtime-sdk]
env:
RUST_MIN_STACK: "8388608"
CARGO_BUILD_JOBS: "4"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
components: clippy, rustfmt
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ matrix.section }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ matrix.section }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: Install tmux oracle build dependencies
if: matrix.section == 'tmux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
bison \
build-essential \
ca-certificates \
curl \
libevent-dev \
libncurses-dev \
libutf8proc-dev \
pkg-config
- name: Build pinned tmux 3.7b oracle
if: matrix.section == 'tmux'
run: scripts/oracle/build-tmux37.sh --prefix "$RUNNER_TEMP/rmux-oracle"
- name: Release review section
env:
RMUX_FROZEN_TMUX: ${{ runner.temp }}/rmux-oracle/tmux
RMUX_REQUIRE_TMUX: "1"
RMUX_PERF_AUTO_CURRENT: "1"
RMUX_PERF_GATE_MODE: portable-budget
RMUX_PERF_EXPECTED_GIT_SHA: ${{ github.sha }}
RMUX_PERF_EXPECTED_PLATFORM: linux
RMUX_PERF_EXPECTED_PROVENANCE: github-actions:${{ github.repository }}:${{ github.workflow }}:${{ github.job }}:${{ matrix.section }}:${{ github.run_id }}:${{ github.run_attempt }}
RMUX_PERF_MAX_CURRENT_AGE_SECONDS: "21600"
run: >-
scripts/release-review-gate.sh
--skip-package
--section ${{ matrix.section }}
--target-dir target/release-review-ci-${{ matrix.section }}
release-review-gate:
name: Release review gate (no package)
if: >-
always() &&
startsWith(github.ref, 'refs/tags/v')
needs: [release-review-perf, release-review-sections]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Require every release review section
env:
RELEASE_REVIEW_PERF_RESULT: ${{ needs.release-review-perf.result }}
RELEASE_REVIEW_RESULT: ${{ needs.release-review-sections.result }}
run: |
test "$RELEASE_REVIEW_PERF_RESULT" = success
test "$RELEASE_REVIEW_RESULT" = success
snap-package:
name: Snap package smoke
if: startsWith(github.ref, 'refs/tags/v')
needs: windows-tests-gate
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Build snap
id: snapcraft
uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79
with:
path: .
- name: Smoke snap package
run: scripts/smoke-snap-package.sh "${{ steps.snapcraft.outputs.snap }}"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: rmux-snap-${{ github.sha }}
path: ${{ steps.snapcraft.outputs.snap }}
if-no-files-found: error
nix-flake:
name: Nix flake gate
if: startsWith(github.ref, 'refs/tags/v')
needs: windows-tests-gate
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: nix flake check
run: nix flake check
- name: nix build
run: nix build .#packages.x86_64-linux.default --no-link
- name: nix run version matches Cargo.toml
run: |
set -euo pipefail
expected="$(python3 - <<'PY'
import pathlib
import tomllib
manifest = tomllib.loads(pathlib.Path("Cargo.toml").read_text())
print(manifest["workspace"]["package"]["version"])
PY
)"
actual="$(nix run . -- -V)"
if [ "$actual" != "rmux $expected" ]; then
echo "::error::expected 'rmux $expected', got '$actual'"
exit 1
fi
linux-sdk-smoke:
name: Linux SDK v1 daemon smoke
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
RUST_MIN_STACK: "8388608"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-
cargo-${{ runner.os }}-${{ runner.arch }}-
- name: SDK v1 daemon smoke
run: scripts/smoke-sdk-v1.sh
linux-perf-smoke:
name: Linux non-final performance smoke
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 120
env:
RUST_MIN_STACK: "8388608"
RMUX_PERF_EXPECTED_GIT_SHA: ${{ github.sha }}
RMUX_PERF_EXPECTED_PLATFORM: linux
RMUX_PERF_EXPECTED_PROVENANCE: github-actions:${{ github.repository }}:${{ github.workflow }}:${{ github.job }}:${{ github.run_id }}:${{ github.run_attempt }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
# Intentionally uncached: historical multi-gigabyte restore/save costs
# exceeded the compile-time benefit, so this required budget stays cold.
- name: Non-final local performance budget smoke
run: scripts/perf-bench.sh --iterations 3 --line-count 10000 --output-dir target/perf/non-final-ci --fail-on-budget
- name: Issue 34 responsiveness smoke
env:
RMUX_BIN: target/release/rmux
run: scripts/smoke-issue34-responsiveness-unix.sh
- name: RSS and FD drift smoke
env:
RMUX_BIN: target/release/rmux
run: scripts/smoke-rss-fd-drift-unix.sh
linux-dependency-audit:
name: Linux dependency audit
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/bin/cargo-deny
~/.cargo/git
~/.cargo/registry
key: cargo-deny-${{ runner.os }}-${{ runner.arch }}-0.19.5-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-deny-${{ runner.os }}-${{ runner.arch }}-0.19.5-
- name: Install cargo-deny
if: hashFiles('deny.toml') != ''
run: |
if ! command -v cargo-deny >/dev/null 2>&1; then
cargo install cargo-deny --version 0.19.5 --locked
fi
- name: cargo deny check
if: hashFiles('deny.toml') != ''
run: cargo deny check
platform-runtime:
name: Platform build and smoke on ${{ matrix.os }}
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
os:
- macos-15-intel
- macos-15
env:
RUST_MIN_STACK: "8388608"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ matrix.os }}-platform-runtime-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ matrix.os }}-platform-runtime-
- name: Configure temporary paths
shell: bash
run: |
echo "TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"
echo "RMUX_TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: cargo build
run: cargo build --workspace --locked
# These crates passed repeated parallel-safe runs; keep rmux-client and
# suites with shared socket or process state serial below.
- name: cargo test parallel-safe portable crates
run: cargo test --locked --no-fail-fast -p rmux-types -p rmux-os -p rmux-proto -p rmux-ipc -p rmux-core
- name: cargo test rmux-client serially
run: cargo test --locked --no-fail-fast -p rmux-client -- --test-threads=1
- name: cargo test macOS direct /tmp socket path
if: runner.os == 'macOS'
run: cargo test --locked -p rmux --test cli_surface socket_path_flag_can_start_directly_under_tmp -- --exact --test-threads=1
- name: rmux binary smoke
run: cargo run --package rmux --bin rmux --locked -- -V
windows-test-archive:
name: Windows workspace test archive
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: windows-latest
timeout-minutes: 30
outputs:
cache_hit: ${{ steps.archive-cache.outputs.cache-hit }}
env:
CARGO_PROFILE_TEST_DEBUG: "0"
RUST_MIN_STACK: "8388608"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Restore reusable Windows test archive
id: archive-cache
continue-on-error: true
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: target/windows-nextest.tar.zst
key: windows-nextest-${{ runner.os }}-${{ github.sha }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
if: steps.archive-cache.outputs.cache-hit != 'true'
with:
toolchain: "1.96.1"
- name: Tolerate unavailable Windows revocation servers
if: steps.archive-cache.outputs.cache-hit != 'true'
shell: pwsh
run: |
$curlHome = Join-Path $env:RUNNER_TEMP "rmux-curl"
New-Item -ItemType Directory -Force -Path $curlHome | Out-Null
"ssl-revoke-best-effort" |
Set-Content -LiteralPath (Join-Path $curlHome ".curlrc") -Encoding ascii
"CURL_HOME=$curlHome" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install cargo-nextest
if: steps.archive-cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2.83.0
with:
tool: nextest@0.9.138
fallback: none
- name: Restore cargo cache
if: steps.archive-cache.outputs.cache-hit != 'true'
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-windows-latest-nextest-archive-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-windows-latest-nextest-archive-
cargo-windows-latest-platform-runtime-
- name: Configure temporary paths
if: steps.archive-cache.outputs.cache-hit != 'true'
shell: bash
run: |
echo "TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"
echo "RMUX_TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"
- name: Fetch locked dependencies
if: steps.archive-cache.outputs.cache-hit != 'true'
run: cargo fetch --locked
- name: Build Windows test archive
if: steps.archive-cache.outputs.cache-hit != 'true'
run: cargo nextest archive --workspace --locked --archive-file target/windows-nextest.tar.zst
- name: Bind the Windows test archive bytes
shell: pwsh
run: |
$archive = "target/windows-nextest.tar.zst"
if (-not (Test-Path -LiteralPath $archive -PathType Leaf)) {
throw "Windows Nextest archive is missing"
}
$digest = (Get-FileHash -Algorithm SHA256 -LiteralPath $archive).Hash.ToLowerInvariant()
[System.IO.File]::WriteAllText(
"$archive.sha256",
"$digest windows-nextest.tar.zst`n",
[System.Text.Encoding]::ASCII
)
- name: Upload Windows test archive
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: rmux-windows-nextest-${{ github.sha }}
path: |
target/windows-nextest.tar.zst
target/windows-nextest.tar.zst.sha256
if-no-files-found: error
retention-days: 7
compression-level: 0
windows-test-build:
name: Windows build, lint, docs, and smoke
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.release_qualification) }}
runs-on: windows-latest
timeout-minutes: 60
env:
RUST_MIN_STACK: "8388608"
RUST_TEST_THREADS: "1"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "1.96.1"
components: clippy
- name: Cache cargo