[Git][ghc/ghc][wip/mangoiv/27817] ci: make lint-adjacent jobs into platform independent
Magnus pushed to branch wip/mangoiv/27817 at Glasgow Haskell Compiler / GHC Commits: 81bfce4c by mangoiv at 2026-09-18T12:33:03+02:00 ci: make lint-adjacent jobs into platform independent - move lint jobs into lint-anyarch tag - unify lint jobs under the same platform independent container - - - - - 3 changed files: - + .ghc-nix/flake.lock - + .ghc-nix/flake.nix - .gitlab-ci.yml Changes: ===================================== .ghc-nix/flake.lock ===================================== @@ -0,0 +1,202 @@ +{ + "nodes": { + "all-cabal-hashes": { + "flake": false, + "locked": { + "lastModified": 1764068599, + "narHash": "sha256-cqiypgQN/PtGGA6JqFZ5LM/TDqeWyTRICetqGeYJTwU=", + "owner": "commercialhaskell", + "repo": "all-cabal-hashes", + "rev": "74615195a38035ef480f946c73735d44fa5958fe", + "type": "github" + }, + "original": { + "owner": "commercialhaskell", + "ref": "hackage", + "repo": "all-cabal-hashes", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "ghc-nix": { + "inputs": { + "all-cabal-hashes": "all-cabal-hashes", + "flake-compat": "flake-compat", + "ghc-wasm-meta": "ghc-wasm-meta", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "host": "gitlab.haskell.org", + "lastModified": 1780840069, + "narHash": "sha256-kqpfNTSUdiAm42PX0kZH0RMWKNraOlTU14SuX1i441Q=", + "owner": "ghc", + "repo": "ghc.nix", + "rev": "cf6309aa107e557dd913184d09d98c732d6f3404", + "type": "gitlab" + }, + "original": { + "host": "gitlab.haskell.org", + "owner": "ghc", + "repo": "ghc.nix", + "type": "gitlab" + } + }, + "ghc-wasm-meta": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "host": "gitlab.haskell.org", + "lastModified": 1771125696, + "narHash": "sha256-+90XoM7PUfgD7383ki/aHC0cLKS32XVnYgI672pegcY=", + "owner": "ghc", + "repo": "ghc-wasm-meta", + "rev": "4e1f900e9933966634bc2e29dbeb81d09ce36727", + "type": "gitlab" + }, + "original": { + "host": "gitlab.haskell.org", + "owner": "ghc", + "repo": "ghc-wasm-meta", + "type": "gitlab" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "ghc-nix", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1770770419, + "narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1769900590, + "narHash": "sha256-I7Lmgj3owOTBGuauy9FL6qdpeK2umDoe07lM4V+PnyA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "41e216c0ca66c83b12ab7a98cc326b5db01db646", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": [ + "ghc-nix", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "ghc-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763988335, + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "ghc-nix": "ghc-nix" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} ===================================== .ghc-nix/flake.nix ===================================== @@ -0,0 +1,19 @@ +{ + description = "adhoc ghc.nix devShell flake"; + nixConfig = { + bash-prompt = "\\[\\e[34;1m\\]ghc.nix ~ \\[\\e[0m\\]"; + }; + inputs.ghc-nix.url = "gitlab:ghc/ghc.nix?host=gitlab.haskell.org"; + # In case you need to fork ghc.nix: + # inputs.ghc-nix.url = "gitlab:ghc/ghc.nix/yourbranch?host=gitlab.haskell.org"; + outputs = { ghc-nix, ... }: + let + userSettings = { + # put your settings here + withIde = true; + }; + in + { + devShells = ghc-nix.lib.perSystem (system: { default = ghc-nix.legacy ({ inherit system; } // userSettings); }); + }; +} ===================================== .gitlab-ci.yml ===================================== @@ -137,7 +137,8 @@ workflow: .lint: stage: tool-lint tags: - - lint + - lint-anyarch + image: debian:13 before_script: # Allow Git to read from the runner-owned checkout. This is needed # for example by the lint-author job. @@ -146,6 +147,20 @@ workflow: - *drafts-can-fail-lint - when: always +# linting but we need a boot toolchain +.lint-ghc-toolchain: + extends: .lint + before_script: + - apt update + - apt install -qy ghc cabal-install build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 pkg-config python3 cmake git happy alex autoconf automake python3 libgmp-dev libnuma-dev libncurses-dev + +# linting but we need python +.lint-python: + extends: .lint + before_script: + apt update + apt install -qy python3 mypy shellcheck + .nightly: &nightly variables: XZ_OPT: "-9" @@ -217,11 +232,11 @@ not-interruptible: stage: not-interruptible script: "true" interruptible: false - image: "debian:13" + image: debian:13 variables: GIT_STRATEGY: none tags: - - lint + - lint-anyarch rules: # - if: '$CI_COMMIT_BRANCH == "master"' # when: always @@ -242,7 +257,6 @@ include: '.gitlab/jobs.yaml' ghc-linters: stage: tool-lint - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" extends: .lint-params variables: BUILD_FLAVOUR: default @@ -258,7 +272,6 @@ ghc-linters: # Skipped if the MR has the ~"no-changelog" label. lint-changelog: stage: tool-lint - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" extends: .lint variables: CHANGELOG_EXPECT_MR: "$CI_MERGE_REQUEST_IID" @@ -279,7 +292,6 @@ lint-changelog: # Run mypy Python typechecker on linter scripts. lint-linters: - image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" extends: .lint variables: GIT_DEPTH: 1 @@ -293,7 +305,6 @@ lint-linters: # Check that .T files all parse by listing broken tests. lint-testsuite: - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" extends: .lint variables: GIT_DEPTH: 1 @@ -307,7 +318,6 @@ lint-testsuite: # Run mypy Python typechecker on testsuite driver typecheck-testsuite: - image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" extends: .lint variables: GIT_DEPTH: 1 @@ -323,7 +333,6 @@ typecheck-testsuite: # accommodate, e.g., haddock changes not yet upstream) but not on `master` or # Marge jobs. .lint-submods: - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" extends: .lint-params variables: BUILD_FLAVOUR: default @@ -341,7 +350,6 @@ typecheck-testsuite: # Check that commits in an MR were not authored with the identity that CI uses # when it needs to create commits itself. This only needs Git history. lint-author: - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" extends: .lint variables: GIT_SUBMODULE_STRATEGY: none @@ -425,8 +433,7 @@ lint-submods-branch: .lint-params: needs: [] - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" - extends: .lint + extends: .lint-ghc-toolchain before_script: - export PATH="/opt/toolchain/bin:$PATH" # workaround for docker permissions @@ -448,18 +455,16 @@ lint-submods-branch: hadrian-ghc-in-ghci: stage: quick-build + extends: .lint-ghc-toolchain needs: - job: lint-linters - job: lint-submods optional: true - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV" before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . variables: GHC_FLAGS: -Werror -Wwarn=unused-imports - tags: - - lint script: - git clean -xdf && git submodule foreach git clean -xdf - . .gitlab/ci.sh setup View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81bfce4c189a350b3190cb3d9967b791... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81bfce4c189a350b3190cb3d9967b791... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Magnus (@MangoIV)