Magnus pushed to branch wip/mangoiv/27817 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -137,15 +137,37 @@ workflow:
    137 137
     .lint:
    
    138 138
       stage: tool-lint
    
    139 139
       tags:
    
    140
    -    - lint
    
    141
    -  before_script:
    
    142
    -    # Allow Git to read from the runner-owned checkout. This is needed
    
    143
    -    # for example by the lint-author job.
    
    144
    -    - git config --global --add safe.directory "$CI_PROJECT_DIR"
    
    140
    +    - lint-anyarch
    
    141
    +  image: debian:13
    
    145 142
       rules:
    
    146 143
         - *drafts-can-fail-lint
    
    147 144
         - when: always
    
    148 145
     
    
    146
    +.install-ghc-toolchain: &install-ghc-toolchain
    
    147
    +  - apt update
    
    148
    +  - apt install -qy 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
    
    149
    +  - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh
    
    150
    +  - source /root/.ghcup/env
    
    151
    +  - ghcup --no-verbose install ghc --set --install-targets 'install_bin install_lib update_package_db' '9.10'
    
    152
    +  - ghcup --no-verbose install cabal --set
    
    153
    +  - ghc --info
    
    154
    +  - cabal --version
    
    155
    +
    
    156
    +# linting but we need a boot toolchain
    
    157
    +.lint-ghc-toolchain:
    
    158
    +  extends: .lint
    
    159
    +  before_script:
    
    160
    +    - *install-ghc-toolchain
    
    161
    +    - git config --global --add safe.directory "$CI_PROJECT_DIR"
    
    162
    +
    
    163
    +# linting but we need python
    
    164
    +.lint-python:
    
    165
    +  extends: .lint
    
    166
    +  before_script:
    
    167
    +    - apt update
    
    168
    +    - apt install -qy python3 mypy shellcheck git
    
    169
    +    - git config --global --add safe.directory "$CI_PROJECT_DIR"
    
    170
    +
    
    149 171
     .nightly: &nightly
    
    150 172
       variables:
    
    151 173
         XZ_OPT: "-9"
    
    ... ... @@ -217,11 +239,11 @@ not-interruptible:
    217 239
       stage: not-interruptible
    
    218 240
       script: "true"
    
    219 241
       interruptible: false
    
    220
    -  image: "debian:13"
    
    242
    +  image: debian:13
    
    221 243
       variables:
    
    222 244
         GIT_STRATEGY: none
    
    223 245
       tags:
    
    224
    -    - lint
    
    246
    +    - lint-anyarch
    
    225 247
       rules:
    
    226 248
     #   - if: '$CI_COMMIT_BRANCH == "master"'
    
    227 249
     #      when: always
    
    ... ... @@ -242,7 +264,6 @@ include: '.gitlab/jobs.yaml'
    242 264
     
    
    243 265
     ghc-linters:
    
    244 266
       stage: tool-lint
    
    245
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    246 267
       extends: .lint-params
    
    247 268
       variables:
    
    248 269
         BUILD_FLAVOUR: default
    
    ... ... @@ -258,16 +279,11 @@ ghc-linters:
    258 279
     # Skipped if the MR has the ~"no-changelog" label.
    
    259 280
     lint-changelog:
    
    260 281
       stage: tool-lint
    
    261
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    262
    -  extends: .lint
    
    282
    +  extends: .lint-ghc-toolchain
    
    263 283
       variables:
    
    264 284
         CHANGELOG_EXPECT_MR: "$CI_MERGE_REQUEST_IID"
    
    265 285
         GIT_DEPTH: 1
    
    266 286
         GIT_SUBMODULE_STRATEGY: none
    
    267
    -  before_script:
    
    268
    -    - export PATH="/opt/toolchain/bin:$PATH"
    
    269
    -    # workaround for docker permissions
    
    270
    -    - sudo chown ghc:ghc -R .
    
    271 287
       script:
    
    272 288
         - .gitlab/ci.sh lint_changelog
    
    273 289
       dependencies: []
    
    ... ... @@ -279,42 +295,30 @@ lint-changelog:
    279 295
     
    
    280 296
     # Run mypy Python typechecker on linter scripts.
    
    281 297
     lint-linters:
    
    282
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
    
    283
    -  extends: .lint
    
    298
    +  extends: .lint-python
    
    284 299
       variables:
    
    285 300
         GIT_DEPTH: 1
    
    286 301
         GIT_SUBMODULE_STRATEGY: none
    
    287
    -  before_script:
    
    288
    -    # workaround for docker permissions
    
    289
    -    - sudo chown ghc:ghc -R .
    
    290 302
       script:
    
    291 303
         - mypy testsuite/tests/linters/regex-linters/*.py
    
    292 304
       dependencies: []
    
    293 305
     
    
    294 306
     # Check that .T files all parse by listing broken tests.
    
    295 307
     lint-testsuite:
    
    296
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    297
    -  extends: .lint
    
    308
    +  extends: .lint-ghc-toolchain
    
    298 309
       variables:
    
    299 310
         GIT_DEPTH: 1
    
    300 311
         GIT_SUBMODULE_STRATEGY: none
    
    301
    -  before_script:
    
    302
    -    # workaround for docker permissions
    
    303
    -    - sudo chown ghc:ghc -R .
    
    304 312
       script:
    
    305
    -    - make -Ctestsuite list_broken TEST_HC=$GHC
    
    313
    +    - make -Ctestsuite list_broken TEST_HC=$(which ghc)
    
    306 314
       dependencies: []
    
    307 315
     
    
    308 316
     # Run mypy Python typechecker on testsuite driver
    
    309 317
     typecheck-testsuite:
    
    310
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
    
    311
    -  extends: .lint
    
    318
    +  extends: .lint-python
    
    312 319
       variables:
    
    313 320
         GIT_DEPTH: 1
    
    314 321
         GIT_SUBMODULE_STRATEGY: none
    
    315
    -  before_script:
    
    316
    -    # workaround for docker permissions
    
    317
    -    - sudo chown ghc:ghc -R .
    
    318 322
       script:
    
    319 323
         - mypy testsuite/driver/runtests.py
    
    320 324
       dependencies: []
    
    ... ... @@ -323,7 +327,6 @@ typecheck-testsuite:
    323 327
     # accommodate, e.g., haddock changes not yet upstream) but not on `master` or
    
    324 328
     # Marge jobs.
    
    325 329
     .lint-submods:
    
    326
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    327 330
       extends: .lint-params
    
    328 331
       variables:
    
    329 332
         BUILD_FLAVOUR: default
    
    ... ... @@ -341,13 +344,9 @@ typecheck-testsuite:
    341 344
     # Check that commits in an MR were not authored with the identity that CI uses
    
    342 345
     # when it needs to create commits itself. This only needs Git history.
    
    343 346
     lint-author:
    
    344
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    345
    -  extends: .lint
    
    347
    +  extends: .lint-python
    
    346 348
       variables:
    
    347 349
         GIT_SUBMODULE_STRATEGY: none
    
    348
    -  before_script:
    
    349
    -    # workaround for docker permissions
    
    350
    -    - sudo chown ghc:ghc -R .
    
    351 350
       script:
    
    352 351
         - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
    
    353 352
         - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
    
    ... ... @@ -425,12 +424,9 @@ lint-submods-branch:
    425 424
     
    
    426 425
     .lint-params:
    
    427 426
       needs: []
    
    428
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    429 427
       extends: .lint
    
    430 428
       before_script:
    
    431
    -    - export PATH="/opt/toolchain/bin:$PATH"
    
    432
    -    # workaround for docker permissions
    
    433
    -    - sudo chown ghc:ghc -R .
    
    429
    +    - *install-ghc-toolchain
    
    434 430
         - .gitlab/ci.sh setup
    
    435 431
       after_script:
    
    436 432
         - .gitlab/ci.sh save_cache
    
    ... ... @@ -448,18 +444,13 @@ lint-submods-branch:
    448 444
     
    
    449 445
     hadrian-ghc-in-ghci:
    
    450 446
       stage: quick-build
    
    447
    +  extends: .lint-ghc-toolchain
    
    451 448
       needs:
    
    452 449
         - job: lint-linters
    
    453 450
         - job: lint-submods
    
    454 451
           optional: true
    
    455
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    456
    -  before_script:
    
    457
    -    # workaround for docker permissions
    
    458
    -    - sudo chown ghc:ghc -R .
    
    459 452
       variables:
    
    460 453
         GHC_FLAGS: -Werror -Wwarn=unused-imports
    
    461
    -  tags:
    
    462
    -    - lint
    
    463 454
       script:
    
    464 455
         - git clean -xdf && git submodule foreach git clean -xdf
    
    465 456
         - . .gitlab/ci.sh setup
    
    ... ... @@ -493,9 +484,6 @@ hadrian-multi:
    493 484
           optional: true
    
    494 485
       dependencies: null
    
    495 486
       image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    496
    -  before_script:
    
    497
    -    # workaround for docker permissions
    
    498
    -    - sudo chown ghc:ghc -R .
    
    499 487
       variables:
    
    500 488
         GHC_FLAGS: "-Werror=-Wno-error=incomplete-record-selectors -Wwarn=deprecations -Wwarn=unused-imports"
    
    501 489
            # -Wno-error=incomplete-record-selectors is present because -Wall now
    
    ... ... @@ -549,6 +537,7 @@ stack-hadrian-build:
    549 537
       extends: hadrian-ghc-in-ghci
    
    550 538
       stage: quick-build
    
    551 539
       script:
    
    540
    +    - ghcup --no-verbose install stack --set
    
    552 541
         - . .gitlab/ci.sh setup
    
    553 542
         - . .gitlab/ci.sh configure
    
    554 543
         - hadrian/build-stack --version
    
    ... ... @@ -1055,9 +1044,6 @@ perf:
    1055 1044
       image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    1056 1045
       tags:
    
    1057 1046
         - x86_64-linux-perf
    
    1058
    -  before_script:
    
    1059
    -    # workaround for docker permissions
    
    1060
    -    - sudo chown ghc:ghc -R .
    
    1061 1047
       script:
    
    1062 1048
         - root=$(pwd)/ghc
    
    1063 1049
         - |