summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-07-20 13:42:15 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-08 19:39:20 -0400
commit5b26f32412d503c9004fc0a2e6e9a2ab680d43f3 (patch)
treea46a361ad8bb984561f08ae1f7d8354f78624529 /.gitlab
parent5765e13370634979eb6a0d9f67aa9afa797bee46 (diff)
downloadhaskell-5b26f32412d503c9004fc0a2e6e9a2ab680d43f3.tar.gz
gitlab-ci: Introduce validation job for aarch64 cross-compilation
Begins to address #11958.
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/gen_ci.hs10
-rw-r--r--.gitlab/jobs.yaml119
2 files changed, 128 insertions, 1 deletions
diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs
index c17d16f529..d9c9587790 100755
--- a/.gitlab/gen_ci.hs
+++ b/.gitlab/gen_ci.hs
@@ -116,6 +116,7 @@ data BuildConfig
, llvmBootstrap :: Bool
, withAssertions :: Bool
, withNuma :: Bool
+ , crossTarget :: Maybe String
, fullyStatic :: Bool
, tablesNextToCode :: Bool
, threadSanitiser :: Bool
@@ -126,6 +127,7 @@ configureArgsStr :: BuildConfig -> String
configureArgsStr bc = intercalate " " $
["--enable-unregisterised"| unregisterised bc ]
++ ["--disable-tables-next-to-code" | not (tablesNextToCode bc) ]
+ ++ ["--with-intree-gmp" | Just _ <- pure (crossTarget bc) ]
-- Compute the hadrian flavour from the BuildConfig
mkJobFlavour :: BuildConfig -> Flavour
@@ -156,6 +158,7 @@ vanilla = BuildConfig
, llvmBootstrap = False
, withAssertions = False
, withNuma = False
+ , crossTarget = Nothing
, fullyStatic = False
, tablesNextToCode = True
, threadSanitiser = False
@@ -186,6 +189,9 @@ static = vanilla { fullyStatic = True }
staticNativeInt :: BuildConfig
staticNativeInt = static { bignumBackend = Native }
+crossConfig :: String -> BuildConfig
+crossConfig triple = vanilla { crossTarget = Just triple }
+
llvm :: BuildConfig
llvm = vanilla { llvmBootstrap = True }
@@ -252,6 +258,7 @@ testEnv arch opsys bc = intercalate "-" $
++ ["unreg" | unregisterised bc ]
++ ["numa" | withNuma bc ]
++ ["no_tntc" | not (tablesNextToCode bc) ]
+ ++ ["cross_"++triple | Just triple <- pure $ crossTarget bc ]
++ [flavourString (mkJobFlavour bc)]
-- | The hadrian flavour string we are going to use for this build
@@ -597,7 +604,7 @@ job arch opsys buildConfig = (jobName, Job {..})
, "BUILD_FLAVOUR" =: flavourString jobFlavour
, "BIGNUM_BACKEND" =: bignumString (bignumBackend buildConfig)
, "CONFIGURE_ARGS" =: configureArgsStr buildConfig
-
+ , maybe M.empty ("CROSS_TARGET" =:) (crossTarget buildConfig)
, if withNuma buildConfig then "ENABLE_NUMA" =: "1" else M.empty
]
@@ -774,6 +781,7 @@ jobs = M.fromList $ concatMap flattenJobGroup $
, standardBuilds I386 (Linux Debian9)
, allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) static)
, disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) staticNativeInt))
+ , validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu")
]
where
diff --git a/.gitlab/jobs.yaml b/.gitlab/jobs.yaml
index 803c777522..0efa391a01 100644
--- a/.gitlab/jobs.yaml
+++ b/.gitlab/jobs.yaml
@@ -1378,6 +1378,66 @@
"XZ_OPT": "-9"
}
},
+ "nightly-x86_64-linux-deb11-cross_aarch64-linux-gnu-validate": {
+ "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-deb11-cross_aarch64-linux-gnu-validate.tar.xz",
+ "junit.xml"
+ ],
+ "reports": {
+ "junit": "junit.xml"
+ },
+ "when": "always"
+ },
+ "cache": {
+ "key": "x86_64-linux-deb11-$CACHE_REV",
+ "paths": [
+ "cabal-cache",
+ "toolchain"
+ ]
+ },
+ "dependencies": [],
+ "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$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-deb11-cross_aarch64-linux-gnu-validate",
+ "BUILD_FLAVOUR": "validate",
+ "CONFIGURE_ARGS": "--with-intree-gmp",
+ "CROSS_TARGET": "aarch64-linux-gnu",
+ "TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
+ "XZ_OPT": "-9"
+ }
+ },
"nightly-x86_64-linux-deb11-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
@@ -3857,6 +3917,65 @@
"TSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions"
}
},
+ "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate": {
+ "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-deb11-cross_aarch64-linux-gnu-validate.tar.xz",
+ "junit.xml"
+ ],
+ "reports": {
+ "junit": "junit.xml"
+ },
+ "when": "always"
+ },
+ "cache": {
+ "key": "x86_64-linux-deb11-$CACHE_REV",
+ "paths": [
+ "cabal-cache",
+ "toolchain"
+ ]
+ },
+ "dependencies": [],
+ "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$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-deb11-cross_aarch64-linux-gnu-validate",
+ "BUILD_FLAVOUR": "validate",
+ "CONFIGURE_ARGS": "--with-intree-gmp",
+ "CROSS_TARGET": "aarch64-linux-gnu",
+ "TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
+ }
+ },
"x86_64-linux-deb11-validate": {
"after_script": [
".gitlab/ci.sh save_cache",