From 88fe49feca524e320c000c020b7ef513f556f3ef Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:45:18 +0200 Subject: [PATCH] added ZIG_ARCH argument Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- Earthfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Earthfile b/Earthfile index 30b0621280..90aa1b5d70 100644 --- a/Earthfile +++ b/Earthfile @@ -13,11 +13,12 @@ install-other-libs: RUN apt -y install unzip # for www/build.sh install-zig-llvm: + ARG ZIG_ARCH FROM +install-other-libs # zig - RUN wget -c https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz --no-check-certificate - RUN tar -xf zig-linux-x86_64-0.9.1.tar.xz - RUN ln -s /earthbuild/zig-linux-x86_64-0.9.1/zig /bin/zig + RUN wget -c https://ziglang.org/download/0.9.1/zig-linux-$ZIG_ARCH-0.9.1.tar.xz --no-check-certificate + RUN tar -xf zig-linux-$ZIG_ARCH-0.9.1.tar.xz + RUN ln -s /earthbuild/zig-linux-$ZIG_ARCH-0.9.1/zig /bin/zig # zig builtins wasm tests RUN apt -y install build-essential # llvm @@ -39,13 +40,15 @@ install-zig-llvm: ENV CARGO_INCREMENTAL=0 # no need to recompile package when using new function copy-dirs: - FROM +install-zig-llvm + ARG ZIG_ARCH + FROM +install-zig-llvm --ZIG_ARCH=$ZIG_ARCH COPY --dir crates examples Cargo.toml Cargo.lock version.txt .cargo www rust-toolchain.toml ./ build-nightly-release: ARG RELEASE_FOLDER_NAME ARG RUSTFLAGS - FROM +copy-dirs + ARG ZIG_ARCH=x86_64 + FROM +copy-dirs --ZIG_ARCH=$ZIG_ARCH COPY --dir .git LICENSE LEGAL_DETAILS ci ./ # version.txt is used by the CLI: roc --version RUN ./ci/write_version.sh