summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-03-29 10:01:57 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2021-03-29 10:01:57 +0800
commit2754ab55929c5259dcee095b55011d57bd3db61c (patch)
tree3d5168d5bea29caf09ae30c63259362b7c080fcf
parent54392309770bb7f39cb45aebeee675c346f14879 (diff)
downloadhaskell-wip/angerman/8.10.5-release.tar.gz
[gitlab-ci] align closer to masterwip/angerman/8.10.5-release
-rw-r--r--.gitlab-ci.yml79
1 files changed, 34 insertions, 45 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 831e93d208..e5aa0a93ac 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,9 @@ variables:
# Disable shallow clones; they break our linting rules
GIT_DEPTH: 0
+ # Always start with a fresh clone to avoid non-hermetic builds
+ GIT_STRATEGY: clone
+
# Overridden by individual jobs
CONFIGURE_ARGS: ""
@@ -73,9 +76,10 @@ workflow:
- if: '$CI_PIPELINE_SOURCE == "web"'
.nightly: &nightly
- only:
- variables:
- - $NIGHTLY
+ variables:
+ XZ_OPT: "-9"
+ rules:
+ - if: $NIGHTLY
artifacts:
when: always
expire_in: 8 weeks
@@ -83,13 +87,13 @@ workflow:
.release: &release
variables:
BUILD_FLAVOUR: "perf"
+ XZ_OPT: "-9"
FLAVOUR: "perf"
artifacts:
when: always
expire_in: 1 year
- only:
- variables:
- - $RELEASE_JOB == "yes"
+ rules:
+ - if: '$RELEASE_JOB == "yes"'
############################################################
# Runner Tags
@@ -123,13 +127,11 @@ ghc-linters:
dependencies: []
tags:
- lint
- only:
- refs:
- - merge_requests
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
# Run mypy Python typechecker on linter scripts.
lint-linters:
- <<: *only-default
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
@@ -140,7 +142,6 @@ lint-linters:
# Check that .T files all parse by listing broken tests.
lint-testsuite:
- <<: *only-default
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
script:
@@ -151,7 +152,6 @@ lint-testsuite:
# Run mypy Python typechecker on testsuite driver
typecheck-testsuite:
- <<: *only-default
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
@@ -164,7 +164,6 @@ typecheck-testsuite:
# accommodate, e.g., haddock changes not yet upstream) but not on `master` or
# Marge jobs.
.lint-submods:
- <<: *only-default
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
@@ -203,13 +202,11 @@ lint-submods-branch:
- "echo Linting submodule changes between $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
- git submodule foreach git remote update
- submodchecker . $(git rev-list $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA)
- only:
- refs:
- - master
- - /ghc-[0-9]+\.[0-9]+/
+ rules:
+ - if: '$CI_COMMIT_BRANCH == "master"'
+ - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
.lint-changelogs:
- <<: *only-default
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
dependencies: []
@@ -222,15 +219,13 @@ lint-changelogs:
extends: .lint-changelogs
# Allow failure since this isn't a final release.
allow_failure: true
- only:
- refs:
- - /ghc-[0-9]+\.[0-9]+/
+ rules:
+ - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
lint-release-changelogs:
extends: .lint-changelogs
- only:
- refs:
- - /ghc-[0-9]+\.[0-9]+\.[0-9]+-.*/
+ rules:
+ - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
############################################################
@@ -238,7 +233,6 @@ lint-release-changelogs:
############################################################
.validate-hadrian:
- <<: *only-default
variables:
FLAVOUR: "validate"
script:
@@ -288,7 +282,6 @@ validate-x86_64-linux-deb9-unreg-hadrian:
TEST_ENV: "x86_64-linux-deb9-unreg-hadrian"
hadrian-ghc-in-ghci:
- <<: *only-default
stage: quick-build
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
before_script:
@@ -321,7 +314,6 @@ hadrian-ghc-in-ghci:
############################################################
.validate:
- <<: *only-default
variables:
TEST_TYPE: test
MAKE_ARGS: "-Werror"
@@ -661,7 +653,6 @@ validate-aarch64-darwin:
# Disabled because of OS X CI capacity
.validate-x86_64-darwin-hadrian:
- <<: *only-default
stage: full-build
tags:
- x86_64-darwin
@@ -1067,7 +1058,6 @@ release-x86_64-linux-fedora27-dwarf:
############################################################
.build-windows:
- <<: *only-default
# For the reasons given in #17777 this build isn't reliable.
allow_failure: true
before_script:
@@ -1226,7 +1216,6 @@ nightly-i386-windows:
############################################################
doc-tarball:
- <<: *only-default
stage: packaging
tags:
- x86_64-linux
@@ -1266,10 +1255,10 @@ source-tarball:
tags:
- x86_64-linux
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
- when: always
dependencies: []
- only:
- - tags
+ rules:
+ - if: $CI_COMMIT_TAG
+ when: always
artifacts:
paths:
- ghc-*.tar.xz
@@ -1296,7 +1285,6 @@ source-tarball:
# pipeline.
.hackage:
- <<: *only-default
stage: testing
image: ghcci/x86_64-linux-deb9:0.2
tags:
@@ -1313,12 +1301,12 @@ hackage:
hackage-label:
extends: .hackage
- only:
- variables:
- - $CI_MERGE_REQUEST_LABELS =~ /.*user-facing.*/
+ rules:
+ - if: '$CI_MERGE_REQUEST_LABELS =~ /.*user-facing.*/'
nightly-hackage:
- <<: *nightly
+ rules:
+ - if: $NIGHTLY
extends: .hackage
############################################################
@@ -1330,11 +1318,10 @@ perf-nofib:
dependencies:
- validate-x86_64-linux-deb9-dwarf
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
- only:
- refs:
- - merge_requests
- - master
- - /ghc-[0-9]+\.[0-9]+/
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ - if: '$CI_COMMIT_BRANCH == "master"'
+ - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
tags:
- x86_64-linux
script:
@@ -1383,8 +1370,10 @@ pages:
<meta http-equiv="refresh" content="1; url=doc/">
EOF
- cp -f index.html public/doc
- only:
- - master
+ rules:
+ # 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