diff options
Diffstat (limited to '.gitlab/gen_ci.hs')
-rwxr-xr-x | .gitlab/gen_ci.hs | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs index db338b88d4..bf2ad41025 100755 --- a/.gitlab/gen_ci.hs +++ b/.gitlab/gen_ci.hs @@ -109,6 +109,11 @@ bignumString :: BignumBackend -> String bignumString Gmp = "gmp" bignumString Native = "native" +data CrossEmulator + = NoEmulator + | NoEmulatorNeeded + | Emulator String + -- | A BuildConfig records all the options which can be modified to affect the -- bindists produced by the compiler. data BuildConfig @@ -120,7 +125,8 @@ data BuildConfig , withAssertions :: Bool , withNuma :: Bool , crossTarget :: Maybe String - , crossEmulator :: Maybe String + , crossEmulator :: CrossEmulator + , configureWrapper :: Maybe String , fullyStatic :: Bool , tablesNextToCode :: Bool , threadSanitiser :: Bool @@ -163,7 +169,8 @@ vanilla = BuildConfig , withAssertions = False , withNuma = False , crossTarget = Nothing - , crossEmulator = Nothing + , crossEmulator = NoEmulator + , configureWrapper = Nothing , fullyStatic = False , tablesNextToCode = True , threadSanitiser = False @@ -195,11 +202,13 @@ staticNativeInt :: BuildConfig staticNativeInt = static { bignumBackend = Native } crossConfig :: String -- ^ target triple - -> Maybe String -- ^ emulator for testing + -> CrossEmulator -- ^ emulator for testing + -> Maybe String -- ^ Configure wrapper -> BuildConfig -crossConfig triple emulator = +crossConfig triple emulator configure_wrapper = vanilla { crossTarget = Just triple , crossEmulator = emulator + , configureWrapper = configure_wrapper } llvm :: BuildConfig @@ -636,8 +645,14 @@ job arch opsys buildConfig = (jobName, Job {..}) , "BUILD_FLAVOUR" =: flavourString jobFlavour , "BIGNUM_BACKEND" =: bignumString (bignumBackend buildConfig) , "CONFIGURE_ARGS" =: configureArgsStr buildConfig + , maybe mempty ("CONFIGURE_WRAPPER" =:) (configureWrapper buildConfig) , maybe mempty ("CROSS_TARGET" =:) (crossTarget buildConfig) - , maybe mempty ("CROSS_EMULATOR" =:) (crossEmulator buildConfig) + , case crossEmulator buildConfig of + NoEmulator -> case crossTarget buildConfig of + Nothing -> mempty + Just _ -> "CROSS_EMULATOR" =: "NOT_SET" -- we need an emulator but it isn't set. Won't run the testsuite + Emulator s -> "CROSS_EMULATOR" =: s + NoEmulatorNeeded -> mempty , if withNuma buildConfig then "ENABLE_NUMA" =: "1" else mempty ] @@ -813,7 +828,11 @@ jobs = Map.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" (Just "qemu-aarch64 -L /usr/aarch64-linux-gnu")) + , validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing) + , validateBuilds Amd64 (Linux Debian11) (crossConfig "js-unknown-ghcjs" NoEmulatorNeeded (Just "emconfigure") + ) + { bignumBackend = Native + } ] where |