From ee34d85dbcc4973ac53b414984a0d0427adaf802 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 1 May 2020 16:27:27 +0200 Subject: [PATCH] Set TMPDIR during CI --- .gitlab/before_script/darwin/install_deps.sh | 2 ++ .gitlab/before_script/freebsd/install_deps.sh | 2 ++ .gitlab/before_script/linux/alpine/install_deps.sh | 2 ++ .gitlab/before_script/linux/install_deps.sh | 6 ++++-- .gitlab/ghcup_env | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab/before_script/darwin/install_deps.sh b/.gitlab/before_script/darwin/install_deps.sh index 3976867..2c53b5f 100755 --- a/.gitlab/before_script/darwin/install_deps.sh +++ b/.gitlab/before_script/darwin/install_deps.sh @@ -4,6 +4,8 @@ set -eux . "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env" +mkdir -p "${TMPDIR}" + curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup > ./ghcup-bin chmod +x ghcup-bin diff --git a/.gitlab/before_script/freebsd/install_deps.sh b/.gitlab/before_script/freebsd/install_deps.sh index d3915ee..1d8c6b0 100755 --- a/.gitlab/before_script/freebsd/install_deps.sh +++ b/.gitlab/before_script/freebsd/install_deps.sh @@ -6,6 +6,8 @@ set -eux . "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env" +mkdir -p "${TMPDIR}" + curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-portbld-freebsd-ghcup > ./ghcup-bin chmod +x ghcup-bin diff --git a/.gitlab/before_script/linux/alpine/install_deps.sh b/.gitlab/before_script/linux/alpine/install_deps.sh index 83bfca6..54c71f0 100755 --- a/.gitlab/before_script/linux/alpine/install_deps.sh +++ b/.gitlab/before_script/linux/alpine/install_deps.sh @@ -4,6 +4,8 @@ set -eux . "$( cd "$(dirname "$0")" ; pwd -P )/../../../ghcup_env" +mkdir -p "${TMPDIR}" + apk add --no-cache \ curl \ gcc \ diff --git a/.gitlab/before_script/linux/install_deps.sh b/.gitlab/before_script/linux/install_deps.sh index f219eb0..a9c0177 100755 --- a/.gitlab/before_script/linux/install_deps.sh +++ b/.gitlab/before_script/linux/install_deps.sh @@ -2,11 +2,13 @@ set -eux +. "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env" + +mkdir -p "${TMPDIR}" + sudo apt-get update -y sudo apt-get install -y libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev git wget -. "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env" - curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > ./ghcup-bin chmod +x ghcup-bin diff --git a/.gitlab/ghcup_env b/.gitlab/ghcup_env index 9a5ba38..13fea7e 100644 --- a/.gitlab/ghcup_env +++ b/.gitlab/ghcup_env @@ -1,3 +1,3 @@ export GHCUP_INSTALL_BASE_PREFIX="$CI_PROJECT_DIR" export PATH="$CI_PROJECT_DIR/.ghcup/bin:$CI_PROJECT_DIR/.local/bin:$PATH" - +export TMPDIR="$CI_PROJECT_DIR/.ghcup/tmp"