[Git][ghc/ghc][wip/fix_rel_eng-ubuntu] gen_ci: Only consider release jobs for job metadata
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Sat Jan 28 10:22:24 UTC 2023
Matthew Pickering pushed to branch wip/fix_rel_eng-ubuntu at Glasgow Haskell Compiler / GHC
Commits:
1510525b by Matthew Pickering at 2023-01-28T10:22:11+00:00
gen_ci: Only consider release jobs for job metadata
In particular we do not have a release job for FreeBSD so the generation
of the platform mapping was failing.
- - - - -
2 changed files:
- .gitlab-ci.yml
- .gitlab/gen_ci.hs
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -277,6 +277,8 @@ lint-ci-config:
- .gitlab/generate_jobs
# 1 if .gitlab/generate_jobs changed the output of the generated config
- nix shell nixpkgs#git -c git diff --exit-code
+ # And run this to just make sure that works
+ - .gitlab/generate_job_metadata
dependencies: []
lint-submods:
=====================================
.gitlab/gen_ci.hs
=====================================
@@ -17,7 +17,6 @@ import Data.List (intercalate)
import Data.Set (Set)
import qualified Data.Set as S
import System.Environment
-import Data.Maybe
{-
Note [Generating the CI pipeline]
@@ -932,7 +931,7 @@ mkPlatform arch opsys = archName arch <> "-" <> opsysName opsys
-- * Explicitly require tie-breaking for other cases.
platform_mapping :: Map String (JobGroup BindistInfo)
platform_mapping = Map.map go $
- Map.fromListWith combine [ (uncurry mkPlatform (jobPlatform (jobInfo $ v j)), j) | j <- job_groups ]
+ Map.fromListWith combine [ (uncurry mkPlatform (jobPlatform (jobInfo $ v j)), j) | j <- filter hasReleaseBuild job_groups ]
where
whitelist = [ "x86_64-linux-alpine3_12-int_native-validate+fully_static"
, "x86_64-linux-deb10-validate"
@@ -943,8 +942,6 @@ platform_mapping = Map.map go $
combine a b
| name (v a) `elem` whitelist = a -- Explicitly selected
| name (v b) `elem` whitelist = b
- | hasReleaseBuild a, not (hasReleaseBuild b) = a -- Has release build, but other doesn't
- | hasReleaseBuild b, not (hasReleaseBuild a) = b
| otherwise = error (show (name (v a)) ++ show (name (v b)))
go = fmap (BindistInfo . unwords . fromJust . mmlookup "BIN_DIST_NAME" . jobVariables)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1510525bc593c9a442f27a7d3e3f9b399eb3e79b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1510525bc593c9a442f27a7d3e3f9b399eb3e79b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230128/bd2b3cee/attachment-0001.html>
More information about the ghc-commits
mailing list