ci: add -Dsnap test
parent
7b8be344fc
commit
270891eee1
|
|
@ -19,6 +19,7 @@ jobs:
|
|||
- build-nix
|
||||
- build-macos
|
||||
- build-macos-matrix
|
||||
- build-snap
|
||||
- build-windows
|
||||
- test
|
||||
- test-gtk
|
||||
|
|
@ -118,7 +119,41 @@ jobs:
|
|||
run: |
|
||||
nix develop -c \
|
||||
zig build \
|
||||
-Dflatpak=true
|
||||
-Dflatpak
|
||||
|
||||
build-snap:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: namespace-profile-ghostty-sm
|
||||
needs: test
|
||||
env:
|
||||
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
|
||||
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup Cache
|
||||
uses: namespacelabs/nscloud-cache-action@a289cf5d2fcd6874376aa92f0ef7f99dc923592a # v1.2.17
|
||||
with:
|
||||
path: |
|
||||
/nix
|
||||
/zig
|
||||
|
||||
# Install Nix and use that to run our tests so our environment matches exactly.
|
||||
- uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
|
||||
with:
|
||||
name: ghostty
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Build with Snap
|
||||
run: |
|
||||
nix develop -c \
|
||||
zig build \
|
||||
-Dsnap
|
||||
|
||||
build-linux:
|
||||
strategy:
|
||||
|
|
@ -275,7 +310,7 @@ jobs:
|
|||
trigger-snap:
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: namespace-profile-ghostty-xsm
|
||||
needs: build-dist
|
||||
needs: [build-dist, build-snap]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ parts:
|
|||
override-build: |
|
||||
craftctl set version=$(cat VERSION)
|
||||
$CRAFT_PART_SRC/../../zig/src/zig build \
|
||||
-Dsnap=true \
|
||||
-Dsnap \
|
||||
-Dpatch-rpath=\$ORIGIN/../usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:/snap/core24/current/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR \
|
||||
-Doptimize=ReleaseFast \
|
||||
-Dcpu=baseline \
|
||||
|
|
|
|||
Loading…
Reference in New Issue