diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-08-05 16:13:48 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-08-15 17:11:26 -0400 |
commit | 573569d5e3581f107076093c96ba53dcebff3f1c (patch) | |
tree | 6ea8a0d4d7256ae055ac643f2b6f92cab1c5b853 /.gitlab | |
parent | 4f1e1a30cbff24c7c3abb023f9dd843cd66cb411 (diff) | |
download | haskell-573569d5e3581f107076093c96ba53dcebff3f1c.tar.gz |
gitlab-ci: Bump to use freebsd13 runners
(cherry picked from commit ea90e61dc3c6ba0433e008284dc6c3970ead98a7)
Diffstat (limited to '.gitlab')
-rwxr-xr-x | .gitlab/ci.sh | 9 | ||||
-rwxr-xr-x | .gitlab/gen_ci.hs | 28 | ||||
-rw-r--r-- | .gitlab/jobs.yaml | 42 |
3 files changed, 40 insertions, 39 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 61117cf320..8423b3994f 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -206,6 +206,9 @@ function set_toolchain_paths() { CABAL="$toolchain/bin/cabal$exe" HAPPY="$toolchain/bin/happy$exe" ALEX="$toolchain/bin/alex$exe" + if [ "$(uname)" = "FreeBSD" ]; then + GHC=/usr/local/bin/ghc + fi ;; nix) if [[ ! -f toolchain.sh ]]; then @@ -287,7 +290,7 @@ function fetch_ghc() { cp -r ghc-${GHC_VERSION}*/* "$toolchain" ;; *) - pushd "ghc-${GHC_VERSION}*" + pushd ghc-${GHC_VERSION}* ./configure --prefix="$toolchain" "$MAKE" install popd @@ -325,9 +328,7 @@ function fetch_cabal() { local base_url="https://downloads.haskell.org/~cabal/cabal-install-$v/" case "$(uname)" in Darwin) cabal_url="$base_url/cabal-install-$v-x86_64-apple-darwin17.7.0.tar.xz" ;; - FreeBSD) - #cabal_url="$base_url/cabal-install-$v-x86_64-portbld-freebsd.tar.xz" ;; - cabal_url="http://home.smart-cactus.org/~ben/ghc/cabal-install-3.0.0.0-x86_64-portbld-freebsd.tar.xz" ;; + FreeBSD) cabal_url="$base_url/cabal-install-$v-x86_64-freebsd13.tar.xz" ;; *) fail "don't know where to fetch cabal-install for $(uname)" esac echo "Fetching cabal-install from $cabal_url" diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs index ec9c7714b2..6c76022224 100755 --- a/.gitlab/gen_ci.hs +++ b/.gitlab/gen_ci.hs @@ -92,7 +92,7 @@ names of jobs to update these other places. data Opsys = Linux LinuxDistro | Darwin - | FreeBSD + | FreeBSD13 | Windows deriving (Eq) data LinuxDistro @@ -210,7 +210,7 @@ runnerTag arch (Linux distro) = runnerTag AArch64 Darwin = "aarch64-darwin" runnerTag Amd64 Darwin = "x86_64-darwin-m1" runnerTag Amd64 Windows = "new-x86_64-windows" -runnerTag Amd64 FreeBSD = "x86_64-freebsd" +runnerTag Amd64 FreeBSD13 = "x86_64-freebsd13" tags :: Arch -> Opsys -> BuildConfig -> [String] tags arch opsys _bc = [runnerTag arch opsys] -- Tag for which runners we can use @@ -229,7 +229,7 @@ distroName Alpine = "alpine3_12" opsysName :: Opsys -> String opsysName (Linux distro) = "linux-" ++ distroName distro opsysName Darwin = "darwin" -opsysName FreeBSD = "freebsd" +opsysName FreeBSD13 = "freebsd13" opsysName Windows = "windows" archName :: Arch -> String @@ -299,7 +299,7 @@ type Variables = M.MonoidalMap String [String] a =: b = M.singleton a [b] opsysVariables :: Arch -> Opsys -> Variables -opsysVariables _ FreeBSD = mconcat +opsysVariables _ FreeBSD13 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt -- to use the "native" iconv embedded in libc as suggested by the -- porting guide [1]. @@ -307,7 +307,7 @@ opsysVariables _ FreeBSD = mconcat "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" , "HADRIAN_ARGS" =: "--docs=no-sphinx" , "GHC_VERSION" =: "9.2.2" - , "CABAL_INSTALL_VERSION" =: "3.2.0.0" + , "CABAL_INSTALL_VERSION" =: "3.6.2.0" ] opsysVariables ARMv7 (Linux distro) = distroVariables distro <> @@ -475,12 +475,12 @@ instance ToJSON OnOffRules where -- | A Rule corresponds to some condition which must be satisifed in order to -- run the job. -data Rule = FastCI -- ^ Run this job when the fast-ci label is set - | ReleaseOnly -- ^ Only run this job in a release pipeline - | Nightly -- ^ Only run this job in the nightly pipeline - | LLVMBackend -- ^ Only run this job when the "LLVM backend" label is present - | FreeBSDTag -- ^ Only run this job when the "FreeBSD" label is set. - | Disable -- ^ Don't run this job. +data Rule = FastCI -- ^ Run this job when the fast-ci label is set + | ReleaseOnly -- ^ Only run this job in a release pipeline + | Nightly -- ^ Only run this job in the nightly pipeline + | LLVMBackend -- ^ Only run this job when the "LLVM backend" label is present + | FreeBSDLabel -- ^ Only run this job when the "FreeBSD" label is set. + | Disable -- ^ Don't run this job. deriving (Bounded, Enum, Ord, Eq) -- A constant evaluating to True because gitlab doesn't support "true" in the @@ -498,8 +498,8 @@ ruleString On FastCI = true ruleString Off FastCI = "$CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/" ruleString On LLVMBackend = "$CI_MERGE_REQUEST_LABELS =~ /.*LLVM backend.*/" ruleString Off LLVMBackend = true -ruleString On FreeBSDTag = "$CI_MERGE_REQUEST_LABELS =~ /.*FreeBSD.*/" -ruleString Off FreeBSDTag = true +ruleString On FreeBSDLabel = "$CI_MERGE_REQUEST_LABELS =~ /.*FreeBSD.*/" +ruleString Off FreeBSDLabel = true ruleString On ReleaseOnly = "$RELEASE_JOB == \"yes\"" ruleString Off ReleaseOnly = "$RELEASE_JOB != \"yes\"" ruleString On Nightly = "$NIGHTLY" @@ -766,7 +766,7 @@ jobs = M.fromList $ concatMap flattenJobGroup $ , fastCI (standardBuilds Amd64 Windows) , disableValidate (standardBuildsWithConfig Amd64 Windows nativeInt) , standardBuilds Amd64 Darwin - , allowFailureGroup (addValidateRule FreeBSDTag (standardBuilds Amd64 FreeBSD)) + , allowFailureGroup (addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD13)) , standardBuilds AArch64 Darwin , standardBuilds AArch64 (Linux Debian10) , allowFailureGroup (disableValidate (standardBuilds ARMv7 (Linux Debian10))) diff --git a/.gitlab/jobs.yaml b/.gitlab/jobs.yaml index 2b057f8400..b82413d94e 100644 --- a/.gitlab/jobs.yaml +++ b/.gitlab/jobs.yaml @@ -541,7 +541,7 @@ "ac_cv_func_utimensat": "no" } }, - "nightly-x86_64-freebsd-validate": { + "nightly-x86_64-freebsd13-validate": { "after_script": [ ".gitlab/ci.sh save_cache", ".gitlab/ci.sh clean", @@ -551,7 +551,7 @@ "artifacts": { "expire_in": "8 weeks", "paths": [ - "ghc-x86_64-freebsd-validate.tar.xz", + "ghc-x86_64-freebsd13-validate.tar.xz", "junit.xml" ], "reports": { @@ -560,7 +560,7 @@ "when": "always" }, "cache": { - "key": "x86_64-freebsd-$CACHE_REV", + "key": "x86_64-freebsd13-$CACHE_REV", "paths": [ "cabal-cache", "toolchain" @@ -588,17 +588,17 @@ ], "stage": "full-build", "tags": [ - "x86_64-freebsd" + "x86_64-freebsd13" ], "variables": { "BIGNUM_BACKEND": "gmp", - "BIN_DIST_NAME": "ghc-x86_64-freebsd-validate", + "BIN_DIST_NAME": "ghc-x86_64-freebsd13-validate", "BUILD_FLAVOUR": "validate", - "CABAL_INSTALL_VERSION": "3.2.0.0", + "CABAL_INSTALL_VERSION": "3.6.2.0", "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ", "GHC_VERSION": "9.2.2", "HADRIAN_ARGS": "--docs=no-sphinx", - "TEST_ENV": "x86_64-freebsd-validate", + "TEST_ENV": "x86_64-freebsd13-validate", "XZ_OPT": "-9" } }, @@ -2050,7 +2050,7 @@ "ac_cv_func_utimensat": "no" } }, - "release-x86_64-freebsd-release": { + "release-x86_64-freebsd13-release": { "after_script": [ ".gitlab/ci.sh save_cache", ".gitlab/ci.sh clean", @@ -2060,7 +2060,7 @@ "artifacts": { "expire_in": "1 year", "paths": [ - "ghc-x86_64-freebsd-release.tar.xz", + "ghc-x86_64-freebsd13-release.tar.xz", "junit.xml" ], "reports": { @@ -2069,7 +2069,7 @@ "when": "always" }, "cache": { - "key": "x86_64-freebsd-$CACHE_REV", + "key": "x86_64-freebsd13-$CACHE_REV", "paths": [ "cabal-cache", "toolchain" @@ -2097,18 +2097,18 @@ ], "stage": "full-build", "tags": [ - "x86_64-freebsd" + "x86_64-freebsd13" ], "variables": { "BIGNUM_BACKEND": "gmp", - "BIN_DIST_NAME": "ghc-x86_64-freebsd-release", + "BIN_DIST_NAME": "ghc-x86_64-freebsd13-release", "BUILD_FLAVOUR": "release", - "CABAL_INSTALL_VERSION": "3.2.0.0", + "CABAL_INSTALL_VERSION": "3.6.2.0", "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ", "GHC_VERSION": "9.2.2", "HADRIAN_ARGS": "--docs=no-sphinx", "IGNORE_PERF_FAILURES": "all", - "TEST_ENV": "x86_64-freebsd-release", + "TEST_ENV": "x86_64-freebsd13-release", "XZ_OPT": "-9" } }, @@ -2970,7 +2970,7 @@ "ac_cv_func_utimensat": "no" } }, - "x86_64-freebsd-validate": { + "x86_64-freebsd13-validate": { "after_script": [ ".gitlab/ci.sh save_cache", ".gitlab/ci.sh clean", @@ -2980,7 +2980,7 @@ "artifacts": { "expire_in": "2 weeks", "paths": [ - "ghc-x86_64-freebsd-validate.tar.xz", + "ghc-x86_64-freebsd13-validate.tar.xz", "junit.xml" ], "reports": { @@ -2989,7 +2989,7 @@ "when": "always" }, "cache": { - "key": "x86_64-freebsd-$CACHE_REV", + "key": "x86_64-freebsd13-$CACHE_REV", "paths": [ "cabal-cache", "toolchain" @@ -3017,17 +3017,17 @@ ], "stage": "full-build", "tags": [ - "x86_64-freebsd" + "x86_64-freebsd13" ], "variables": { "BIGNUM_BACKEND": "gmp", - "BIN_DIST_NAME": "ghc-x86_64-freebsd-validate", + "BIN_DIST_NAME": "ghc-x86_64-freebsd13-validate", "BUILD_FLAVOUR": "validate", - "CABAL_INSTALL_VERSION": "3.2.0.0", + "CABAL_INSTALL_VERSION": "3.6.2.0", "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ", "GHC_VERSION": "9.2.2", "HADRIAN_ARGS": "--docs=no-sphinx", - "TEST_ENV": "x86_64-freebsd-validate" + "TEST_ENV": "x86_64-freebsd13-validate" } }, "x86_64-linux-alpine3_12-int_native-validate+fully_static": { |