summaryrefslogtreecommitdiff
path: root/.gitlab/generate_jobs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-07 17:14:14 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-24 17:13:59 -0400
commit5ff690b8474c74e9c968ef31e568c1ad0fe719a1 (patch)
tree6201a4cbef23d145555ada147c707c34a068bd2b /.gitlab/generate_jobs
parentfefd4e312f0249117f2d5a5a6962edb1e0b6ed19 (diff)
downloadhaskell-5ff690b8474c74e9c968ef31e568c1ad0fe719a1.tar.gz
ci: Generate jobs for all normal builds and use hadrian for all builds
This commit introduces a new script (.gitlab/gen_ci.hs) which generates a yaml file (.gitlab/jobs.yaml) which contains explicit descriptions for all the jobs we want to run. The jobs are separated into three categories: * validate - jobs run on every MR * nightly - jobs run once per day on the master branch * release - jobs for producing release artifacts The generation script is a Haskell program which includes a DSL for specifying the different jobs. The hope is that it's easier to reason about the different jobs and how the variables are merged together rather than the unclear and opaque yaml syntax. The goal is to fix issues like #21190 once and for all.. The `.gitlab/jobs.yaml` can be generated by running the `.gitlab/generate_jobs` script. You have to do this manually. Another consequence of this patch is that we use hadrian for all the validate, nightly and release builds on all platforms.
Diffstat (limited to '.gitlab/generate_jobs')
-rwxr-xr-x.gitlab/generate_jobs9
1 files changed, 9 insertions, 0 deletions
diff --git a/.gitlab/generate_jobs b/.gitlab/generate_jobs
new file mode 100755
index 0000000000..863ff37670
--- /dev/null
+++ b/.gitlab/generate_jobs
@@ -0,0 +1,9 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p cabal-install ghc jq
+
+cd "$(dirname "${BASH_SOURCE[0]}")"
+tmp=$(mktemp)
+./gen_ci.hs $tmp
+rm -f jobs.yaml
+echo "### THIS IS A GENERATED FILE, DO NOT MODIFY DIRECTLY" > jobs.yaml
+cat $tmp | jq | tee -a jobs.yaml