[Git][ghc/ghc][wip/backports-9.0] gitlab-ci: Backport gitlab-ci.yml from master
Ben Gamari
gitlab at gitlab.haskell.org
Mon Nov 30 00:42:00 UTC 2020
Ben Gamari pushed to branch wip/backports-9.0 at Glasgow Haskell Compiler / GHC
Commits:
6e427145 by Ben Gamari at 2020-11-29T19:41:46-05:00
gitlab-ci: Backport gitlab-ci.yml from master
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -17,14 +17,14 @@ variables:
GIT_SUBMODULE_STRATEGY: "recursive"
stages:
- - lint # Source linting
- - quick-build # A very quick smoke-test to weed out broken commits
- - build # A quick smoke-test to weed out broken commits
- - full-build # Build all the things
- - cleanup # See Note [Cleanup after the shell executor]
- - packaging # Source distribution, etc.
- - testing # head.hackage correctness and compiler performance testing
- - deploy # push documentation
+ - tool-lint # Source linting of the tools
+ - quick-build # A very quick smoke-test to weed out broken commits
+ - lint # Source linting of GHC
+ - build # A quick smoke-test to weed out broken commits
+ - full-build # Build all the things
+ - packaging # Source distribution, etc.
+ - testing # head.hackage correctness and compiler performance testing
+ - deploy # push documentation
# Note [The CI Story]
# ~~~~~~~~~~~~~~~~~~~
@@ -47,6 +47,7 @@ workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
+ - if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "wip/marge_bot_batch_merge_job"'
- if: '$CI_COMMIT_BRANCH =~ /ghc-[0-9]+\.[0-9]+/'
- if: '$CI_PIPELINE_SOURCE == "web"'
@@ -61,7 +62,6 @@ workflow:
.release: &release
variables:
BUILD_FLAVOUR: "perf"
- FLAVOUR: "perf"
artifacts:
when: always
expire_in: 1 year
@@ -81,11 +81,11 @@ workflow:
############################################################
-# Linting
+# tool linting
############################################################
ghc-linters:
- stage: lint
+ stage: tool-lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
- git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
@@ -105,7 +105,7 @@ ghc-linters:
# Run mypy Python typechecker on linter scripts.
lint-linters:
- stage: lint
+ stage: tool-lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
- mypy .gitlab/linters/*.py
@@ -115,7 +115,7 @@ lint-linters:
# Check that .T files all parse by listing broken tests.
lint-testsuite:
- stage: lint
+ stage: tool-lint
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
script:
- make -Ctestsuite list_broken TEST_HC=$GHC
@@ -125,7 +125,7 @@ lint-testsuite:
# Run mypy Python typechecker on testsuite driver
typecheck-testsuite:
- stage: lint
+ stage: tool-lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
- mypy testsuite/driver/runtests.py
@@ -137,7 +137,7 @@ typecheck-testsuite:
# accommodate, e.g., haddock changes not yet upstream) but not on `master` or
# Marge jobs.
.lint-submods:
- stage: lint
+ stage: tool-lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
- git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
@@ -169,7 +169,7 @@ lint-submods-branch:
- if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
.lint-changelogs:
- stage: lint
+ stage: tool-lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
dependencies: []
tags:
@@ -189,14 +189,13 @@ lint-release-changelogs:
rules:
- if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
-
############################################################
# Validation via Pipelines (hadrian)
############################################################
.validate-hadrian:
variables:
- FLAVOUR: "validate"
+ BUILD_FLAVOUR: "validate"
script:
- .gitlab/ci.sh setup
- .gitlab/ci.sh configure
@@ -212,7 +211,7 @@ lint-release-changelogs:
junit: junit.xml
expire_in: 2 week
paths:
- - ghc.tar.xz
+ - "$BIN_DIST_NAME.tar.xz"
- junit.xml
.validate-linux-hadrian:
@@ -220,6 +219,7 @@ lint-release-changelogs:
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
variables:
TEST_ENV: "x86_64-linux-deb9-hadrian"
+ BIN_DIST_NAME: "ghc-x86_64-deb9-linux"
before_script:
# workaround for docker permissions
- sudo chown ghc:ghc -R .
@@ -228,23 +228,65 @@ lint-release-changelogs:
- git checkout .gitmodules
- "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
after_script:
+ - cp -Rf $HOME/.cabal cabal-cache
- .gitlab/ci.sh clean
tags:
- x86_64-linux
+# Verify that Hadrian builds with stack. Note that we don't actually perform a
+# build of GHC itself; we merely test that the Hadrian executable builds and
+# works (by invoking `hadrian --version`).
+stack-hadrian-build:
+ extends: .validate-linux-hadrian
+ stage: build
+ script:
+ - .gitlab/ci.sh setup
+ - .gitlab/ci.sh configure
+ - hadrian/build-stack --version
+
validate-x86_64-linux-deb9-hadrian:
extends: .validate-linux-hadrian
+ needs: [hadrian-ghc-in-ghci]
stage: build
validate-x86_64-linux-deb9-unreg-hadrian:
extends: .validate-linux-hadrian
+ needs: [validate-x86_64-linux-deb9-hadrian]
stage: full-build
variables:
CONFIGURE_ARGS: --enable-unregisterised
TEST_ENV: "x86_64-linux-deb9-unreg-hadrian"
+validate-x86_64-linux-deb10-hadrian-cross-aarch64:
+ <<: *nightly
+ extends: .validate-linux-hadrian
+ stage: full-build
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
+ variables:
+ BIN_DIST_NAME: "ghc-x86_64-deb9-linux"
+ rules:
+ - if: '$CI_MERGE_REQUEST_LABELS =~ /.*cross-compilation.*/'
+ variables:
+ CONFIGURE_ARGS: --with-intree-gmp
+ CROSS_TARGET: "aarch64-linux-gnu"
+
+nightly-x86_64-linux-deb10-hadrian-cross-aarch64:
+ <<: *nightly
+ extends: .validate-linux-hadrian
+ stage: full-build
+ variables:
+ CONFIGURE_ARGS: --with-intree-gmp
+ CROSS_TARGET: "aarch64-linux-gnu"
+
+
+
+############################################################
+# GHC-in-GHCi (Hadrian)
+############################################################
+
hadrian-ghc-in-ghci:
stage: quick-build
+ needs: [lint-linters, lint-submods]
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
before_script:
# workaround for docker permissions
@@ -257,20 +299,56 @@ hadrian-ghc-in-ghci:
tags:
- x86_64-linux
script:
+ - .gitlab/ci.sh setup
- cabal update
- - cd hadrian; cabal new-build --project-file=ci.project; cd ..
+ - cd hadrian; cabal new-build -j`../mk/detect-cpu-count.sh` --with-compiler=$GHC --project-file=ci.project; cd ..
- git clean -xdf && git submodule foreach git clean -xdf
- - .gitlab/ci.sh setup
- - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
- ./boot
- ./configure $CONFIGURE_ARGS
# Load ghc-in-ghci then immediately exit and check the modules loaded
- echo ":q" | hadrian/ghci -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
+ after_script:
+ - cp -Rf $HOME/.cabal cabal-cache
cache:
key: hadrian-ghci
paths:
- cabal-cache
+############################################################
+# GHC source code linting
+############################################################
+
+.lint-params:
+ stage: lint
+ needs: [lint-submods]
+ tags:
+ - lint
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
+ before_script:
+ - export PATH="/opt/toolchain/bin:$PATH"
+ # workaround for docker permissions
+ - sudo chown ghc:ghc -R .
+ - git submodule sync --recursive
+ - git submodule update --init --recursive
+ - git checkout .gitmodules
+ - .gitlab/ci.sh setup
+ - cabal update
+ - cd hadrian; cabal new-build -j`../mk/detect-cpu-count.sh` --with-compiler=$GHC --project-file=ci.project; cd ..
+ after_script:
+ - cp -Rf $HOME/.cabal cabal-cache
+ variables:
+ GHC_FLAGS: -Werror
+ cache:
+ key: lint
+ paths:
+ - cabal-cache
+
+lint-base:
+ extends: .lint-params
+ script:
+ - hadrian/build -c -j stage1:lib:base
+ - hadrian/build -j lint:base
+
############################################################
# Validation via Pipelines (make)
############################################################
@@ -299,7 +377,9 @@ hadrian-ghc-in-ghci:
#################################
.build-x86_64-freebsd:
+ stage: full-build
extends: .validate
+ needs: [validate-x86_64-linux-deb9-hadrian]
tags:
- x86_64-freebsd
allow_failure: true
@@ -329,23 +409,19 @@ hadrian-ghc-in-ghci:
# Conditional due to lack of builder capacity
validate-x86_64-freebsd:
extends: .build-x86_64-freebsd
- stage: full-build
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*FreeBSD.*/'
nightly-x86_64-freebsd:
<<: *nightly
extends: .build-x86_64-freebsd
- stage: full-build
release-x86_64-freebsd:
<<: *release
extends: .build-x86_64-freebsd
- stage: full-build
.build-x86_64-freebsd-hadrian:
extends: .validate-hadrian
- stage: full-build
tags:
- x86_64-freebsd
allow_failure: true
@@ -354,9 +430,9 @@ release-x86_64-freebsd:
HADRIAN_ARGS: "--docs=no-sphinx"
GHC_VERSION: 8.6.3
CABAL_INSTALL_VERSION: 3.0.0.0
- BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-portbld-freebsd.tar.xz"
+ BIN_DIST_NAME: "ghc-x86_64-portbld-freebsd"
TEST_ENV: "x86_64-freebsd-hadrian"
- FLAVOUR: "validate"
+ BUILD_FLAVOUR: "validate"
after_script:
- cp -Rf $HOME/.cabal cabal-cache
- .gitlab/ci.sh clean
@@ -372,7 +448,6 @@ release-x86_64-freebsd:
# Disabled due to lack of builder capacity
.validate-x86_64-freebsd-hadrian:
extends: .build-x86_64-freebsd-hadrian
- stage: full-build
#################################
# x86_64-darwin
@@ -380,6 +455,7 @@ release-x86_64-freebsd:
validate-x86_64-darwin:
extends: .validate
+ needs: [validate-x86_64-linux-deb9-hadrian]
stage: full-build
tags:
- x86_64-darwin
@@ -409,6 +485,7 @@ validate-x86_64-darwin:
# Disabled because of OS X CI capacity
.validate-x86_64-darwin-hadrian:
stage: full-build
+ needs: [validate-x86_64-linux-deb9-hadrian]
tags:
- x86_64-darwin
variables:
@@ -418,7 +495,8 @@ validate-x86_64-darwin:
LANG: "en_US.UTF-8"
CONFIGURE_ARGS: --with-intree-gmp
TEST_ENV: "x86_64-darwin-hadrian"
- FLAVOUR: "validate"
+ BIN_DIST_NAME: "ghc-x86_64-apple-darwin"
+ BUILD_FLAVOUR: "validate"
script:
- .gitlab/ci.sh setup
- .gitlab/ci.sh configure
@@ -433,11 +511,12 @@ validate-x86_64-darwin:
reports:
junit: junit.xml
paths:
- - ghc.tar.xz
+ - "$BIN_DIST_NAME.tar.xz"
- junit.xml
.validate-linux:
extends: .validate
+ needs: [validate-x86_64-linux-deb9-hadrian]
tags:
- x86_64-linux
variables:
@@ -460,66 +539,74 @@ validate-x86_64-darwin:
- toolchain
#################################
-# aarch64-linux-deb9
+# aarch64-linux-deb10
#################################
-.build-aarch64-linux-deb9:
+.build-aarch64-linux-deb10:
extends: .validate-linux
stage: full-build
- image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:$DOCKER_REV"
+ image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV"
allow_failure: true
variables:
- TEST_ENV: "aarch64-linux-deb9"
- BIN_DIST_PREP_TAR_COMP: "ghc-aarch64-linux-deb9.tar.xz"
+ TEST_ENV: "aarch64-linux-deb10"
+ BIN_DIST_PREP_TAR_COMP: "ghc-aarch64-linux-deb10.tar.xz"
cache:
- key: linux-aarch64-deb9
+ key: linux-aarch64-deb10
+ tags:
+ - aarch64-linux
+
+.build-aarch64-linux-deb10-llvm:
+ extends: .build-aarch64-linux-deb10
+ stage: full-build
+ variables:
+ BUILD_FLAVOUR: perf-llvm
tags:
- aarch64-linux
-validate-aarch64-linux-deb9:
- extends: .build-aarch64-linux-deb9
+validate-aarch64-linux-deb10:
+ extends: .build-aarch64-linux-deb10
artifacts:
when: always
expire_in: 2 week
-nightly-aarch64-linux-deb9:
+nightly-aarch64-linux-deb10:
<<: *nightly
- extends: .build-aarch64-linux-deb9
+ extends: .build-aarch64-linux-deb10
variables:
TEST_TYPE: slowtest
#################################
-# armv7-linux-deb9
+# armv7-linux-deb10
#################################
-.build-armv7-linux-deb9:
+.build-armv7-linux-deb10:
extends: .validate-linux
stage: full-build
- image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb9:$DOCKER_REV"
+ image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV"
# Due to linker issues
allow_failure: true
variables:
- TEST_ENV: "armv7-linux-deb9"
- BIN_DIST_PREP_TAR_COMP: "ghc-armv7-linux-deb9.tar.xz"
+ TEST_ENV: "armv7-linux-deb10"
+ BIN_DIST_PREP_TAR_COMP: "ghc-armv7-linux-deb10.tar.xz"
CONFIGURE_ARGS: "--host=armv7-linux-gnueabihf --build=armv7-linux-gnueabihf --target=armv7-linux-gnueabihf"
# N.B. We disable ld.lld explicitly here because it appears to fail
# non-deterministically on ARMv7. See #18280.
LD: "ld.gold"
GccUseLdOpt: "-fuse-ld=gold"
cache:
- key: linux-armv7-deb9
+ key: linux-armv7-deb10
tags:
- armv7-linux
-validate-armv7-linux-deb9:
- extends: .build-armv7-linux-deb9
+validate-armv7-linux-deb10:
+ extends: .build-armv7-linux-deb10
artifacts:
when: always
expire_in: 2 week
-nightly-armv7-linux-deb9:
+nightly-armv7-linux-deb10:
<<: *nightly
- extends: .build-armv7-linux-deb9
+ extends: .build-armv7-linux-deb10
variables:
TEST_TYPE: slowtest
@@ -599,23 +686,6 @@ validate-x86_64-linux-deb9-debug:
when: always
expire_in: 2 week
-validate-x86_64-linux-deb9-llvm:
- extends: .build-x86_64-linux-deb9
- stage: full-build
- rules:
- - if: '$CI_MERGE_REQUEST_LABELS =~ /.*LLVM backend.*/'
- variables:
- BUILD_FLAVOUR: perf-llvm
- TEST_ENV: "x86_64-linux-deb9-llvm"
-
-nightly-x86_64-linux-deb9-llvm:
- <<: *nightly
- extends: .build-x86_64-linux-deb9
- stage: full-build
- variables:
- BUILD_FLAVOUR: perf-llvm
- TEST_ENV: "x86_64-linux-deb9-llvm"
-
validate-x86_64-linux-deb9-integer-simple:
extends: .build-x86_64-linux-deb9
stage: full-build
@@ -691,6 +761,61 @@ release-x86_64-linux-deb10:
<<: *release
extends: .build-x86_64-linux-deb10
+release-x86_64-linux-deb10-dwarf:
+ <<: *release
+ extends: .build-x86_64-linux-deb10
+ variables:
+ CONFIGURE_ARGS: "--enable-dwarf-unwind"
+ BUILD_FLAVOUR: dwarf
+ TEST_ENV: "x86_64-linux-deb10-dwarf"
+ BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb10-linux-dwarf.tar.xz"
+
+validate-x86_64-linux-deb10-llvm:
+ extends: .build-x86_64-linux-deb10
+ stage: full-build
+ rules:
+ - if: '$CI_MERGE_REQUEST_LABELS =~ /.*LLVM backend.*/'
+ variables:
+ BUILD_FLAVOUR: perf-llvm
+ TEST_ENV: "x86_64-linux-deb10-llvm"
+
+nightly-x86_64-linux-deb10-llvm:
+ <<: *nightly
+ extends: .build-x86_64-linux-deb10
+ stage: full-build
+ variables:
+ BUILD_FLAVOUR: perf-llvm
+ TEST_ENV: "x86_64-linux-deb10-llvm"
+
+#################################
+# x86_64-linux-ubuntu 20.04
+#################################
+
+.build-x86_64-linux-ubuntu2004:
+ extends: .validate-linux
+ stage: full-build
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-ubuntu20_04:$DOCKER_REV"
+ variables:
+ TEST_ENV: "x86_64-linux-ubuntu2004"
+ BIN_DIST_PREP_TAR_COMP: "./ghc-x86_64-ubuntu2004-linux.tar.xz"
+ cache:
+ key: linux-x86_64-ubuntu2004
+
+# Disabled to alleviate CI load
+.validate-x86_64-linux-ubuntu2004:
+ extends: .build-x86_64-linux-ubuntu2004
+ stage: full-build
+
+nightly-x86_64-linux-ubuntu2004:
+ <<: *nightly
+ extends: .build-x86_64-linux-ubuntu2004
+ variables:
+ TEST_TYPE: slowtest
+
+release-x86_64-linux-ubuntu2004:
+ <<: *release
+ extends: .build-x86_64-linux-ubuntu2004
+
#################################
# x86_64-linux-deb8
#################################
@@ -724,12 +849,12 @@ release-x86_64-linux-deb8:
.build-x86_64-linux-alpine-hadrian:
extends: .validate-linux-hadrian
stage: full-build
- image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine:$DOCKER_REV"
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV"
# There are currently a few failing tests
allow_failure: true
variables:
TEST_ENV: "x86_64-linux-alpine"
- BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-alpine-linux.tar.xz"
+ BIN_DIST_NAME: "ghc-x86_64-alpine-linux"
# Can't use ld.gold due to #13958.
CONFIGURE_ARGS: "--disable-ld-override"
HADRIAN_ARGS: "--docs=no-sphinx"
@@ -777,13 +902,15 @@ release-x86_64-linux-centos7:
# x86_64-linux-fedora27
#################################
-validate-x86_64-linux-fedora27:
+.build-x86_64-linux-fedora27:
extends: .validate-linux
stage: full-build
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV"
variables:
+ # LLVM 10 is not available for Fedora27
+ LLC: /bin/false
+ OPT: /bin/false
TEST_ENV: "x86_64-linux-fedora27"
- BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-fedora27-linux.tar.xz"
cache:
key: linux-x86_64-fedora27
artifacts:
@@ -792,13 +919,26 @@ validate-x86_64-linux-fedora27:
# longer.
expire_in: 8 week
+validate-x86_64-linux-fedora27:
+ extends: .build-x86_64-linux-fedora27
+ variables:
+ BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-fedora27-linux.tar.xz"
+
+release-x86_64-linux-fedora27-dwarf:
+ <<: *release
+ extends: .build-x86_64-linux-fedora27
+ variables:
+ CONFIGURE_ARGS: "--enable-dwarf-unwind"
+ BUILD_FLAVOUR: dwarf
+ BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-fedora27-linux-dwarf.tar.xz"
+ TEST_ENV: "x86_64-linux-fedora27-dwarf"
+
############################################################
# Validation via Pipelines (Windows)
############################################################
.build-windows:
- # For the reasons given in #17777 this build isn't reliable.
- allow_failure: true
+ needs: [validate-x86_64-linux-deb9-hadrian]
before_script:
- git clean -xdf
@@ -825,7 +965,7 @@ validate-x86_64-linux-fedora27:
extends: .build-windows
stage: full-build
variables:
- FLAVOUR: "validate"
+ BUILD_FLAVOUR: "validate"
# skipping perf tests for now since we build a quick-flavoured GHC,
# which might result in some broken perf tests?
HADRIAN_ARGS: "--docs=no-sphinx --skip-perf"
@@ -843,7 +983,7 @@ validate-x86_64-linux-fedora27:
expire_in: 2 week
when: always
paths:
- - ghc.tar.xz
+ - "$BIN_DIST_NAME.tar.xz"
- junit.xml
.build-x86_64-windows-hadrian:
@@ -851,6 +991,7 @@ validate-x86_64-linux-fedora27:
variables:
MSYSTEM: MINGW64
TEST_ENV: "x86_64-windows"
+ BIN_DIST_NAME: "ghc-x86_64-unknown-mingw32"
cache:
key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
@@ -910,45 +1051,8 @@ release-x86_64-windows-integer-simple:
variables:
BIGNUM_BACKEND: native
BUILD_FLAVOUR: "perf"
+ BIN_DIST_NAME: "ghc-x86_64-mingw32-unknown-nogmp"
-############################################################
-# Cleanup
-############################################################
-
-# 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
-# on Darwin. To avoid running out of disk space we add a stage at the end of
-# the build to remove the /.../GitLabRunner/builds directory. Since we only run a
-# single build at a time on Darwin this should be safe.
-#
-# We used to have a similar cleanup job on Windows as well however it ended up
-# being quite fragile as we have multiple Windows builders yet there is no
-# guarantee that the cleanup job is run on the same machine as the build itself
-# was run. Consequently we were forced to instead handle cleanup with a separate
-# cleanup cron job on Windows.
-#
-# [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856
-
-# See Note [Cleanup after shell executor]
-cleanup-darwin:
- stage: cleanup
- tags:
- - x86_64-darwin
- when: always
- dependencies: []
- 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
############################################################
# Packaging
@@ -956,6 +1060,9 @@ cleanup-darwin:
doc-tarball:
stage: packaging
+ needs: [validate-x86_64-linux-deb9-debug, validate-x86_64-windows-hadrian, validate-x86_64-linux-deb9-unreg-hadrian]
+ # N.B. Documentation isn't correctly packaged in Hadrian bindists
+ allow_failure: true
tags:
- x86_64-linux
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
@@ -964,9 +1071,7 @@ doc-tarball:
- validate-x86_64-windows-hadrian
variables:
LINUX_BINDIST: "ghc-x86_64-deb9-linux-debug.tar.xz"
- WINDOWS_BINDIST: "ghc-x86_64-mingw32.tar.xz"
- # Due to Windows allow_failure
- allow_failure: true
+ WINDOWS_BINDIST: "ghc-x86_64-unknown-mingw32.tar.xz"
artifacts:
paths:
- haddock.html.tar.xz
@@ -991,6 +1096,7 @@ doc-tarball:
source-tarball:
stage: packaging
+ needs: [validate-x86_64-linux-deb9-unreg-hadrian]
tags:
- x86_64-linux
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
@@ -1025,6 +1131,7 @@ source-tarball:
.hackage:
stage: testing
+ needs: [doc-tarball]
image: ghcci/x86_64-linux-deb9:0.2
tags:
- x86_64-linux
@@ -1053,6 +1160,7 @@ nightly-hackage:
perf-nofib:
stage: testing
+ needs: [validate-x86_64-linux-deb9-dwarf, doc-tarball]
dependencies:
- validate-x86_64-linux-deb9-dwarf
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
@@ -1072,8 +1180,8 @@ perf-nofib:
make install
popd
rm -Rf tmp
- - export BOOT_HC=$(which ghc)
- - cabal update; cabal install -w $BOOT_HC regex-compat
+ - export BOOT_HC=$GHC
+ - cabal update; cabal install -w "$BOOT_HC" --lib regex-compat
- export PATH=$root/bin:$PATH
- make -C nofib boot mode=fast -j$CPUS
- "make -C nofib EXTRA_RUNTEST_OPTS='-cachegrind +RTS -V0 -RTS' NoFibRuns=1 mode=fast -j$CPUS 2>&1 | tee nofib.log"
@@ -1083,17 +1191,52 @@ perf-nofib:
paths:
- nofib.log
+############################################################
+# Ad-hoc performance testing
+############################################################
+
+perf:
+ stage: testing
+ needs: [validate-x86_64-linux-deb9-dwarf, doc-tarball]
+ dependencies:
+ - validate-x86_64-linux-deb9-dwarf
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ - if: '$CI_COMMIT_BRANCH == "master"'
+ - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
+ tags:
+ - x86_64-linux-perf
+ script:
+ - root=$(pwd)/ghc
+ - |
+ mkdir tmp
+ tar -xf ghc-x86_64-deb9-linux-dwarf.tar.xz -C tmp
+ pushd tmp/ghc-*/
+ ./configure --prefix=$root
+ make install
+ popd
+ rm -Rf tmp
+ - export BOOT_HC=$(which ghc)
+ - export HC=$root/bin/ghc
+ - .gitlab/ci.sh perf_test
+ artifacts:
+ expire_in: 12 week
+ when: always
+ paths:
+ - out
+
+
############################################################
# Documentation deployment via GitLab Pages
############################################################
pages:
stage: deploy
+ needs: [doc-tarball]
dependencies:
- doc-tarball
image: ghcci/x86_64-linux-deb9:0.2
- # Due to Windows allow_failure
- allow_failure: true
tags:
- x86_64-linux
script:
@@ -1109,7 +1252,9 @@ pages:
EOF
- cp -f index.html public/doc
rules:
- - if: '$CI_COMMIT_BRANCH == "master"'
+ # N.B. only run this on ghc/ghc since the deployed pages are quite large
+ # and we only serve GitLab Pages for ghc/ghc.
+ - if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "ghc"'
artifacts:
paths:
- public
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6e4271452a171b5aef74b177f7b70e99f232f598
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6e4271452a171b5aef74b177f7b70e99f232f598
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201129/3e75c2a1/attachment-0001.html>
More information about the ghc-commits
mailing list