[commit: ghc] master: gitlab-ci: Use per-build temporary directory on Windows (3aa8c59)
git at git.haskell.org
git at git.haskell.org
Tue Dec 25 03:38:06 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3aa8c593ca8647c5a3a05a84819d515ea3a69538/ghc
>---------------------------------------------------------------
commit 3aa8c593ca8647c5a3a05a84819d515ea3a69538
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sun Dec 23 01:19:36 2018 -0500
gitlab-ci: Use per-build temporary directory on Windows
I have seen several instances of inexplicable "Access denied" errors on Windows.
Using per-build temporary directories avoids any chance of interference between
builds and eliminates the possibility of temporary files leaking beyond the life
of the build.
>---------------------------------------------------------------
3aa8c593ca8647c5a3a05a84819d515ea3a69538
.gitlab-ci.yml | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6b1a22f..c906b3e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -302,12 +302,23 @@ validate-x86_64-linux-deb9-unreg:
before_script:
- git clean -xdf
- git submodule foreach git clean -xdf
- - PATH=C:\msys64\usr\bin;%PATH%
+
+ # Use a local temporary directory to ensure that concurrent builds don't
+ # interfere with one another
+ - |
+ mkdir tmp
+ set TMP=%cd%\tmp
+ set TEMP=%cd%\tmp
+
+ - set PATH=C:\msys64\usr\bin;%PATH%
- python .gitlab/fix-submodules.py
- git submodule sync --recursive
- git submodule update --init --recursive
- git checkout .gitmodules
- bash .gitlab/win32-init.sh
+ after_script:
+ - rd /s /q tmp
+ - bash -c 'cp -Rf $APPDATA/cabal cabal-cache'
cache:
paths:
- cabal-cache
@@ -333,7 +344,6 @@ validate-x86_64-windows-hadrian:
- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --no-lint"
- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist"
- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
- - cp -Rf $APPDATA/cabal cabal-cache
cache:
key: x86_64-windows
tags:
@@ -352,7 +362,6 @@ validate-x86_64-windows:
bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex'
- bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`"
- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
- - cp -Rf $APPDATA/cabal cabal-cache
cache:
key: x86_64-windows
tags:
More information about the ghc-commits
mailing list