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

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Sat Dec 21 03:58:58 UTC 2024



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


Commits:
6f1f87ff by Ben Gamari at 2024-12-20T22:58:53-05:00
gitlab-ci: Add boot library linting steps

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -205,6 +205,25 @@ not-interruptible:
     - if: $NIGHTLY
       when: always
 
+.nix:
+  image: nixos/nix:2.25.2
+  variables:
+    LANG: "C.UTF-8"
+  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 +274,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 +329,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/6f1f87ff7f0c20269e42f8d8aa2227652afe3346

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f1f87ff7f0c20269e42f8d8aa2227652afe3346
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/8f5a88bf/attachment-0001.html>


More information about the ghc-commits mailing list