From bf24435392fa1dcc6b4d88caae48fe8f9f0aac85 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Fri, 8 Mar 2024 11:25:29 -0600 Subject: [PATCH] Conditionally set precompile timing --- test/integration/Dockerfile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/integration/Dockerfile b/test/integration/Dockerfile index c2f698e..ef12b7f 100644 --- a/test/integration/Dockerfile +++ b/test/integration/Dockerfile @@ -3,6 +3,7 @@ # docker build -f test/integration/Dockerfile . # ``` +# Minimum Julia version supported should match the Project.toml ARG JULIA_VERSION=1.10.2 FROM julia:${JULIA_VERSION}-bookworm @@ -18,12 +19,26 @@ ENV JULIA_PROJECT=/root/.julia/dev/${PKG_NAME} COPY Project.toml *Manifest.toml ${JULIA_PROJECT}/ RUN mkdir $JULIA_PROJECT/src && \ echo "module ${PKG_NAME} end" >${JULIA_PROJECT}/src/${PKG_NAME}.jl -RUN julia -e 'using Pkg; Pkg.Registry.update(); Pkg.instantiate(); Pkg.precompile(strict=true, timing=true)' +RUN julia -e ' \ + using Pkg; \ + Pkg.Registry.update(); \ + Pkg.instantiate(); \ + if VERSION >= v"1.9.0-beta2.67" \ + Pkg.precompile(strict=true, timing=true); \ + else \ + Pkg.precompile(strict=true); \ + end;' COPY . ${JULIA_PROJECT} RUN mv ${JULIA_PROJECT}/test/integration/entrypoint.jl ${JULIA_PROJECT} && \ rmdir ${JULIA_PROJECT}/test/integration -RUN julia -e 'using Pkg; Pkg.precompile(strict=true, timing=true)' +RUN julia -e ' \ + using Pkg; \ + if VERSION >= v"1.9.0-beta2.67" \ + Pkg.precompile(strict=true, timing=true); \ + else \ + Pkg.precompile(strict=true); \ + end;' WORKDIR ${JULIA_PROJECT} ENTRYPOINT ["julia", "entrypoint.jl"]