diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2478d0dee6..4a8cb62e3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ before_script: - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules + - "git fetch origin refs/notes/perf:refs/notes/ci/perf || true" stages: - lint @@ -75,6 +76,7 @@ validate-x86_64-linux-deb8-hadrian: - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules + - "git fetch origin refs/notes/perf:refs/notes/ci/perf || true" tags: - x86_64-linux @@ -97,8 +99,16 @@ validate-x86_64-linux-deb8-hadrian: make binary-dist TAR_COMP_OPTS="-1" mv ghc-*.tar.xz ghc.tar.xz - | + # Prepare to push git notes. + METRICS_FILE=$(mktemp) + git config user.email "ben+ghc-ci@smart-cactus.org" + git config user.name "GHC GitLab CI" + - | THREADS=`mk/detect-cpu-count.sh` - make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml + make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml METRICS_FILE=$METRICS_FILE + - | + # Push git notes. + METRICS_FILE=$METRICS_FILE .gitlab/push-test-metrics.sh dependencies: [] artifacts: reports: @@ -120,12 +130,14 @@ validate-x86_64-darwin: ac_cv_func_clock_gettime: "no" LANG: "en_US.UTF-8" CONFIGURE_ARGS: --with-intree-gmp + TEST_ENV: "x86_64-darwin" before_script: - git clean -xdf && git submodule foreach git clean -xdf - python3 .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules + - "git fetch origin refs/notes/perf:refs/notes/ci/perf || true" - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" @@ -150,6 +162,7 @@ validate-x86_64-darwin: - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules + - "git fetch origin refs/notes/perf:refs/notes/ci/perf || true" - bash .circleci/prepare-system.sh # workaround for docker permissions @@ -167,6 +180,8 @@ validate-aarch64-linux-deb9: stage: full-build image: ghcci/aarch64-linux-deb9:0.1 allow_failure: true + variables: + TEST_ENV: "aarch64-linux-deb9" artifacts: when: always expire_in: 2 week @@ -191,6 +206,8 @@ validate-i386-linux-deb9: stage: full-build image: ghcci/i386-linux-deb9:0.1 allow_failure: true + variables: + TEST_ENV: "i386-linux-deb9" artifacts: when: always expire_in: 2 week @@ -204,6 +221,7 @@ nightly-i386-linux-deb9: allow_failure: true variables: TEST_TYPE: slowtest + TEST_ENV: "i386-linux-deb9" artifacts: when: always expire_in: 2 week @@ -217,6 +235,8 @@ validate-x86_64-linux-deb9: extends: .validate-linux stage: build image: ghcci/x86_64-linux-deb9:0.2 + variables: + TEST_ENV: "x86_64-linux-deb9" artifacts: when: always expire_in: 2 week @@ -241,6 +261,7 @@ validate-x86_64-linux-deb9-llvm: image: ghcci/x86_64-linux-deb9:0.2 variables: BUILD_FLAVOUR: perf-llvm + TEST_ENV: "x86_64-linux-deb9-llvm" cache: key: linux-x86_64-deb9 @@ -248,6 +269,8 @@ validate-x86_64-linux-deb8: extends: .validate-linux stage: full-build image: ghcci/x86_64-linux-deb8:0.1 + variables: + TEST_ENV: "x86_64-linux-deb8" cache: key: linux-x86_64-deb8 artifacts: @@ -258,6 +281,8 @@ validate-x86_64-linux-fedora27: extends: .validate-linux stage: full-build image: ghcci/x86_64-linux-fedora27:0.1 + variables: + TEST_ENV: "x86_64-linux-fedora27" cache: key: linux-x86_64-fedora27 artifacts: @@ -269,6 +294,7 @@ validate-x86_64-linux-deb9-integer-simple: stage: full-build variables: INTEGER_LIBRARY: integer-simple + TEST_ENV: "x86_64-linux-deb9-integer-simple" image: ghcci/x86_64-linux-deb9:0.2 cache: key: linux-x86_64-deb9 @@ -289,6 +315,7 @@ validate-x86_64-linux-deb9-unreg: stage: full-build variables: CONFIGURE_ARGS: --enable-unregisterised + TEST_ENV: "x86_64-linux-deb9-unreg" image: ghcci/x86_64-linux-deb9:0.2 cache: key: linux-x86_64-deb9 @@ -314,6 +341,7 @@ validate-x86_64-linux-deb9-unreg: - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules + - "git fetch origin refs/notes/perf:refs/notes/ci/perf || true" - bash .gitlab/win32-init.sh after_script: - rd /s /q tmp @@ -380,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 @@ -391,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: @@ -412,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 + |