From f1f23e1c7d8632de2f4194e7c0cbcb82ef7e1f1f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 8 Jan 2025 10:22:17 -0800 Subject: [PATCH] Add snap to nix, add arm64 builders --- .github/workflows/snap.yaml | 26 ++++++++++++++++++++++---- nix/devShell.nix | 2 ++ snap/snapcraft.yaml | 8 ++++---- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index 66e3a5254..05f509f13 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -8,8 +8,26 @@ on: workflow_dispatch: {} jobs: - build: - runs-on: ubuntu-24.04 + build-amd64: + runs-on: namespace-profile-ghostty-snap steps: - - uses: actions/checkout@v4 - - uses: snapcore/action-build@v1 + - uses: actions/checkout@v4 + - name: Setup Cache + uses: namespacelabs/nscloud-cache-action@v1.2.0 + with: + path: | + /nix + /zig + - uses: snapcore/action-build@v1 + + build-arm64: + runs-on: namespace-profile-ghostty-snap-arm64 + steps: + - uses: actions/checkout@v4 + - name: Setup Cache + uses: namespacelabs/nscloud-cache-action@v1.2.0 + with: + path: | + /nix + /zig + - uses: snapcore/action-build@v1 diff --git a/nix/devShell.nix b/nix/devShell.nix index 7cfef64c2..6470423a0 100644 --- a/nix/devShell.nix +++ b/nix/devShell.nix @@ -14,6 +14,7 @@ python3, qemu, scdoc, + snapcraft, valgrind, #, vulkan-loader # unused vttest, @@ -105,6 +106,7 @@ in pandoc pkg-config scdoc + snapcraft zig zip zig2nix.packages.${system}.zon2nix diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e3b61537a..d190e345d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -20,9 +20,9 @@ platforms: apps: ghostty: command: bin/ghostty - command-chain: [ bin/launcher ] + command-chain: [bin/launcher] completer: share/bash-completion/completions/ghostty.bash - desktop: share/applications/com.mitchellh.ghostty.desktop + desktop: share/applications/com.mitchellh.ghostty.desktop environment: PATH: /snap/ghostty/current/bin:/snap/ghostty/current/usr/bin:$PATH LC_ALL: C.UTF-8 @@ -65,9 +65,9 @@ parts: ghostty: source: . - after: [ zig ] + after: [zig] plugin: nil - build-attributes: [ enable-patchelf ] + build-attributes: [enable-patchelf] build-packages: - libgtk-4-dev - libadwaita-1-dev