From 4201bbdb464931c65a23559de75873d74fd4f452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 3 May 2024 11:48:05 +0300 Subject: [PATCH] zig: use via apk That way we won't need to bump zig versions with new releases. --- .github/workflows/ci.yaml | 2 +- Dockerfile | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dff96fb..319f4cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,7 @@ jobs: path: ~/.cache/zig - run: | wget --progress=dot:mega \ - https://ziglang.org/download/0.11.0/zig-linux-$(uname -m)-0.11.0.tar.xz + https://ziglang.org/download/0.12.0/zig-linux-$(uname -m)-0.12.0.tar.xz tar -xJf zig-linux-*.tar.xz rm zig-linux-*.xz mv zig-linux-* zig-sdk diff --git a/Dockerfile b/Dockerfile index 866e9c8..71d3db3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,13 @@ -FROM alpine +FROM alpine:edge -# zig is installed from the upstream tarball, because: -# - as of writing, alpine has zig only in testing (which is cumbersome to use) -# - apk get zig pulls in libllvm, which is huge. -# -# Upstream tarball is statically linked, making it small and convenient to use. -RUN apk add make \ - && wget https://ziglang.org/download/0.12.0/zig-linux-$(uname -m)-0.12.0.tar.xz \ - && tar -xJf zig-linux-*.tar.xz \ - && rm zig-linux-*.xz \ - && mv zig-linux-* zig +RUN apk add make zig WORKDIR inotify-info COPY . . -RUN CC="/zig/zig cc -target $(uname -m)-linux-musl" \ - CXX="/zig/zig c++ -target $(uname -m)-linux-musl" \ +RUN CC="zig cc -target $(uname -m)-linux-musl" \ + CXX="zig c++ -target $(uname -m)-linux-musl" \ make FROM scratch