Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • .gitlab/ci.sh
    ... ... @@ -275,7 +275,7 @@ function setup() {
    275 275
     
    
    276 276
     function fetch_ghc() {
    
    277 277
       local should_fetch=false
    
    278
    -  
    
    278
    +
    
    279 279
       if [ ! -e "$GHC" ]; then
    
    280 280
         if [ -z "${FETCH_GHC_VERSION:-}" ]; then
    
    281 281
           fail "GHC not found at '$GHC' and FETCH_GHC_VERSION is not set"
    
    ... ... @@ -292,7 +292,7 @@ function fetch_ghc() {
    292 292
           fi
    
    293 293
         fi
    
    294 294
       fi
    
    295
    -  
    
    295
    +
    
    296 296
       if [ "$should_fetch" = true ]; then
    
    297 297
           local v="$FETCH_GHC_VERSION"
    
    298 298
     
    
    ... ... @@ -887,8 +887,28 @@ function save_cache () {
    887 887
     }
    
    888 888
     
    
    889 889
     function clean() {
    
    890
    -  rm -R tmp
    
    891
    -  run rm -Rf _build
    
    890
    +  # When CI_DISPOSABLE_ENVIRONMENT is not true (e.g. using shell
    
    891
    +  # executor on windows/macos), the project directory is not removed
    
    892
    +  # by gitlab runner automatically after each job. To mitigate the
    
    893
    +  # space leak, other than periodic cleaning on the runner host, we
    
    894
    +  # also must aggressively cleanup build products, otherwise we run
    
    895
    +  # into out of space errors too frequently.
    
    896
    +  #
    
    897
    +  # When CI_DISPOSABLE_ENVIRONMENT is true (using docker executor on
    
    898
    +  # linux), the runner will do proper cleanup, so no need to do
    
    899
    +  # anything here.
    
    900
    +  #
    
    901
    +  # The exclude list are the artifacts that we do expect to be
    
    902
    +  # uploaded. Keep in sync with `jobArtifacts` in
    
    903
    +  # `.gitlab/generate-ci/gen_ci.hs`!
    
    904
    +  if [[ "${CI_DISPOSABLE_ENVIRONMENT:-}" != true ]]; then
    
    905
    +    git submodule foreach --recursive git clean -xdf
    
    906
    +    git clean -xdf \
    
    907
    +      --exclude=ci_timings.txt \
    
    908
    +      --exclude=ghc-*.tar.xz \
    
    909
    +      --exclude=junit.xml \
    
    910
    +      --exclude=unexpected-test-output.tar.gz
    
    911
    +  fi
    
    892 912
     }
    
    893 913
     
    
    894 914
     function run_hadrian() {
    

  • .gitlab/generate-ci/gen_ci.hs
    ... ... @@ -889,6 +889,8 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} }
    889 889
           , if testsuiteUsePerf buildConfig then "RUNTEST_ARGS" =: "--config perf_path=perf" else mempty
    
    890 890
           ]
    
    891 891
     
    
    892
    +    -- Keep in sync with the exclude list in `function clean()` in
    
    893
    +    -- `.gitlab/ci.sh`!
    
    892 894
         jobArtifacts = Artifacts
    
    893 895
           { junitReport = "junit.xml"
    
    894 896
           , expireIn = "2 weeks"