[commit: ghc] wip/ghc-8.8-merges: gitlab-ci: Use build cleanup logic on Darwin as well (60b46c5)
git at git.haskell.org
git at git.haskell.org
Thu Feb 21 15:11:47 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ghc-8.8-merges
Link : http://ghc.haskell.org/trac/ghc/changeset/60b46c5108f18c92839ae8309f1e811dd47e7c1d/ghc
>---------------------------------------------------------------
commit 60b46c5108f18c92839ae8309f1e811dd47e7c1d
Author: Ben Gamari <ben at smart-cactus.org>
Date: Mon Jan 21 10:55:48 2019 -0500
gitlab-ci: Use build cleanup logic on Darwin as well
We use the shell executor on Darwin as well as Windows.
See https://gitlab.com/gitlab-org/gitlab-runner/issues/3856.
(cherry picked from commit cfbd39bd405b4cedd3ee10a6d4a2bdd89b6e2e2d)
>---------------------------------------------------------------
60b46c5108f18c92839ae8309f1e811dd47e7c1d
.gitlab-ci.yml | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2478d0d..8497632 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -380,8 +380,8 @@ validate-x86_64-windows:
- ghc.tar.xz
- junit.xml
-# Note [Cleanup on Windows]
-# ~~~~~~~~~~~~~~~~~~~~~~~~~
+# Note [Cleaning up after shell executor]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# As noted in [1], gitlab-runner's shell executor doesn't clean up its working
# directory after builds. Unfortunately, we are forced to use the shell executor
@@ -391,7 +391,7 @@ validate-x86_64-windows:
#
# [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856
-# See Note [Cleanup on Windows]
+# See Note [Cleanup after shell executor]
cleanup-windows:
stage: cleanup
tags:
@@ -412,3 +412,21 @@ cleanup-windows:
- del %BUILD_DIR%\* /F /Q
- for /d %%p in (%BUILD_DIR%\*) do rd /Q /S "%%p"
- exit /b 0
+
+# See Note [Cleanup after shell executor]
+cleanup-darwin:
+ stage: cleanup
+ tags:
+ - x86_64-darwin
+ when: always
+ before_script:
+ - echo "Time to clean up"
+ script:
+ - echo "Let's go"
+ after_script:
+ - BUILD_DIR=$CI_PROJECT_DIR
+ - echo "Cleaning $BUILD_DIR"
+ - cd $HOME
+ - rm -Rf $BUILD_DIR/*
+ - exit 0
+
More information about the ghc-commits
mailing list