GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: Linux packaging changes open an unsigned arm64 package before merge · pingdotgg/t3code@b7373f4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • actions/ci-changes
      • action.yml
    • scripts
      • ci-changes.cjs
      • ci-changes.d.cts
    • workflows
      • ci.yml
  • scripts
    • check-changed.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/actions/ci-changes/action.yml‎

Copy file name to clipboardExpand all lines: .github/actions/ci-changes/action.yml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ outputs:
1919
value: ${{ steps.detect.outputs.release_smoke }}
2020
mobile_native:
2121
value: ${{ steps.detect.outputs.mobile_native }}
22+
linux_arm64_package:
23+
value: ${{ steps.detect.outputs.linux_arm64_package }}
2224
runs:
2325
using: composite
2426
steps:
Collapse file

‎.github/scripts/ci-changes.cjs‎

Copy file name to clipboardExpand all lines: .github/scripts/ci-changes.cjs
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ const EXTRA_OWNERS = [
3131
[/^docs\/user\/t3-connect-troubleshooting\.md$/, ["t3"]],
3232
];
3333
const RUST = /^native\/(resource-monitor|kde-snap-shot|hyprland-snap-shot)\//;
34+
// Linux packaging, the release runner's libraries, and this check's CI job. Release runs packaged
35+
// Electron on native arm64 to prepare server bytecode, so CI packages the same unsigned app there.
36+
const LINUX_ARM64_PACKAGE =
37+
/^scripts\/(build-desktop-artifact\.ts|linux-after-pack\.ts|prepare-server-compile-cache\.cjs|lib\/server-compile-cache\.ts)$|^apps\/desktop\/(package\.json|src\/serverCompileCache\.ts)$|^\.github\/workflows\/(release-desktop|ci)\.yml$/;
3438

3539
// These tests read other packages without declaring dependencies.
3640
const TEST_ONLY_DEPS = {
@@ -165,6 +169,7 @@ function decide(files, packages, full) {
165169
rust: everything || rust,
166170
release_smoke: scriptsChanged,
167171
mobile_native: files === null || files.some((file) => MOBILE_NATIVE.test(file)),
172+
linux_arm64_package: files === null || files.some((file) => LINUX_ARM64_PACKAGE.test(file)),
168173
},
169174
};
170175
}
Collapse file

‎.github/scripts/ci-changes.d.cts‎

Copy file name to clipboardExpand all lines: .github/scripts/ci-changes.d.cts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ export function decide(
2323
rust: boolean;
2424
release_smoke: boolean;
2525
mobile_native: boolean;
26+
linux_arm64_package: boolean;
2627
};
2728
};
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+89Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
rust: ${{ steps.detect.outputs.rust }}
3535
release_smoke: ${{ steps.detect.outputs.release_smoke }}
3636
mobile_native: ${{ steps.detect.outputs.mobile_native }}
37+
linux_arm64_package: ${{ steps.detect.outputs.linux_arm64_package }}
3738
steps:
3839
# Only the package manifests the script reads to build the dependency graph.
3940
# Depth 2 brings the base commit the change is diffed against.
@@ -590,6 +591,93 @@ jobs:
590591
- name: Exercise release-only workflow steps
591592
run: node scripts/release-smoke.ts
592593

