[commit: ghc] wip/T16212-fixed, wip/sgraf-no-exnstr: gitlab-ci: Use build cleanup logic on Darwin as well (cfbd39b)

git at git.haskell.org git at git.haskell.org
Fri Feb 1 05:54:40 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branches: wip/T16212-fixed,wip/sgraf-no-exnstr
Link       : http://ghc.haskell.org/trac/ghc/changeset/cfbd39bd405b4cedd3ee10a6d4a2bdd89b6e2e2d/ghc

>---------------------------------------------------------------

commit cfbd39bd405b4cedd3ee10a6d4a2bdd89b6e2e2d
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.


>---------------------------------------------------------------

cfbd39bd405b4cedd3ee10a6d4a2bdd89b6e2e2d
 .gitlab-ci.yml | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 389906e..4a8cb62 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -408,8 +408,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
@@ -419,7 +419,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:
@@ -440,3 +440,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