From 3e9705bcd39b52ca85384cb4217bec76fa820b73 Mon Sep 17 00:00:00 2001 From: Dan Vargas <10914883+dvargas46@users.noreply.github.com> Date: Sat, 8 May 2021 20:40:41 -0500 Subject: [PATCH] pkg(julia-1.5.4): switch to build from source (#254) * pkg(julia-1.5.4): switch to build from source * fix install lang in ci test step * use x86-64 cpu target list --- .github/workflows/package-pr.yaml | 2 +- packages/julia/1.5.4/build.sh | 21 ++++++++++++++++++--- packages/julia/1.5.4/environment | 3 ++- packages/julia/1.5.4/run | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/package-pr.yaml b/.github/workflows/package-pr.yaml index 4e82395..0cf4ccc 100644 --- a/.github/workflows/package-pr.yaml +++ b/.github/workflows/package-pr.yaml @@ -94,7 +94,7 @@ jobs: PKG_VERSION=$(awk -F- '{ print $2 }' <<< $package) echo "Installing..." - docker run --network container:api appropriate/curl -sXPOST http://localhost:2000/api/v2/packages/$PKG_PATH + docker run --network container:api appropriate/curl -sXPOST http://localhost:2000/api/v2/packages -H "Content-Type: application/json" -d "{\"language\":\"$PKG_NAME\",\"version\":\"$PKG_VERSION\"}" TEST_SCRIPTS=packages/$PKG_PATH/test.* echo "Tests: $TEST_SCRIPTS" diff --git a/packages/julia/1.5.4/build.sh b/packages/julia/1.5.4/build.sh index d9e746c..678764c 100755 --- a/packages/julia/1.5.4/build.sh +++ b/packages/julia/1.5.4/build.sh @@ -1,6 +1,21 @@ #!/usr/bin/env bash -curl -OL https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.4-linux-x86_64.tar.gz -tar zxvf julia-1.5.4-linux-x86_64.tar.gz -rm julia-1.5.4-linux-x86_64.tar.gz +# Install location +PREFIX=$(realpath $(dirname $0)) +mkdir -p build +cd build + +# Download and extract Julia source +curl -L "https://github.com/JuliaLang/julia/releases/download/v1.5.4/julia-1.5.4.tar.gz" -o julia.tar.gz +tar xzf julia.tar.gz --strip-components=1 + +# Build +echo "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1) +prefix=$PREFIX" > Make.user +make -j$(nproc) +make install -j$(nproc) + +# Cleanup +cd .. +rm -rf build diff --git a/packages/julia/1.5.4/environment b/packages/julia/1.5.4/environment index a20e0bf..e7d0c97 100644 --- a/packages/julia/1.5.4/environment +++ b/packages/julia/1.5.4/environment @@ -1,3 +1,4 @@ #!/usr/bin/env bash -export PATH=$PWD/julia-1.5.4/bin:$PATH +# Add Julia binary to path +export PATH=$PWD/bin:$PATH diff --git a/packages/julia/1.5.4/run b/packages/julia/1.5.4/run index 215025f..6badf1c 100755 --- a/packages/julia/1.5.4/run +++ b/packages/julia/1.5.4/run @@ -1,4 +1,4 @@ #!/usr/bin/env bash -# Put instructions to run the runtime +# Run without startup or history file julia --startup-file=no --history-file=no "$@"