594+
# Release packages Linux arm64 on native hardware, where packaged Electron prepares server
595+
# bytecode and must load every GTK and NSS library the runner provides. Packaging and runner
596+
# library changes package the same unsigned app here and open it. Nothing is signed or uploaded.
597+
linux_arm64_package:
598+
permissions:
599+
contents: read
600+
id-token: write
601+
name: Linux arm64 Package
602+
needs: changes
603+
if: ${{ !cancelled() && needs.changes.outputs.linux_arm64_package != 'false' }}
604+
runs-on: blacksmith-8vcpu-ubuntu-2404-arm
605+
timeout-minutes: 25
606+
steps:
607+
- name: Checkout
608+
uses: actions/checkout@v6
609+
with:
610+
sparse-checkout: |
611+
/*
612+
!/.repos/
613+
!/apps/mobile/modules/t3-terminal/Vendor/**/*.a
614+
sparse-checkout-cone-mode: false
615+
616+
- name: Setup Vite+
617+
uses: ./.github/actions/setup-ci-deps
618+
with:
619+
task-cache-read-token: ${{ secrets.T3_TASK_CACHE_READ_TOKEN }}
620+
621+
# Release's keys, read-only, so most runs skip the Rust builds.
622+
- name: Restore resource monitor
623+
id: resource_monitor_cache
624+
uses: actions/cache/restore@v6
625+
with:
626+
path: native/resource-monitor/target/aarch64-unknown-linux-gnu/release/t3-resource-monitor
627+
key: resource-monitor-aarch64-unknown-linux-gnu-${{ hashFiles('native/resource-monitor/Cargo.lock', 'native/resource-monitor/Cargo.toml', 'native/resource-monitor/src/**') }}
628+
629+
- name: Restore Linux capture helpers
630+
id: capture_helper_cache
631+
uses: actions/cache/restore@v6
632+
with:
633+
path: |
634+
native/kde-snap-shot/target/aarch64-unknown-linux-gnu/release/t3-kde-snap-shot
635+
native/hyprland-snap-shot/target/aarch64-unknown-linux-gnu/release/t3-hyprland-snap-shot
636+
key: linux-capture-helpers-aarch64-unknown-linux-gnu-${{ hashFiles('native/kde-snap-shot/Cargo.lock', 'native/kde-snap-shot/Cargo.toml', 'native/kde-snap-shot/src/**', 'native/hyprland-snap-shot/Cargo.lock', 'native/hyprland-snap-shot/Cargo.toml', 'native/hyprland-snap-shot/src/**', 'native/hyprland-snap-shot/protocols/**') }}
637+
638+
- name: Setup Rust
639+
if: steps.resource_monitor_cache.outputs.cache-hit != 'true' || steps.capture_helper_cache.outputs.cache-hit != 'true'
640+
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
641+
with:
642+
toolchain: stable
643+
targets: aarch64-unknown-linux-gnu
644+
645+
# Runs release-desktop.yml's own step so this job and release install the same packages.
646+
# Release keeps it inline: stable releases check out an older commit than the workflow.
647+
- name: Install Linux desktop build libraries
648+
run: |
649+
awk '/- name: Install Linux desktop build libraries/ { step = 1 }
650+
step && /^ run: \|$/ { body = 1; next }
651+
body && /^ *$/ { print ""; next }
652+
body && !/^ / { exit }
653+
body { print substr($0, 11) }' .github/workflows/release-desktop.yml > "$RUNNER_TEMP/linux-libraries.sh"
654+
grep -q 'apt-get install' "$RUNNER_TEMP/linux-libraries.sh"
655+
bash -euo pipefail "$RUNNER_TEMP/linux-libraries.sh"
656+
657+
# afterPack runs the packaged Electron here, the step that fails without its libraries.
658+
- name: Package unsigned Linux arm64 app
659+
env:
660+
T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR: ${{ steps.resource_monitor_cache.outputs.cache-hit == 'true' }}
661+
T3CODE_DESKTOP_REUSE_LINUX_CAPTURE_HELPERS: ${{ steps.capture_helper_cache.outputs.cache-hit == 'true' }}
662+
run: vp run dist:desktop:artifact --platform linux --target dir --arch arm64 --output-dir "$RUNNER_TEMP/linux-arm64-package"
663+
664+
- name: Open the seeded thread in the packaged app
665+
id: launch_check
666+
timeout-minutes: 4
667+
run: |
668+
sudo apt-get install -y xvfb
669+
xvfb-run -a node scripts/smoke-desktop-app.ts \
670+
--executable "$RUNNER_TEMP/linux-arm64-package/linux-arm64-unpacked/t3code" \
671+
--artifacts-dir "$RUNNER_TEMP/linux-arm64-launch-check"
672+
673+
- name: Upload launch check
674+
if: ${{ failure() && steps.launch_check.outcome == 'failure' }}
675+
uses: actions/upload-artifact@v7
676+
with:
677+
name: linux-arm64-launch-check
678+
path: ${{ runner.temp }}/linux-arm64-launch-check
679+
if-no-files-found: ignore
680+
593681
# Branch protection requires this job by its name, `Check`. It fails when any
594682
# other job fails, is cancelled, or is skipped without a reason, so splitting
595683
# or resharding jobs needs no ruleset change. Add every new job to `needs`.
@@ -609,6 +697,7 @@ jobs:
609697
rust,
610698
mobile_native_static_analysis,
611699
release_smoke,
700+
linux_arm64_package,
612701
]
613702
runs-on: blacksmith-2vcpu-ubuntu-2404
614703
timeout-minutes: 5
Collapse file

‎scripts/check-changed.test.ts‎

Copy file name to clipboardExpand all lines: scripts/check-changed.test.ts
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,28 @@ describe("check:changed", () => {
4848
assert.deepStrictEqual(decide(["docs/user/install.md"], packages, false).affected, []);
4949
});
5050

51+
it("packages Linux arm64 only for packaging and release runner library changes", () => {
52+
const packages = readWorkspace();
53+
const packs = (file: string) => decide([file], packages, true).outputs.linux_arm64_package;
54+
for (const file of [
55+
".github/workflows/release-desktop.yml",
56+
".github/workflows/ci.yml",
57+
"scripts/prepare-server-compile-cache.cjs",
58+
"scripts/build-desktop-artifact.ts",
59+
"apps/desktop/package.json",
60+
]) {
61+
assert.isTrue(packs(file), file);
62+
}
63+
for (const file of [
64+
"scripts/build-desktop-artifact.test.ts",
65+
"apps/desktop/src/main.ts",
66+
".github/workflows/release.yml",
67+
"package.json",
68+
]) {
69+
assert.isFalse(packs(file), file);
70+
}
71+
});
72+
5173
it.effect(
5274
"keeps weighted steps within the budget, in order, and serial steps one at a time",
5375
() =>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.