From 41eb749ada594961fc3276df6bb7319a396a167d Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Wed, 29 Jun 2022 15:39:55 +0100 Subject: Add nightly job for generating docs suitable for hackage upload --- .gitlab/gen_ci.hs | 8 +++ .gitlab/jobs.yaml | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+) (limited to '.gitlab') diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs index d6bff8e2da..ec9c7714b2 100755 --- a/.gitlab/gen_ci.hs +++ b/.gitlab/gen_ci.hs @@ -712,6 +712,10 @@ data JobGroup a = StandardTriple { v :: (String, a) | ValidateOnly { v :: (String, a) , n :: (String, a) } deriving Functor +rename :: (String -> String) -> JobGroup a -> JobGroup a +rename f (StandardTriple (nv, v) (nn, n) (nr, r)) = StandardTriple (f nv, v) (f nn, n) (f nr, r) +rename f (ValidateOnly (nv, v) (nn, n)) = ValidateOnly (f nv, v) (f nn, n) + -- | Construct a 'JobGroup' which consists of a validate, nightly and release build with -- a specific config. standardBuildsWithConfig :: Arch -> Opsys -> BuildConfig -> JobGroup Job @@ -756,6 +760,8 @@ jobs = M.fromList $ concatMap flattenJobGroup $ -- Fedora33 job is always built with perf so there's one job in the normal -- validate pipeline which is built with perf. , (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig) + -- This job is only for generating head.hackage docs + , hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig)) , disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) dwarf) , fastCI (standardBuilds Amd64 Windows) , disableValidate (standardBuildsWithConfig Amd64 Windows nativeInt) @@ -770,6 +776,8 @@ jobs = M.fromList $ concatMap flattenJobGroup $ ] where + hackage_doc_job = rename (<> "-hackage") . modifyJobs (addVariable "HADRIAN_ARGS" "--haddock-base-url") + tsan_jobs = modifyJobs ( addVariable "TSAN_OPTIONS" "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions" diff --git a/.gitlab/jobs.yaml b/.gitlab/jobs.yaml index ed95507314..2b057f8400 100644 --- a/.gitlab/jobs.yaml +++ b/.gitlab/jobs.yaml @@ -1440,6 +1440,68 @@ "XZ_OPT": "-9" } }, + "nightly-x86_64-linux-fedora33-release-hackage": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-x86_64-linux-fedora33-release.tar.xz", + "junit.xml" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-linux-fedora33-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release", + "BUILD_FLAVOUR": "release", + "CONFIGURE_ARGS": "", + "HADRIAN_ARGS": "--haddock-base-url", + "LLC": "/bin/false", + "OPT": "/bin/false", + "TEST_ENV": "x86_64-linux-fedora33-release", + "XZ_OPT": "-9" + } + }, "nightly-x86_64-linux-fedora33-validate+debug_info": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -2601,6 +2663,69 @@ "XZ_OPT": "-9" } }, + "release-x86_64-linux-fedora33-release-hackage": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-x86_64-linux-fedora33-release.tar.xz", + "junit.xml" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-linux-fedora33-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release", + "BUILD_FLAVOUR": "release", + "CONFIGURE_ARGS": "", + "HADRIAN_ARGS": "--haddock-base-url", + "IGNORE_PERF_FAILURES": "all", + "LLC": "/bin/false", + "OPT": "/bin/false", + "TEST_ENV": "x86_64-linux-fedora33-release", + "XZ_OPT": "-9" + } + }, "release-x86_64-linux-ubuntu20_04-release": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3731,6 +3856,67 @@ "TEST_ENV": "x86_64-linux-fedora33-release" } }, + "x86_64-linux-fedora33-release-hackage": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-x86_64-linux-fedora33-release.tar.xz", + "junit.xml" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-linux-fedora33-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"disabled\" != \"disabled\")", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release", + "BUILD_FLAVOUR": "release", + "CONFIGURE_ARGS": "", + "HADRIAN_ARGS": "--haddock-base-url", + "LLC": "/bin/false", + "OPT": "/bin/false", + "TEST_ENV": "x86_64-linux-fedora33-release" + } + }, "x86_64-linux-fedora33-validate+debug_info": { "after_script": [ ".gitlab/ci.sh save_cache", -- cgit v1.2.1