[Git][ghc/ghc][wip/boot-lib-testing] gitlab-ci: Add boot library linting steps

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Dec 20 23:43:45 UTC 2024



Ben Gamari pushed to branch wip/boot-lib-testing at Glasgow Haskell Compiler / GHC


Commits:
7c34906b by Ben Gamari at 2024-12-20T18:43:37-05:00
gitlab-ci: Add boot library linting steps

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -205,6 +205,23 @@ not-interruptible:
     - if: $NIGHTLY
       when: always
 
+.nix:
+  image: nixos/nix:2.25.2
+  before_script:
+    - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
+    # Note [Nix-in-Docker]
+    # ~~~~~~~~~~~~~~~~~~~~
+    # The nixos/nix default config is max-jobs=1 and cores=$(logical
+    # cores num) which doesn't play nice with our $CPUS convention. We
+    # fix it before invoking any nix build to avoid oversubscribing
+    # while allowing a reasonable degree of parallelism.
+    # FIXME: Disabling build-users-group=nixbld is a workaround for a Nix-in-Docker issue. See
+    # https://gitlab.haskell.org/ghc/head.hackage/-/issues/38#note_560487 for
+    # discussion.
+    - echo "cores = $CPUS" >> /etc/nix/nix.conf
+    - echo "max-jobs = $CPUS" >> /etc/nix/nix.conf
+    - nix run nixpkgs#gnused -- -i -e 's/ nixbld//' /etc/nix/nix.conf
+
 
 ############################################################
 # Validate jobs
@@ -255,6 +272,24 @@ typecheck-testsuite:
     - mypy testsuite/driver/runtests.py
   dependencies: []
 
+lint-boot-tags:
+  extends: [.lint, .nix]
+  script:
+    - nix run ./utils/check-submodules# -- check-tags
+  rules:
+    - if: $RELEASE_JOB
+      allow_failure: false
+    - allow_failure: true
+
+lint-boot-versions:
+  extends: [.lint, .nix]
+  script:
+    - nix run ./utils/check-submodules# -- check-versions
+  rules:
+    - if: $RELEASE_JOB
+      allow_failure: false
+    - allow_failure: true
+
 # We allow the submodule checker to fail when run on merge requests (to
 # accommodate, e.g., haddock changes not yet upstream) but not on `master` or
 # Marge jobs.
@@ -292,26 +327,11 @@ lint-author:
     - *drafts-can-fail-lint
 
 lint-ci-config:
-  image: nixos/nix:2.25.2
-  extends: .lint
+  extends: [.lint, .nix]
   # We don't need history/submodules in this job
   variables:
     GIT_DEPTH: 1
     GIT_SUBMODULE_STRATEGY: none
-  before_script:
-    - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
-    # Note [Nix-in-Docker]
-    # ~~~~~~~~~~~~~~~~~~~~
-    # The nixos/nix default config is max-jobs=1 and cores=$(logical
-    # cores num) which doesn't play nice with our $CPUS convention. We
-    # fix it before invoking any nix build to avoid oversubscribing
-    # while allowing a reasonable degree of parallelism.
-    # FIXME: Disabling build-users-group=nixbld is a workaround for a Nix-in-Docker issue. See
-    # https://gitlab.haskell.org/ghc/head.hackage/-/issues/38#note_560487 for
-    # discussion.
-    - echo "cores = $CPUS" >> /etc/nix/nix.conf
-    - echo "max-jobs = $CPUS" >> /etc/nix/nix.conf
-    - nix run nixpkgs#gnused -- -i -e 's/ nixbld//' /etc/nix/nix.conf
   script:
     - nix run .gitlab/generate-ci#generate-jobs
     # 1 if .gitlab/generate_jobs changed the output of the generated config



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7c34906b6c07639d52447f9141a698df656f4e56

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7c34906b6c07639d52447f9141a698df656f4e56
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/20241220/d2887d4e/attachment-0001.html>


More information about the ghc-commits mailing list