|
34 | 34 | rust: ${{ steps.detect.outputs.rust }} |
35 | 35 | release_smoke: ${{ steps.detect.outputs.release_smoke }} |
36 | 36 | mobile_native: ${{ steps.detect.outputs.mobile_native }} |
| 37 | + linux_arm64_package: ${{ steps.detect.outputs.linux_arm64_package }} |
37 | 38 | steps: |
38 | 39 | # Only the package manifests the script reads to build the dependency graph. |
39 | 40 | # Depth 2 brings the base commit the change is diffed against. |
@@ -590,6 +591,93 @@ jobs: |
590 | 591 | - name: Exercise release-only workflow steps |
591 | 592 | run: node scripts/release-smoke.ts |
592 | 593 |
|
| 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 | + |
593 | 681 | # Branch protection requires this job by its name, `Check`. It fails when any |
594 | 682 | # other job fails, is cancelled, or is skipped without a reason, so splitting |
595 | 683 | # or resharding jobs needs no ruleset change. Add every new job to `needs`. |
@@ -609,6 +697,7 @@ jobs: |
609 | 697 | rust, |
610 | 698 | mobile_native_static_analysis, |
611 | 699 | release_smoke, |
| 700 | + linux_arm64_package, |
612 | 701 | ] |
613 | 702 | runs-on: blacksmith-2vcpu-ubuntu-2404 |
614 | 703 | timeout-minutes: 5 |
|