-
-
Notifications
You must be signed in to change notification settings - Fork 45
2226 lines (2160 loc) · 114 KB
/
Copy pathrelease.yml
File metadata and controls
2226 lines (2160 loc) · 114 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: Release
# Builds, signs, notarizes, and publishes a Dory release on manual dispatch.
# Start public releases only through: scripts/dory-release.sh publish VERSION
#
# Required repository secrets:
# DEVELOPER_ID_CERT_P12_BASE64 base64 of your "Developer ID Application" .p12
# DEVELOPER_ID_CERT_PASSWORD the .p12 export password
# KEYCHAIN_PASSWORD any string, used for the throwaway CI keychain
# NOTARY_APPLE_ID Apple ID email for notarytool
# NOTARY_TEAM_ID Apple Developer Team ID
# NOTARY_APPLE_PASSWORD app-specific password for that Apple ID
# SPARKLE_PRIVATE_KEY Sparkle EdDSA private key from generate_keys/sign_update
# SPARKLE_ED_PRIVATE_KEY accepted legacy secret-name fallback
# HOMEBREW_TAP_DEPLOY_KEY Ed25519 private deploy key with write access only to
# Augani/homebrew-dory
# DORY_LAN_PEER_SSH noninteractive SSH peer on the physical LAN
# DORY_LAN_HOST_IPV4 release Mac's physical-LAN IPv4 address
# DORY_TAILSCALE_PEER_SSH noninteractive SSH peer over Tailscale
# DORY_TAILSCALE_HOST_IPV4 release Mac's Tailscale IPv4 address
# Required repository variable:
# DORY_SOURCE_GATE_IMAGE digest-pinned image containing python3
# DORY_RELEASE_ALPINE_IMAGE digest-pinned Alpine fixture used by every release smoke/soak
# DORY_RELEASE_NONNATIVE_BUILD_IMAGE digest-pinned amd64 Node/Alpine BuildKit fixture
# DORY_RELEASE_SSH_CLIENT_IMAGE digest-pinned Apple-silicon fixture containing sh and ssh-add
# DORY_EXTERNAL_VOLUME_TEST_ROOT dedicated writable directory on external APFS release media;
# its volume root must contain .dory-release-external-volume with the exact contents
# DORY-DEDICATED-RELEASE-APFS-V1, authorizing the gate to unmount/remount that whole volume
# DORY_CORPORATE_DNS_SERVER resolver address active only through the release VPN
# DORY_CORPORATE_VPN_PROBE_HOST internal split-DNS HTTPS endpoint hostname
# DORY_CORPORATE_VPN_PROBE_URL HTTPS URL on that exact internal hostname
# DORY_TAILSCALE_EXIT_NODE real exit-node hostname/IP used for route churn certification
# DORY_RELEASE_ECR_REGISTRY ACCOUNT.dkr.ecr.REGION.amazonaws.com test registry
# DORY_RELEASE_ECR_REPOSITORY pre-created disposable retry-test repository
# DORY_RELEASE_ECR_REGION AWS region containing that repository
# DORY_RELEASE_AWS_ROLE_ARN GitHub-OIDC role scoped to the disposable ECR repository
# DORY_BENCH_IPERF_IMAGE digest-pinned arm64 iperf3 fixture
# DORY_BENCH_NODE_IMAGE digest-pinned arm64 Node/Corepack fixture
# DORY_BENCH_POSTGRES_IMAGE digest-pinned arm64 PostgreSQL fixture
# DORY_BENCH_REDIS_IMAGE digest-pinned arm64 Redis fixture
# DORY_BENCH_RUBY_IMAGE digest-pinned arm64 Ruby/Bundler fixture
# DORY_BENCH_COMPOSER_IMAGE digest-pinned arm64 Composer/PHP fixture
# DORY_BENCH_CURL_IMAGE digest-pinned arm64 curl fixture
# DORY_BENCH_PROBE_URL credential-free controlled HTTPS probe
# DORY_BENCH_DOWNLOAD_URL credential-free controlled fixed-byte HTTPS payload
# DORY_BENCH_DOWNLOAD_BYTES exact payload byte count
#
# NOTE: Dory.app targets macOS 14+ and the public production track is Apple Silicon first.
# Intel jobs are roadmap-only and never block or contribute artifacts to the public release.
# The full bundle includes a built-in engine on macOS 14+: Sonoma uses the bundled
# Virtualization.framework dory-vmm tier, while supported macOS 15+ hosts use dory-hv.
# Guest kernels/initfs are rebuilt from this commit in architecture-native jobs and passed to the
# release jobs as same-run artifacts. A checkout never relies on ignored/stale guest/out files.
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g. 0.1.0)'
required: true
type: string
build:
description: 'Monotonic CURRENT_PROJECT_VERSION to release (e.g. 52)'
required: true
type: string
permissions:
contents: read
concurrency:
group: dory-public-release
cancel-in-progress: false
jobs:
release-metadata:
name: Validate authoritative release version and build
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
version: ${{ steps.identity.outputs.version }}
build: ${{ steps.identity.outputs.build }}
previous_version: ${{ steps.identity.outputs.previous_version }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
- name: Prove project identity and monotonic build before artifact work
id: identity
env:
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_BUILD: ${{ inputs.build }}
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
test "$GITHUB_REF" = refs/heads/main || {
echo "Manual public releases must run from main, not $GITHUB_REF" >&2
exit 1
}
printf '%s\n' "$RELEASE_VERSION" \
| grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$' || {
echo "release version must be a stable semantic version" >&2
exit 1
}
printf '%s\n' "$RELEASE_BUILD" | grep -Eq '^[1-9][0-9]*$' || {
echo "release build must be a positive integer" >&2
exit 1
}
git fetch --force --tags origin main
test "$GITHUB_SHA" = "$(git rev-parse origin/main)" || {
echo "Release commit $GITHUB_SHA is not the exact current origin/main commit" >&2
exit 1
}
if git show-ref --verify --quiet "refs/tags/v$RELEASE_VERSION"; then
echo "release tag v$RELEASE_VERSION already exists" >&2
exit 1
fi
release_status="$(curl -sS --retry 3 --retry-delay 2 --connect-timeout 15 --max-time 60 \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-o "$RUNNER_TEMP/requested-release.json" -w '%{http_code}' \
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/v$RELEASE_VERSION")"
case "$release_status" in
404) ;;
200) echo "release v$RELEASE_VERSION already exists" >&2; exit 1 ;;
*) echo "could not prove release v$RELEASE_VERSION is absent (GitHub HTTP $release_status)" >&2; exit 1 ;;
esac
python3 .github/scripts/verify-release-identity.py \
--repository "$GITHUB_REPOSITORY" \
--project Dory.xcodeproj/project.pbxproj \
--version "$RELEASE_VERSION" \
--build "$RELEASE_BUILD" \
--github-output "$GITHUB_OUTPUT"
release-configuration:
name: Required release credentials and tap access
needs: release-metadata
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
id-token: write
env:
DEVELOPER_ID_CERT_P12_BASE64: ${{ secrets.DEVELOPER_ID_CERT_P12_BASE64 }}
DEVELOPER_ID_CERT_PASSWORD: ${{ secrets.DEVELOPER_ID_CERT_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
NOTARY_APPLE_ID: ${{ secrets.NOTARY_APPLE_ID }}
NOTARY_APPLE_PASSWORD: ${{ secrets.NOTARY_APPLE_PASSWORD }}
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY || secrets.SPARKLE_ED_PRIVATE_KEY }}
HOMEBREW_TAP_DEPLOY_KEY: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }}
DORY_LAN_PEER_SSH: ${{ secrets.DORY_LAN_PEER_SSH }}
DORY_LAN_HOST_IPV4: ${{ secrets.DORY_LAN_HOST_IPV4 }}
DORY_TAILSCALE_PEER_SSH: ${{ secrets.DORY_TAILSCALE_PEER_SSH }}
DORY_TAILSCALE_HOST_IPV4: ${{ secrets.DORY_TAILSCALE_HOST_IPV4 }}
DORY_SOURCE_GATE_IMAGE: ${{ vars.DORY_SOURCE_GATE_IMAGE }}
DORY_RELEASE_ALPINE_IMAGE: ${{ vars.DORY_RELEASE_ALPINE_IMAGE }}
DORY_RELEASE_NONNATIVE_BUILD_IMAGE: ${{ vars.DORY_RELEASE_NONNATIVE_BUILD_IMAGE }}
DORY_RELEASE_SSH_CLIENT_IMAGE: ${{ vars.DORY_RELEASE_SSH_CLIENT_IMAGE }}
DORY_EXTERNAL_VOLUME_TEST_ROOT: ${{ vars.DORY_EXTERNAL_VOLUME_TEST_ROOT }}
DORY_CORPORATE_DNS_SERVER: ${{ vars.DORY_CORPORATE_DNS_SERVER }}
DORY_CORPORATE_VPN_PROBE_HOST: ${{ vars.DORY_CORPORATE_VPN_PROBE_HOST }}
DORY_CORPORATE_VPN_PROBE_URL: ${{ vars.DORY_CORPORATE_VPN_PROBE_URL }}
DORY_TAILSCALE_EXIT_NODE: ${{ vars.DORY_TAILSCALE_EXIT_NODE }}
DORY_RELEASE_ECR_REGISTRY: ${{ vars.DORY_RELEASE_ECR_REGISTRY }}
DORY_RELEASE_ECR_REPOSITORY: ${{ vars.DORY_RELEASE_ECR_REPOSITORY }}
DORY_RELEASE_ECR_REGION: ${{ vars.DORY_RELEASE_ECR_REGION }}
DORY_RELEASE_AWS_ROLE_ARN: ${{ vars.DORY_RELEASE_AWS_ROLE_ARN }}
DORY_BENCH_IPERF_IMAGE: ${{ vars.DORY_BENCH_IPERF_IMAGE }}
DORY_BENCH_NODE_IMAGE: ${{ vars.DORY_BENCH_NODE_IMAGE }}
DORY_BENCH_POSTGRES_IMAGE: ${{ vars.DORY_BENCH_POSTGRES_IMAGE }}
DORY_BENCH_REDIS_IMAGE: ${{ vars.DORY_BENCH_REDIS_IMAGE }}
DORY_BENCH_RUBY_IMAGE: ${{ vars.DORY_BENCH_RUBY_IMAGE }}
DORY_BENCH_COMPOSER_IMAGE: ${{ vars.DORY_BENCH_COMPOSER_IMAGE }}
DORY_BENCH_CURL_IMAGE: ${{ vars.DORY_BENCH_CURL_IMAGE }}
DORY_BENCH_PROBE_URL: ${{ vars.DORY_BENCH_PROBE_URL }}
DORY_BENCH_DOWNLOAD_URL: ${{ vars.DORY_BENCH_DOWNLOAD_URL }}
DORY_BENCH_DOWNLOAD_BYTES: ${{ vars.DORY_BENCH_DOWNLOAD_BYTES }}
steps:
- name: Obtain short-lived ECR credentials through GitHub OIDC
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
with:
role-to-assume: ${{ vars.DORY_RELEASE_AWS_ROLE_ARN }}
aws-region: ${{ vars.DORY_RELEASE_ECR_REGION }}
role-session-name: DoryReleasePreflight
role-duration-seconds: 900
- name: Preflight required credentials and advertised Homebrew tap access
run: |
missing=0
for name in \
DEVELOPER_ID_CERT_P12_BASE64 \
DEVELOPER_ID_CERT_PASSWORD \
KEYCHAIN_PASSWORD \
NOTARY_APPLE_ID \
NOTARY_APPLE_PASSWORD \
SPARKLE_PRIVATE_KEY \
HOMEBREW_TAP_DEPLOY_KEY \
DORY_LAN_PEER_SSH \
DORY_LAN_HOST_IPV4 \
DORY_TAILSCALE_PEER_SSH \
DORY_TAILSCALE_HOST_IPV4 \
DORY_SOURCE_GATE_IMAGE \
DORY_RELEASE_ALPINE_IMAGE \
DORY_RELEASE_NONNATIVE_BUILD_IMAGE \
DORY_RELEASE_SSH_CLIENT_IMAGE \
DORY_EXTERNAL_VOLUME_TEST_ROOT \
DORY_CORPORATE_DNS_SERVER \
DORY_CORPORATE_VPN_PROBE_HOST \
DORY_CORPORATE_VPN_PROBE_URL \
DORY_TAILSCALE_EXIT_NODE \
DORY_RELEASE_ECR_REGISTRY \
DORY_RELEASE_ECR_REPOSITORY \
DORY_RELEASE_ECR_REGION \
DORY_RELEASE_AWS_ROLE_ARN \
DORY_BENCH_IPERF_IMAGE \
DORY_BENCH_NODE_IMAGE \
DORY_BENCH_POSTGRES_IMAGE \
DORY_BENCH_REDIS_IMAGE \
DORY_BENCH_RUBY_IMAGE \
DORY_BENCH_COMPOSER_IMAGE \
DORY_BENCH_CURL_IMAGE \
DORY_BENCH_PROBE_URL \
DORY_BENCH_DOWNLOAD_URL \
DORY_BENCH_DOWNLOAD_BYTES; do
if [ -z "${!name}" ]; then
echo "required release secret is missing: $name" >&2
missing=1
fi
done
[ "$missing" = 0 ] || exit 1
printf '%s\n' "$DORY_SOURCE_GATE_IMAGE" | grep -Eq '^.+@sha256:[0-9a-f]{64}$' \
|| { echo "DORY_SOURCE_GATE_IMAGE must be digest-pinned" >&2; exit 1; }
for name in DORY_RELEASE_ALPINE_IMAGE DORY_RELEASE_NONNATIVE_BUILD_IMAGE \
DORY_RELEASE_SSH_CLIENT_IMAGE DORY_BENCH_IPERF_IMAGE DORY_BENCH_NODE_IMAGE \
DORY_BENCH_POSTGRES_IMAGE DORY_BENCH_REDIS_IMAGE DORY_BENCH_RUBY_IMAGE \
DORY_BENCH_COMPOSER_IMAGE DORY_BENCH_CURL_IMAGE; do
printf '%s\n' "${!name}" | grep -Eq '^.+@sha256:[0-9a-f]{64}$' \
|| { echo "$name must be digest-pinned" >&2; exit 1; }
done
for name in DORY_BENCH_PROBE_URL DORY_BENCH_DOWNLOAD_URL; do
case "${!name}" in https://*) ;; *) echo "$name must use HTTPS" >&2; exit 1 ;; esac
case "${!name}" in *[[:space:]@]*) echo "$name must not contain credentials or whitespace" >&2; exit 1 ;; esac
done
printf '%s\n' "$DORY_BENCH_DOWNLOAD_BYTES" | grep -Eq '^[1-9][0-9]*$' \
|| { echo "DORY_BENCH_DOWNLOAD_BYTES must be a positive integer" >&2; exit 1; }
case "$DORY_CORPORATE_VPN_PROBE_URL" in
https://"$DORY_CORPORATE_VPN_PROBE_HOST"|https://"$DORY_CORPORATE_VPN_PROBE_HOST"/*) ;;
*) echo "DORY_CORPORATE_VPN_PROBE_URL must use the exact split-DNS host over HTTPS" >&2; exit 1 ;;
esac
printf '%s\n' "$DORY_RELEASE_ECR_REGISTRY" \
| grep -Eq '^[0-9]{12}\.dkr\.ecr\.[a-z0-9-]+\.amazonaws\.com$' \
|| { echo "DORY_RELEASE_ECR_REGISTRY must be an ECR registry host" >&2; exit 1; }
printf '%s\n' "$DORY_RELEASE_ECR_REPOSITORY" \
| grep -Eq '^[a-z0-9]+([._/-][a-z0-9]+)*$' \
|| { echo "DORY_RELEASE_ECR_REPOSITORY is invalid" >&2; exit 1; }
printf '%s\n' "$DORY_RELEASE_ECR_REGION" \
| grep -Eq '^[a-z]{2}(-gov)?-[a-z]+-[0-9]+$' \
|| { echo "DORY_RELEASE_ECR_REGION is invalid" >&2; exit 1; }
case "$DORY_RELEASE_ECR_REGISTRY" in
*".dkr.ecr.$DORY_RELEASE_ECR_REGION.amazonaws.com") ;;
*) echo "DORY_RELEASE_ECR_REGISTRY and DORY_RELEASE_ECR_REGION disagree" >&2; exit 1 ;;
esac
printf '%s\n' "$DORY_RELEASE_AWS_ROLE_ARN" \
| grep -Eq '^arn:aws:iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_/-]+$' \
|| { echo "DORY_RELEASE_AWS_ROLE_ARN is invalid" >&2; exit 1; }
command -v aws >/dev/null \
|| { echo "AWS CLI is required for release ECR preflight" >&2; exit 1; }
aws sts get-caller-identity >/dev/null
aws ecr describe-repositories --region "$DORY_RELEASE_ECR_REGION" \
--repository-names "$DORY_RELEASE_ECR_REPOSITORY" >/dev/null
ssh_dir="$RUNNER_TEMP/homebrew-tap-ssh"
install -d -m 0700 "$ssh_dir"
printf '%s\n' "$HOMEBREW_TAP_DEPLOY_KEY" > "$ssh_dir/key"
chmod 0600 "$ssh_dir/key"
curl -fsSL --retry 3 --connect-timeout 15 --max-time 60 \
https://api.github.com/meta -o "$ssh_dir/github-meta.json"
python3 - "$ssh_dir/github-meta.json" "$ssh_dir/known_hosts" <<'PY'
import json
import sys
with open(sys.argv[1], encoding="utf-8") as handle:
metadata = json.load(handle)
keys = metadata.get("ssh_keys", [])
if not keys or not all(isinstance(key, str) and key.startswith("ssh-") for key in keys):
raise SystemExit("GitHub SSH metadata is missing")
with open(sys.argv[2], "w", encoding="utf-8") as handle:
for key in keys:
handle.write(f"github.com {key}\n")
PY
export GIT_SSH_COMMAND="ssh -i $ssh_dir/key -o IdentitiesOnly=yes -o UserKnownHostsFile=$ssh_dir/known_hosts -o StrictHostKeyChecking=yes"
git clone --quiet --depth 1 --no-checkout \
git@github.com:Augani/homebrew-dory.git "$RUNNER_TEMP/homebrew-tap-preflight"
git -C "$RUNNER_TEMP/homebrew-tap-preflight" push --dry-run origin \
HEAD:refs/heads/dory-release-preflight >/dev/null
rust-workspace:
name: Linux full Rust quality gate
needs: [release-configuration, release-metadata]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
components: rustfmt, clippy
- name: Format full Rust workspace
working-directory: dory-core
run: cargo fmt --all -- --check
- name: Lint full Rust workspace
working-directory: dory-core
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Test full Rust workspace
working-directory: dory-core
run: cargo test --workspace --locked
guest-assets-arm64:
name: Build verified arm64 guest assets
needs: [release-configuration, release-metadata]
runs-on: ubuntu-24.04-arm
timeout-minutes: 180
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
- name: Install guest build prerequisites
run: sudo apt-get update && sudo apt-get install -y binutils-aarch64-linux-gnu e2fsprogs file patchelf protobuf-compiler zstd
- name: Prove guest verification prerequisites before the long build
run: |
set -euo pipefail
command -v protoc
command -v aarch64-linux-gnu-readelf
DORY_AARCH64_READELF="$(command -v aarch64-linux-gnu-readelf)" \
bash -n guest/mesa/verify-build.sh
- name: Expose rust-lld for the static Linux guest agent
run: |
rust_lld="$(find "$(rustc --print sysroot)/lib/rustlib" -type f -name rust-lld | head -1)"
test -x "$rust_lld"
mkdir -p "$RUNNER_TEMP/rust-lld-bin"
ln -sf "$rust_lld" "$RUNNER_TEMP/rust-lld-bin/rust-lld"
echo "$RUNNER_TEMP/rust-lld-bin" >> "$GITHUB_PATH"
- name: Build and verify headless, GPU, and initfs payloads
run: |
DORY_EXPERIMENTAL_GPU=0 guest/kernel/build.sh arm64
DORY_EXPERIMENTAL_GPU=1 guest/kernel/build.sh arm64
guest/initfs/build.sh arm64
DORY_EXPERIMENTAL_GPU=0 guest/kernel/verify-build.sh arm64
DORY_EXPERIMENTAL_GPU=1 guest/kernel/verify-build.sh arm64
guest/initfs/verify-build.sh arm64
- name: Build and verify every Linux desktop payload from this commit
env:
DORY_AARCH64_READELF: /usr/bin/aarch64-linux-gnu-readelf
run: |
DORY_KERNEL_PROFILE=accelerated-desktop guest/kernel/build.sh arm64
for distro in debian ubuntu kali; do
guest/desktop/build.sh arm64 "$distro"
done
DORY_KERNEL_PROFILE=accelerated-desktop guest/kernel/verify-build.sh arm64
for distro in debian ubuntu kali; do
guest/desktop/verify-build.sh arm64 "$distro"
done
- name: Upload same-commit arm64 guest payload
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dory-guest-arm64-${{ github.sha }}
retention-days: 30
if-no-files-found: error
compression-level: 0
path: |
guest/out/Image
guest/out/Image.zst
guest/out/config-arm64
guest/out/kernel-build-arm64.stamp
guest/out/Image-gpu
guest/out/Image-gpu.zst
guest/out/config-arm64-gpu
guest/out/kernel-build-arm64-gpu.stamp
guest/out/initfs-arm64.ext4
guest/out/dory-agent-arm64
guest/out/initfs-build-arm64.stamp
guest/out/Image-desktop.zst
guest/out/config-arm64-desktop
guest/out/kernel-build-arm64-desktop.stamp
guest/out/dory-mesa-venus-arm64.tar.zst
guest/out/dory-mesa-venus-build-arm64.stamp
guest/out/dory-desktop-debian-rootfs-arm64.ext4.zst
guest/out/dory-desktop-debian-packages-arm64.txt
guest/out/dory-desktop-debian-update-arm64.tar
guest/out/dory-desktop-debian-build-arm64.stamp
guest/out/dory-desktop-ubuntu-rootfs-arm64.ext4.zst
guest/out/dory-desktop-ubuntu-packages-arm64.txt
guest/out/dory-desktop-ubuntu-update-arm64.tar
guest/out/dory-desktop-ubuntu-build-arm64.stamp
guest/out/dory-desktop-kali-rootfs-arm64.ext4.zst
guest/out/dory-desktop-kali-packages-arm64.txt
guest/out/dory-desktop-kali-update-arm64.tar
guest/out/dory-desktop-kali-build-arm64.stamp
prepublication-quality:
name: macOS pre-publication quality gate
needs: [release-configuration, release-metadata]
runs-on: macos-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
- name: Select newest installed Xcode
run: |
newest="$(ls -d /Applications/Xcode*.app | sort -V | tail -1)"
echo "selected: $newest"
echo "DEVELOPER_DIR=$newest/Contents/Developer" >> "$GITHUB_ENV"
- name: Download Metal toolchain (Xcode 26 ships without it)
run: xcodebuild -downloadComponent MetalToolchain || true
- name: Install Protocol Buffers compiler
run: brew install protobuf
- name: Build shared Rust guest-control client
run: scripts/build-dory-ffi-xcframework.sh --if-needed
- name: Signed release metadata contract
run: |
python3 .github/scripts/test-release-metadata.py
python3 .github/scripts/test-release-output-validator.py
python3 .github/scripts/test-homebrew-install-gate.py
python3 .github/scripts/test-container-engine-performance-gate.py
python3 .github/scripts/test-linux-vm-performance-evidence.py
python3 -B scripts/test-linux-vm-performance-bundle.py -v
python3 .github/scripts/test-renderer-production-tuple.py
python3 -B .github/scripts/test-renderer-release-identity.py -v
scripts/test-build-renderer-components.sh
python3 .github/scripts/test-source-preserving-lan-gate.py
python3 .github/scripts/test-sparkle-install-relaunch-gate.py
python3 .github/scripts/test-vz-native-ipv6-gate.py
bash scripts/test-make-dmg.sh
bash scripts/test-app-update-payload.sh
bash scripts/test-verify-macos-deployment-targets.sh
python3 .github/scripts/test-release-orchestrator.py
python3 .github/scripts/test-renderer-qualification-signer.py
python3 .github/scripts/test-release-candidate-workflow.py
bash scripts/test-dmg-distribution-signing.sh
python3 .github/scripts/test-ci-umbrella.py
python3 .github/scripts/test-interrupted-upgrade-rollback-gate.py
python3 .github/scripts/test-generate-appcast.py
python3 .github/scripts/test-release-sbom.py
python3 .github/scripts/test-direct-dmg-install-gate.py
python3 .github/scripts/test-desktop-linux-live-gate.py
python3 .github/scripts/test-graphics-pack-installer.py
python3 .github/scripts/test-graphics-backend-resolver.py
python3 .github/scripts/test-machine-resource-reconfiguration-gate.py
python3 .github/scripts/test-sandbox-security-gate.py
python3 .github/scripts/test-ssh-agent-forwarding-gate.py
python3 .github/scripts/test-bind-advisory-lock-gate.py
python3 .github/scripts/test-nonnative-build-smoke.py
python3 .github/scripts/test-external-volume-bind-gate.py
python3 .github/scripts/test-host-network-integrity-gate.py
python3 .github/scripts/test-readiness-gate.py
python3 .github/scripts/test-release-candidate-live-smoke.py
python3 .github/scripts/test-live-migration-gate.py
python3 .github/scripts/test-devcontainers-compatibility-gate.py
python3 .github/scripts/test-act-compatibility-gate.py
python3 .github/scripts/test-testcontainers-compatibility-gate.py
python3 .github/scripts/test-localstack-compatibility-gate.py
python3 .github/scripts/test-tilt-compose-compatibility-gate.py
python3 .github/scripts/test-supabase-compatibility-gate.py
python3 .github/scripts/test-kubernetes-tooling-compatibility-gate.py
python3 .github/scripts/test-default-platform-image-gate.py
python3 .github/scripts/test-bind-file-coherence-gate.py
python3 .github/scripts/test-prune-safety-gate.py
python3 .github/scripts/test-data-drive-volume-identity-gate.py
python3 .github/scripts/test-data-disk-growth-gate.py
python3 .github/scripts/test-ecr-registry-retry-gate.py
python3 .github/scripts/test-private-registry-auth-gate.py
python3 .github/scripts/test-offline-bundled-boot-gate.py
python3 .github/scripts/test-competitor-runtime-regression-gate.py
python3 .github/scripts/test-managed-data-drive-gate.py
python3 .github/scripts/test-native-ipv6-gate.py
python3 .github/scripts/test-nonnative-exec-conformance-gate.py
python3 .github/scripts/test-nonnative-nix-gc-gate.py
python3 .github/scripts/test-nonnative-arch-pacman-gate.py
python3 .github/scripts/test-nonnative-mmdebstrap-gate.py
python3 .github/scripts/test-gvproxy-qemu-switch-gate.py
python3 .github/scripts/test-long-lived-network-soak.py
python3 .github/scripts/test-endurance-reliability-soak.py
python3 .github/scripts/test-release-candidate-qualifier.py
python3 .github/scripts/test-release-qualification-verifier.py
- name: P0 smoke harness regression tests
run: bash scripts/test-p0-smoke.sh
- name: Dory app and offline quality suite
run: bash scripts/ci-test.sh
- name: Dory core Swift tests
working-directory: dory-core-swift
run: swift test --no-parallel
- name: DoryHV tests
working-directory: Packages/ContainerizationEngine
run: SWT_EXPERIMENTAL_MAXIMUM_PARALLELIZATION_WIDTH=1 swift test --no-parallel
- name: Dory UI tests
run: |
ui_derived_data="$RUNNER_TEMP/dory-ui-derived-data"
xcodebuild clean \
-project Dory.xcodeproj \
-scheme 'Dory UI Tests' \
-destination 'platform=macOS' \
-derivedDataPath "$ui_derived_data"
xcodebuild build-for-testing \
-project Dory.xcodeproj \
-scheme 'Dory UI Tests' \
-destination 'platform=macOS' \
-derivedDataPath "$ui_derived_data" \
-parallel-testing-enabled NO \
CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_REQUIRED=YES \
CODE_SIGN_IDENTITY=-
scripts/clean-xcode-products.sh --root "$ui_derived_data"
codesign --verify --deep --strict "$ui_derived_data/Build/Products/Debug/Dory.app"
codesign --verify --deep --strict "$ui_derived_data/Build/Products/Debug/DoryUITests-Runner.app"
xcodebuild test-without-building \
-project Dory.xcodeproj \
-scheme 'Dory UI Tests' \
-destination 'platform=macOS' \
-derivedDataPath "$ui_derived_data" \
-parallel-testing-enabled NO \
CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_REQUIRED=YES \
CODE_SIGN_IDENTITY=-
release_candidate:
name: Build, sign, notarize, and stage immutable candidate
needs: [release-metadata, rust-workspace, prepublication-quality, guest-assets-arm64]
# Publication is intentionally bound to the dedicated physical Apple-silicon release host.
# Hosted/nested runners are not eligible. Dory launches from one clean v1 data-drive schema;
# pre-release Dory formats are not release fixtures.
runs-on: [self-hosted, macOS, arm64, dory, release]
timeout-minutes: 720
outputs:
version: ${{ needs.release-metadata.outputs.version }}
build: ${{ needs.release-metadata.outputs.build }}
sha256: ${{ steps.build.outputs.sha256 }}
dmg: ${{ steps.build.outputs.dmg }}
zip: ${{ steps.build.outputs.zip }}
zip_arm64: ${{ steps.build.outputs.zip_arm64 }}
manifest: ${{ steps.build.outputs.manifest }}
appcast: ${{ steps.build.outputs.appcast }}
app_update: ${{ steps.build.outputs.app_update }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
- name: Download same-commit arm64 guest payload
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: dory-guest-arm64-${{ github.sha }}
path: guest/out
- name: Independently verify every downloaded guest payload
run: |
zstd -q -d --sparse -f guest/out/Image-desktop.zst -o guest/out/Image-desktop
for distro in debian ubuntu kali; do
zstd -q -d --sparse -f \
"guest/out/dory-desktop-$distro-rootfs-arm64.ext4.zst" \
-o "guest/out/dory-desktop-$distro-rootfs-arm64.ext4"
done
DORY_EXPERIMENTAL_GPU=0 guest/kernel/verify-build.sh arm64
DORY_EXPERIMENTAL_GPU=1 guest/kernel/verify-build.sh arm64
guest/initfs/verify-build.sh arm64
DORY_KERNEL_PROFILE=accelerated-desktop guest/kernel/verify-build.sh arm64
guest/mesa/verify-build.sh arm64
for distro in debian ubuntu kali; do
guest/desktop/verify-build.sh arm64 "$distro"
done
- name: Prove the tracked release source exactly matches the commit
run: |
git diff --exit-code
test -z "$(git status --porcelain --untracked-files=no)"
git rev-parse HEAD | grep -qx "$GITHUB_SHA"
- name: Select the pinned Xcode 26.6 release toolchain
run: |
xcode_app=/Applications/Xcode-26.6.0-Release.Candidate.app
test -x "$xcode_app/Contents/Developer/usr/bin/xcodebuild"
echo "selected: $xcode_app"
echo "DEVELOPER_DIR=$xcode_app/Contents/Developer" >> "$GITHUB_ENV"
- name: Record and prove physical Apple-silicon host facts
run: |
facts="$RUNNER_TEMP/dory-arm64-host-facts.txt"
{
sw_vers
uname -a
printf 'hw.model='; sysctl -n hw.model
printf 'kern.hv_support='; sysctl -n kern.hv_support
printf 'kern.hv_vmm_present='; sysctl -in kern.hv_vmm_present 2>/dev/null || printf '0\n'
printf 'hw.optional.arm64='; sysctl -in hw.optional.arm64 2>/dev/null || printf '0\n'
} | tee "$facts"
test "$(uname -m)" = arm64
test "$(sysctl -n kern.hv_support)" = 1
test "$(sysctl -in kern.hv_vmm_present 2>/dev/null || printf 0)" != 1
test "$(sysctl -in hw.optional.arm64 2>/dev/null || printf 0)" = 1
case "$(sysctl -n hw.model)" in VirtualMac*) exit 1 ;; esac
echo 'DORY_RELEASE_PHYSICAL_ARM64_CONFIRMED=1' >> "$GITHUB_ENV"
- name: Ensure Metal toolchain (SwiftTerm ships Metal shaders)
run: xcodebuild -downloadComponent MetalToolchain || true
- name: Install pinned GPU renderer build prerequisites
run: brew install meson ninja pkgconf molten-vk libepoxy
- name: Preserve previous released appcast history
env:
PREVIOUS_RELEASE_VERSION: ${{ needs.release-metadata.outputs.previous_version }}
run: |
previous="$RUNNER_TEMP/previous-appcast.xml"
if [ -n "$PREVIOUS_RELEASE_VERSION" ]; then
curl -fsSL --retry 3 --retry-delay 2 --connect-timeout 15 --max-time 60 \
"https://github.com/Augani/dory/releases/download/v$PREVIOUS_RELEASE_VERSION/appcast.xml" \
-o "$previous"
python3 - "$previous" <<'PY'
import sys
import xml.etree.ElementTree as ET
sparkle = "http://www.andymatuschak.org/xml-namespaces/sparkle"
dory = "https://augani.github.io/dory/appcast"
ET.register_namespace("sparkle", sparkle)
ET.register_namespace("dory", dory)
tree = ET.parse(sys.argv[1])
items = tree.getroot().findall("./channel/item")
if not items:
raise SystemExit("previous release appcast has no item")
for item in items:
if item.findtext(f"{{{sparkle}}}minimumSystemVersion") != "14.0":
raise SystemExit("previous release appcast would regress the macOS 14 floor")
# Releases before 0.4 all use data/component schema 1. Normalize their
# historical items once so the first transactional updater can enforce an
# exact contract without dropping the signed enclosure history.
for name in ("dataSchemaVersion", "minimumReadableDataSchema", \
"maximumReadableDataSchema", "componentCatalogSchema"):
if item.find(f"{{{dory}}}{name}") is None:
ET.SubElement(item, f"{{{dory}}}{name}").text = "1"
tree.write(sys.argv[1], encoding="utf-8", xml_declaration=True)
PY
cp "$previous" website/public/appcast.xml
else
echo "No prior stable release exists; using the checked-in bootstrap history."
fi
- name: Import Developer ID certificate
env:
CERT_BASE64: ${{ secrets.DEVELOPER_ID_CERT_P12_BASE64 }}
CERT_PASSWORD: ${{ secrets.DEVELOPER_ID_CERT_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
KEYCHAIN="$RUNNER_TEMP/dory-signing.keychain-db"
echo "$CERT_BASE64" | base64 --decode > "$RUNNER_TEMP/cert.p12"
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security set-keychain-settings -lut 21600 "$KEYCHAIN"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security import "$RUNNER_TEMP/cert.p12" -P "$CERT_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN"
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security list-keychains -d user -s "$KEYCHAIN" login.keychain
rm -f "$RUNNER_TEMP/cert.p12"
- name: Build, sign, and notarize
id: build
env:
NOTARY_APPLE_ID: ${{ secrets.NOTARY_APPLE_ID }}
# Team ID is not secret (it appears in every signed app); fall back to the project's team.
NOTARY_TEAM_ID: ${{ secrets.NOTARY_TEAM_ID || '864H636QW4' }}
NOTARY_PASSWORD: ${{ secrets.NOTARY_APPLE_PASSWORD }}
# This job publishes publicly, so development escape hatches are deliberately unavailable.
# The public production contract is intentionally Apple-Silicon-only for this phase.
DORY_PUBLIC_RELEASE: '1'
DORY_BUNDLE_ENGINE: '1'
DORY_REQUIRE_BUNDLE_ASSETS: '1'
DORY_REQUIRE_DEVELOPER_ID_SIGNATURES: '1'
DORY_BUNDLE_VENUS: '1'
DORY_BUNDLE_VENUS_REQUIRED: '1'
DORY_RELEASE_VARIANTS: 'arm64'
DORY_BUILD_APPCAST: '1'
DORY_BUILD_APP_UPDATE: '1'
DORY_COMPONENT_CATALOG_SCHEMA: '2'
DORY_RELEASE_ASSET_BASE_URL: https://github.com/Augani/dory/releases/download/v${{ inputs.version }}
DORY_SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY || secrets.SPARKLE_ED_PRIVATE_KEY }}
DORY_RELEASE_SOURCE_COMMIT: ${{ github.sha }}
run: scripts/release.sh "${{ inputs.version }}" "${{ inputs.build }}"
- name: Validate public release outputs
run: |
scripts/validate-release-outputs.sh \
release-build \
"${{ inputs.version }}" \
"${{ inputs.build }}"
- name: Extract the exact signed Sparkle update candidate
id: sparkle_candidate
env:
UPDATE_ZIP: ${{ steps.build.outputs.app_update }}
DORY_SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY || secrets.SPARKLE_ED_PRIVATE_KEY }}
run: |
set -euo pipefail
test -s "$UPDATE_ZIP"
candidate_root="$RUNNER_TEMP/dory-release-update-candidate"
rm -rf "$candidate_root"
mkdir -p "$candidate_root/extracted" "$candidate_root/evidence"
python3 - "$UPDATE_ZIP" release-build/release-manifest.json <<'PY'
import hashlib
import json
import pathlib
import sys
import zipfile
archive_path, manifest_path = sys.argv[1:3]
with zipfile.ZipFile(archive_path) as archive:
for name in archive.namelist():
path = pathlib.PurePosixPath(name)
if path.is_absolute() or ".." in path.parts:
raise SystemExit(f"unsafe Sparkle ZIP member: {name}")
if path.parts and path.parts[0] not in {"Dory.app", "__MACOSX"}:
raise SystemExit(f"unexpected Sparkle ZIP root: {name}")
digest = hashlib.sha256()
with open(archive_path, "rb") as handle:
for chunk in iter(lambda: handle.read(1024 * 1024), b""):
digest.update(chunk)
with open(manifest_path, encoding="utf-8") as handle:
manifest = json.load(handle)
expected_name = pathlib.Path(archive_path).name
artifacts = manifest.get("artifacts") if isinstance(manifest, dict) else None
if not isinstance(artifacts, list):
raise SystemExit("release manifest artifact list is invalid")
matches = [record for record in artifacts
if isinstance(record, dict) and record.get("name") == expected_name]
if len(matches) != 1 or matches[0].get("sha256") != digest.hexdigest():
raise SystemExit("Sparkle candidate ZIP differs from release manifest")
PY
ditto -x -k "$UPDATE_ZIP" "$candidate_root/extracted"
test -d "$candidate_root/extracted/Dory.app"
test "$(find "$candidate_root/extracted" -type d -name Dory.app -print | wc -l | tr -d ' ')" = 1
shasum -a 256 "$UPDATE_ZIP" > "$candidate_root/evidence/app-update.sha256"
scripts/verify-sparkle-update.sh \
"$candidate_root/extracted/Dory.app" \
"$UPDATE_ZIP" \
release-build/appcast.xml \
> "$candidate_root/evidence/sparkle-verification.txt"
printf 'app=%s\n' "$candidate_root/extracted/Dory.app" >> "$GITHUB_OUTPUT"
- name: Resolve the exact release-build Sparkle source checkout
id: sparkle_source
run: |
set -euo pipefail
revision="$(python3 - <<'PY'
import json
with open("Dory.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved", encoding="utf-8") as handle:
payload = json.load(handle)
pins = [pin for pin in payload["pins"] if pin["identity"] == "sparkle"]
if len(pins) != 1:
raise SystemExit("expected one Sparkle package pin")
if pins[0]["state"].get("version") != "2.9.4":
raise SystemExit("unexpected Sparkle release pin")
print(pins[0]["state"]["revision"])
PY
)"
sparkle_source=""
while IFS= read -r checkout; do
if [ "$(git -C "$checkout" rev-parse HEAD 2>/dev/null || true)" = "$revision" ] \
&& [ -z "$(git -C "$checkout" status --porcelain --untracked-files=no)" ]; then
sparkle_source="$checkout"
break
fi
done < <({
find release-build/DerivedData -type d -path '*/SourcePackages/checkouts/Sparkle' -prune -print
find "$HOME/Library/Developer/Xcode/DerivedData" \
-type d -path '*/SourcePackages/checkouts/Sparkle' -prune -print
} | awk '!seen[$0]++')
test -n "$sparkle_source"
printf 'path=%s\n' "$sparkle_source" >> "$GITHUB_OUTPUT"
- name: Exercise the notarized direct-download candidate on a clean physical Mac
timeout-minutes: 60
env:
DORY_RELEASE_CLEAN_USER: '1'
DORY_RELEASE_EXTERNAL_VOLUME_ROOT: ${{ vars.DORY_EXTERNAL_VOLUME_TEST_ROOT }}
DORY_RELEASE_LOCK_IMAGE: ${{ vars.DORY_SOURCE_GATE_IMAGE }}
DORY_RELEASE_FIXTURE_IMAGE: ${{ vars.DORY_RELEASE_ALPINE_IMAGE }}
DORY_RELEASE_NONNATIVE_BUILD_IMAGE: ${{ vars.DORY_RELEASE_NONNATIVE_BUILD_IMAGE }}
DORY_RELEASE_SSH_CLIENT_IMAGE: ${{ vars.DORY_RELEASE_SSH_CLIENT_IMAGE }}
DORY_RELEASE_RUN_PHYSICAL_SLEEP: '1'
DORY_RELEASE_CORPORATE_DNS_SERVER: ${{ vars.DORY_CORPORATE_DNS_SERVER }}
DORY_RELEASE_CORPORATE_VPN_PROBE_HOST: ${{ vars.DORY_CORPORATE_VPN_PROBE_HOST }}
DORY_RELEASE_CORPORATE_VPN_PROBE_URL: ${{ vars.DORY_CORPORATE_VPN_PROBE_URL }}
DORY_RELEASE_TAILSCALE_EXIT_NODE: ${{ vars.DORY_TAILSCALE_EXIT_NODE }}
DORY_RELEASE_COMPONENT_DIR: ${{ github.workspace }}/release-build/components/arm64
DORY_RELEASE_DESKTOP_KERNEL: ${{ github.workspace }}/guest/out/Image-desktop
DORY_RELEASE_DESKTOP_DEBIAN_ROOTFS: ${{ github.workspace }}/guest/out/dory-desktop-debian-rootfs-arm64.ext4
DORY_RELEASE_DESKTOP_UBUNTU_ROOTFS: ${{ github.workspace }}/guest/out/dory-desktop-ubuntu-rootfs-arm64.ext4
DORY_RELEASE_DESKTOP_KALI_ROOTFS: ${{ github.workspace }}/guest/out/dory-desktop-kali-rootfs-arm64.ext4
DORY_RELEASE_DESKTOP_DEBIAN_UPDATE: ${{ github.workspace }}/guest/out/dory-desktop-debian-update-arm64.tar
DORY_RELEASE_DESKTOP_UBUNTU_UPDATE: ${{ github.workspace }}/guest/out/dory-desktop-ubuntu-update-arm64.tar
DORY_RELEASE_DESKTOP_KALI_UPDATE: ${{ github.workspace }}/guest/out/dory-desktop-kali-update-arm64.tar
DORY_RELEASE_DESKTOP_VERSION: ${{ inputs.version }}
run: |
scripts/direct-dmg-install-gate.sh \
--dmg "${{ steps.build.outputs.dmg }}" \
--sbom "release-build/Dory-${{ inputs.version }}.cdx.json" \
--release-manifest release-build/release-manifest.json \
--version "${{ inputs.version }}" \
--build "${{ inputs.build }}" \
--source-commit "$GITHUB_SHA" \
--workroot "$RUNNER_TEMP/dory-release-direct-dmg" \
--confirm CLEAN-RELEASE-USER-DMG-INSTALL
- name: Exercise the exact Sparkle update candidate on a clean physical Mac
timeout-minutes: 20
env:
DORY_RELEASE_CLEAN_USER: '1'
run: |
scripts/sparkle-install-relaunch-gate.sh \
--candidate-app "${{ steps.sparkle_candidate.outputs.app }}" \
--update-zip "${{ steps.build.outputs.app_update }}" \
--appcast release-build/appcast.xml \
--release-manifest release-build/release-manifest.json \
--sbom "release-build/Dory-${{ inputs.version }}.cdx.json" \
--sparkle-source "${{ steps.sparkle_source.outputs.path }}" \
--version "${{ inputs.version }}" \
--build "${{ inputs.build }}" \
--source-commit "$GITHUB_SHA" \
--signing-identity "Developer ID Application" \
--workroot "$RUNNER_TEMP/dory-release-live-sparkle" \
--confirm CLEAN-RELEASE-USER-SPARKLE-INSTALL
- name: Interrupt a signed app/component update and prove automatic last-good rollback
timeout-minutes: 45
env:
DORY_RELEASE_CLEAN_USER: '1'
DORY_SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY || secrets.SPARKLE_ED_PRIVATE_KEY }}
DORY_RELEASE_FIXTURE_IMAGE: ${{ vars.DORY_RELEASE_ALPINE_IMAGE }}
run: |
set -euo pipefail
sign_update="$(find "$HOME/Library/Developer/Xcode/DerivedData" \
-path '*/SourcePackages/artifacts/sparkle/Sparkle/bin/sign_update' \
-type f -perm -111 -print | sort | tail -n 1)"
test -x "$sign_update"
scripts/interrupted-upgrade-rollback-gate.sh \
--candidate-app "${{ steps.sparkle_candidate.outputs.app }}" \
--sign-update "$sign_update" \
--version "${{ inputs.version }}" \
--build "${{ inputs.build }}" \
--source-commit "$GITHUB_SHA" \
--fixture-image "$DORY_RELEASE_FIXTURE_IMAGE" \
--signing-identity "Developer ID Application" \
--workroot "$RUNNER_TEMP/dory-release-live-transactional-upgrade" \
--confirm CLEAN-RELEASE-USER-INTERRUPTED-UPGRADE
- name: Upload live release-gate evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dory-live-release-evidence-${{ github.sha }}-${{ github.run_attempt }}
retention-days: 30
if-no-files-found: warn
path: |
${{ runner.temp }}/dory-arm64-host-facts.txt
${{ runner.temp }}/dory-release-direct-dmg/evidence
${{ runner.temp }}/dory-release-live-*
- name: Stage immutable public candidate for long qualification
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dory-release-candidate-${{ github.sha }}-${{ github.run_attempt }}
retention-days: 30
if-no-files-found: error
compression-level: 0
path: |
release-build/*.zip
release-build/*.dmg
release-build/*.tar.gz
release-build/*.cdx.json
release-build/appcast.xml
release-build/release-manifest.json
release-build/components/arm64/*
homebrew_install_certification:
name: Clean exact-candidate Homebrew install and uninstall
needs: release_candidate
runs-on: [self-hosted, macOS, arm64, dory, release]
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Download the immutable candidate
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: dory-release-candidate-${{ github.sha }}-${{ github.run_attempt }}
path: release-build
- name: Install, launch, and uninstall through Homebrew under normal quarantine
env:
DORY_RELEASE_CLEAN_USER: '1'
VERSION: ${{ needs.release_candidate.outputs.version }}
run: |
scripts/homebrew-install-gate.sh \
--candidate-dir release-build \
--version "$VERSION" \
--build "${{ inputs.build }}" \
--source-commit "$GITHUB_SHA" \
--workroot "$RUNNER_TEMP/dory-homebrew-install" \
--confirm CLEAN-RELEASE-USER-HOMEBREW-INSTALL
- name: Retain Homebrew install evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dory-homebrew-install-evidence-${{ github.sha }}-${{ github.run_attempt }}
retention-days: 90
if-no-files-found: warn
path: ${{ runner.temp }}/dory-homebrew-install/evidence
release_qualification:
name: Exact candidate 8-hour + 25-hour qualification
needs: [release_candidate, homebrew_install_certification]
runs-on: [self-hosted, macOS, arm64, dory, release]
timeout-minutes: 1800
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Download immutable public candidate before the job token expires
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: dory-release-candidate-${{ github.sha }}-${{ github.run_attempt }}
path: release-build
- name: Select the pinned Xcode 26.6 release toolchain
run: |
xcode_app=/Applications/Xcode-26.6.0-Release.Candidate.app
test -x "$xcode_app/Contents/Developer/usr/bin/xcodebuild"
echo "selected: $xcode_app"
echo "DEVELOPER_DIR=$xcode_app/Contents/Developer" >> "$GITHUB_ENV"
- name: Obtain short-lived ECR credentials through GitHub OIDC
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
with:
role-to-assume: ${{ vars.DORY_RELEASE_AWS_ROLE_ARN }}
aws-region: ${{ vars.DORY_RELEASE_ECR_REGION }}
role-session-name: DoryReleaseQualification
role-duration-seconds: 21600
- name: Run concurrent release-duration gates and retain runner-local evidence
env:
DORY_SOURCE_GATE_IMAGE: ${{ vars.DORY_SOURCE_GATE_IMAGE }}
DORY_RELEASE_QUALIFICATION_IMAGE: ${{ vars.DORY_RELEASE_ALPINE_IMAGE }}
DORY_RELEASE_SSH_CLIENT_IMAGE: ${{ vars.DORY_RELEASE_SSH_CLIENT_IMAGE }}
DORY_RELEASE_ECR_REGISTRY: ${{ vars.DORY_RELEASE_ECR_REGISTRY }}
DORY_RELEASE_ECR_REPOSITORY: ${{ vars.DORY_RELEASE_ECR_REPOSITORY }}
DORY_RELEASE_ECR_REGION: ${{ vars.DORY_RELEASE_ECR_REGION }}
run: |
scripts/qualify-release-candidate.sh \
--build-dir release-build \
--version "${{ needs.release_candidate.outputs.version }}" \
--build "${{ inputs.build }}" \
--source-commit "${{ github.sha }}" \
--confirm QUALIFY-EXACT-DORY-RELEASE
container_engine_performance_qualification:
name: Exact candidate container-engine performance evidence
needs: release_candidate
runs-on: [self-hosted, macOS, arm64, dory, benchmark]
timeout-minutes: 720
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Download immutable public candidate
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: dory-release-candidate-${{ github.sha }}-${{ github.run_attempt }}
path: release-build
- name: Run exact-candidate clean-account container-engine campaign
env:
DORY_RELEASE_CLEAN_USER: '1'
DORY_RELEASE_BENCHMARK_USER: '1'
run: |
scripts/qualify-container-engine-performance.sh \
--candidate-dir release-build \
--version "${{ needs.release_candidate.outputs.version }}" \
--build "${{ inputs.build }}" \
--source-commit "$GITHUB_SHA" \
--workroot "$RUNNER_TEMP/dory-container-engine-performance" \
--alpine-image "${{ vars.DORY_RELEASE_ALPINE_IMAGE }}" \
--iperf-image "${{ vars.DORY_BENCH_IPERF_IMAGE }}" \
--node-image "${{ vars.DORY_BENCH_NODE_IMAGE }}" \
--postgres-image "${{ vars.DORY_BENCH_POSTGRES_IMAGE }}" \
--redis-image "${{ vars.DORY_BENCH_REDIS_IMAGE }}" \
--ruby-image "${{ vars.DORY_BENCH_RUBY_IMAGE }}" \
--composer-image "${{ vars.DORY_BENCH_COMPOSER_IMAGE }}" \
--curl-image "${{ vars.DORY_BENCH_CURL_IMAGE }}" \
--probe-url "${{ vars.DORY_BENCH_PROBE_URL }}" \
--download-url "${{ vars.DORY_BENCH_DOWNLOAD_URL }}" \
--download-bytes "${{ vars.DORY_BENCH_DOWNLOAD_BYTES }}" \
--confirm CLEAN-BENCHMARK-USER-DELETE-ENGINE-DATA
- name: Retain exact container-engine performance evidence for publication
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with: