summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/test.yml8
-rw-r--r--src/build/docker/debian/Dockerfile5
2 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f78855290..6df4975b0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -508,9 +508,9 @@ jobs:
- name: Install zig
shell: pwsh
run: |
- # Get the zig version from build.zig so that it only needs to be updated
- $fileContent = Get-Content -Path "build.zig" -Raw
- $pattern = 'buildpkg\.requireZig\("(.*?)"\);'
+ # Get the zig version from build.zig.zon so that it only needs to be updated
+ $fileContent = Get-Content -Path "build.zig.zon" -Raw
+ $pattern = 'minimum_zig_version\s*=\s*"([^"]+)"'
$zigVersion = [regex]::Match($fileContent, $pattern).Groups[1].Value
$version = "zig-x86_64-windows-$zigVersion"
Write-Output $version
@@ -575,7 +575,7 @@ jobs:
- name: Get required Zig version
id: zig
run: |
- echo "version=$(sed -n -e 's/^.*requireZig("\(.*\)").*$/\1/p' build.zig)" >> $GITHUB_OUTPUT
+ echo "version=$(sed -n -E 's/^\s*\.?minimum_zig_version\s*=\s*"([^"]+)".*/\1/p' build.zig.zon)" >> $GITHUB_OUTPUT
- name: Setup Cache
uses: namespacelabs/nscloud-cache-action@7baedde84bbf5063413d621f282834bc2654d0c1 # v1.2.18
diff --git a/src/build/docker/debian/Dockerfile b/src/build/docker/debian/Dockerfile
index 815d395cd..ffeef3d6a 100644
--- a/src/build/docker/debian/Dockerfile
+++ b/src/build/docker/debian/Dockerfile
@@ -24,12 +24,12 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get -qq update && \
WORKDIR /src
-COPY ./build.zig /src
+COPY ./build.zig ./build.zig.zon /src/
# Install zig
# https://ziglang.org/download/
-RUN export ZIG_VERSION=$(sed -n -e 's/^.*requireZig("\(.*\)").*$/\1/p' build.zig) && curl -L -o /tmp/zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-$(uname -m)-linux-$ZIG_VERSION.tar.xz" && \
+RUN export ZIG_VERSION=$(sed -n -E 's/^\s*\.?minimum_zig_version\s*=\s*"([^"]+)".*/\1/p' build.zig.zon) && curl -L -o /tmp/zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-$(uname -m)-linux-$ZIG_VERSION.tar.xz" && \
tar -xf /tmp/zig.tar.xz -C /opt && \
rm /tmp/zig.tar.xz && \
ln -s "/opt/zig-$(uname -m)-linux-$ZIG_VERSION/zig" /usr/local/bin/zig
@@ -41,4 +41,3 @@ RUN zig build \
-Dcpu=baseline
RUN ./zig-out/bin/ghostty +version
-