[Git][ghc/ghc][master] 4 commits: ci: Remove FreeBSD job from release pipelines

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Jan 31 02:21:33 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
de963cb6 by Matthew Pickering at 2023-01-30T21:21:11-05:00
ci: Remove FreeBSD job from release pipelines

We no longer attempt to build or distribute this release

- - - - -
f26d27ec by Matthew Pickering at 2023-01-30T21:21:11-05:00
rel_eng: Add check to make sure that release jobs are downloaded by fetch-gitlab

This check makes sure that if a job is a prefixed by "release-" then the
script downloads it and understands how to map the job name to the
platform.

- - - - -
7619c0b4 by Matthew Pickering at 2023-01-30T21:21:11-05:00
rel_eng: Fix the name of the ubuntu-* jobs

These were not uploaded for alpha1

Fixes #22844

- - - - -
68eb8877 by Matthew Pickering at 2023-01-30T21:21:11-05: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.

- - - - -


4 changed files:

- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py


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]
@@ -875,7 +874,7 @@ job_groups =
      , fastCI (standardBuildsWithConfig Amd64 Windows (splitSectionsBroken vanilla))
      , disableValidate (standardBuildsWithConfig Amd64 Windows (splitSectionsBroken nativeInt))
      , standardBuilds Amd64 Darwin
-     , allowFailureGroup (addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD13))
+     , allowFailureGroup (addValidateRule FreeBSDLabel (validateBuilds Amd64 FreeBSD13 vanilla))
      , standardBuilds AArch64 Darwin
      , standardBuildsWithConfig AArch64 (Linux Debian10) (splitSectionsBroken vanilla)
      , disableValidate (validateBuilds AArch64 (Linux Debian10) llvm)
@@ -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)


=====================================
.gitlab/jobs.yaml
=====================================
@@ -2358,68 +2358,6 @@
       "ac_cv_func_utimensat": "no"
     }
   },
-  "release-x86_64-freebsd13-release": {
-    "after_script": [
-      ".gitlab/ci.sh save_cache",
-      ".gitlab/ci.sh clean",
-      "cat ci_timings"
-    ],
-    "allow_failure": true,
-    "artifacts": {
-      "expire_in": "1 year",
-      "paths": [
-        "ghc-x86_64-freebsd13-release.tar.xz",
-        "junit.xml"
-      ],
-      "reports": {
-        "junit": "junit.xml"
-      },
-      "when": "always"
-    },
-    "cache": {
-      "key": "x86_64-freebsd13-$CACHE_REV",
-      "paths": [
-        "cabal-cache",
-        "toolchain"
-      ]
-    },
-    "dependencies": [],
-    "image": null,
-    "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": [
-      ".gitlab/ci.sh setup",
-      ".gitlab/ci.sh configure",
-      ".gitlab/ci.sh build_hadrian",
-      ".gitlab/ci.sh test_hadrian"
-    ],
-    "stage": "full-build",
-    "tags": [
-      "x86_64-freebsd13"
-    ],
-    "variables": {
-      "BIGNUM_BACKEND": "gmp",
-      "BIN_DIST_NAME": "ghc-x86_64-freebsd13-release",
-      "BUILD_FLAVOUR": "release",
-      "CABAL_INSTALL_VERSION": "3.8.1.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.4.3",
-      "HADRIAN_ARGS": "--docs=no-sphinx",
-      "IGNORE_PERF_FAILURES": "all",
-      "TEST_ENV": "x86_64-freebsd13-release",
-      "XZ_OPT": "-9"
-    }
-  },
   "release-x86_64-linux-alpine3_12-int_native-release+fully_static": {
     "after_script": [
       ".gitlab/ci.sh save_cache",


=====================================
.gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
=====================================
@@ -12,13 +12,15 @@ def strip_prefix(s, prefix):
     else:
         return None
 
+do_not_distribute = set(["release-x86_64-linux-fedora33-release-hackage"])
+
 def job_triple(job_name):
     bindists = {
         'release-x86_64-windows-release': 'x86_64-unknown-mingw32',
         'release-x86_64-windows-int_native-release': 'x86_64-unknown-mingw32-int_native',
         'release-x86_64-rocky8-release': 'x86_64-rocky8-linux',
-        'release-x86_64-ubuntu20_04-release': 'x86_64-ubuntu20_04-linux',
-        'release-x86_64-ubuntu18_04-release': 'x86_64-ubuntu18_04-linux',
+        'release-x86_64-linux-ubuntu20_04-release': 'x86_64-ubuntu20_04-linux',
+        'release-x86_64-linux-ubuntu18_04-release': 'x86_64-ubuntu18_04-linux',
         'release-x86_64-linux-fedora33-release+debug_info': 'x86_64-fedora33-linux-dwarf',
         'release-x86_64-linux-fedora33-release': 'x86_64-fedora33-linux',
         'release-x86_64-linux-fedora27-release': 'x86_64-fedora27-linux',
@@ -54,6 +56,12 @@ def job_triple(job_name):
         #return strip_prefix(job.name, 'validate-')
         return None
 
+class UnhandledJobException(Exception):
+    # Raised when there is a release job in the pipeline but we don't explicitly handle it.
+    def __init__(self, name):
+        self.message = f"{name} is a release job but not downloaded"
+        super().__init__(self.message)
+
 def fetch_artifacts(release: str, pipeline_id: int,
                     dest_dir: Path, gl: gitlab.Gitlab):
     dest_dir.mkdir(exist_ok=True)
@@ -72,6 +80,8 @@ def fetch_artifacts(release: str, pipeline_id: int,
         job = proj.jobs.get(pipeline_job.id)
         triple = job_triple(job.name)
         if triple is None:
+            if job.name.startswith("release") and not (job.name in do_not_distribute):
+                raise(UnhandledJobException(job.name))
             logging.info(f'ignoring {job.name}')
             continue
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d0f34f25ceaae9ef0a21f15f811469d0bed9da69...68eb8877a73e09dd76a26017ec065fb843e843ed

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d0f34f25ceaae9ef0a21f15f811469d0bed9da69...68eb8877a73e09dd76a26017ec065fb843e843ed
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/20230130/68898175/attachment-0001.html>


More information about the ghc-commits mailing list