diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9893106dd..a0750bd90 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -563,6 +563,8 @@ jobs: test: if: github.repository == 'ghostty-org/ghostty' runs-on: namespace-profile-ghostty-md + outputs: + zig_version: ${{ steps.zig.outputs.version }} env: ZIG_LOCAL_CACHE_DIR: /zig/local-cache ZIG_GLOBAL_CACHE_DIR: /zig/global-cache @@ -570,6 +572,11 @@ jobs: - name: Checkout code uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Get required Zig version + id: zig + run: | + echo "version=$(sed -n -e 's/^.*requireZig("\(.*\)").*$/\1/p' build.zig)" >> $GITHUB_OUTPUT + - name: Setup Cache uses: namespacelabs/nscloud-cache-action@7baedde84bbf5063413d621f282834bc2654d0c1 # v1.2.18 with: @@ -1137,12 +1144,11 @@ jobs: name: Build on FreeBSD needs: test runs-on: namespace-profile-mitchellh-sm-systemd - if: false # FIXME: FreeBSD does not yet ship with Zig 0.15 strategy: matrix: release: - "14.3" - # - "15.0" # disable until fixed: https://github.com/vmactions/freebsd-vm/issues/108 + - "15.0" steps: - name: Checkout Ghostty uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -1163,14 +1169,19 @@ jobs: devel/gettext \ devel/git \ devel/pkgconf \ + ftp/curl \ graphics/wayland \ - lang/zig \ security/ca_root_nss \ textproc/hs-pandoc \ x11-fonts/jetbrains-mono \ x11-toolkits/libadwaita \ x11-toolkits/gtk40 \ x11-toolkits/gtk4-layer-shell + curl -L -o /tmp/zig.tar.xz "https://ziglang.org/download/${{ needs.test.outputs.zig_version }}/zig-x86_64-freebsd-${{ needs.test.outputs.zig_version }}.tar.xz" && \ + mkdir /opt && \ + tar -xf /tmp/zig.tar.xz -C /opt && \ + rm /tmp/zig.tar.xz && \ + ln -s "/opt/zig-x86_64-freebsd-${{ needs.test.outputs.zig_version }}/zig" /usr/local/bin/zig run: | zig env