Skip to content

Commit 6e4612d

Browse files
wz1000hasufell
andauthored
Gitlab CI improvements (#3324)
* Add ubuntu builds to gitlab CI Fixes #3169 * Run pipelines from web interface * Use nix for darwin * Drop 9.2.3 and add 9.4.3 * Build in parallel * Add 9.2.5 * fixes * Fix x86_64-darwin * Drop 9.4.3 (ghc-exactprint) * Revert "Drop 9.4.3 (ghc-exactprint)" This reverts commit 9f0936d. * Bump index state to allow 9.4.3 * debug * fixes * fixes * fixes * fixes * fixes * fixes Co-authored-by: Julian Ospald <[email protected]>
1 parent ff28990 commit 6e4612d

14 files changed

+418
-145
lines changed

.gitlab-ci.yml

+107-41
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,27 @@ variables:
1111

1212
CABAL_INSTALL_VERSION: 3.8.1.0
1313

14-
.windows_matrix: &windows_matrix
14+
.matrix: &matrix
1515
matrix:
1616
- GHC_VERSION: 8.10.7
1717
CABAL_PROJECT: cabal.project
1818
- GHC_VERSION: 9.0.2
1919
CABAL_PROJECT: cabal.project
20-
- GHC_VERSION: 9.2.3
21-
CABAL_PROJECT: cabal.project
2220
- GHC_VERSION: 9.2.4
2321
CABAL_PROJECT: cabal.project
24-
- GHC_VERSION: 9.4.1
22+
- GHC_VERSION: 9.2.5
2523
CABAL_PROJECT: cabal.project
2624
- GHC_VERSION: 9.4.2
2725
CABAL_PROJECT: cabal.project
26+
- GHC_VERSION: 9.4.3
27+
CABAL_PROJECT: cabal.project
2828

2929
workflow:
3030
rules:
3131
- if: $CI_COMMIT_TAG
3232
when: always
33+
- if: $CI_PIPELINE_SOURCE == "web"
34+
when: always
3335
- when: never
3436

3537
.artifacts:
@@ -47,6 +49,7 @@ workflow:
4749
.build:
4850
extends: .artifacts:short
4951
stage: build
52+
parallel: *matrix
5053
script:
5154
- bash .gitlab/ci.sh
5255

@@ -75,6 +78,16 @@ workflow:
7578
- x86_64-linux
7679
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
7780

81+
.x86_64-linux-ubuntu18.04:
82+
tags:
83+
- x86_64-linux
84+
image: "ubuntu:18.04"
85+
86+
.x86_64-linux-ubuntu20.04:
87+
tags:
88+
- x86_64-linux
89+
image: "ubuntu:20.04"
90+
7891
.x86_64-linux-centos7:
7992
tags:
8093
- x86_64-linux
@@ -163,6 +176,84 @@ test-armv7-linux-deb10:
163176
- sudo apt install -y tree
164177

165178

179+
###########################
180+
# x86_64 linux ubuntu18.04
181+
###########################
182+
183+
build-x86_64-linux-ubuntu18.04:
184+
extends:
185+
- .build
186+
- .x86_64-linux-ubuntu18.04
187+
before_script:
188+
- apt update
189+
- apt install -y build-essential curl libffi-dev libffi6 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 zlib1g-dev patchelf tree
190+
variables:
191+
ADD_CABAL_ARGS: "--enable-split-sections"
192+
193+
tar-x86_64-linux-ubuntu18.04:
194+
extends:
195+
- .artifacts
196+
- .x86_64-linux-ubuntu18.04
197+
stage: tar
198+
needs: ["build-x86_64-linux-ubuntu18.04"]
199+
script:
200+
- ./.gitlab/tar.sh
201+
variables:
202+
TARBALL_ARCHIVE_SUFFIX: x86_64-ubuntu18.04-linux
203+
TARBALL_EXT: tar.xz
204+
before_script:
205+
- apt update
206+
- apt install -y make tar xz-utils curl
207+
208+
test-x86_64-linux-ubuntu18.04:
209+
extends:
210+
- .test
211+
- .x86_64-linux-ubuntu18.04
212+
needs: ["tar-x86_64-linux-ubuntu18.04"]
213+
before_script:
214+
- apt update
215+
- apt install -y tree patchelf make curl build-essential
216+
217+
218+
###########################
219+
# x86_64 linux ubuntu20.04
220+
###########################
221+
222+
build-x86_64-linux-ubuntu20.04:
223+
extends:
224+
- .build
225+
- .x86_64-linux-ubuntu20.04
226+
before_script:
227+
- apt update
228+
- apt install -y build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 zlib1g-dev patchelf tree
229+
variables:
230+
ADD_CABAL_ARGS: "--enable-split-sections"
231+
232+
tar-x86_64-linux-ubuntu20.04:
233+
extends:
234+
- .artifacts
235+
- .x86_64-linux-ubuntu20.04
236+
stage: tar
237+
needs: ["build-x86_64-linux-ubuntu20.04"]
238+
script:
239+
- ./.gitlab/tar.sh
240+
variables:
241+
TARBALL_ARCHIVE_SUFFIX: x86_64-ubuntu20.04-linux
242+
TARBALL_EXT: tar.xz
243+
before_script:
244+
- apt update
245+
- apt install -y make tar xz-utils curl
246+
247+
test-x86_64-linux-ubuntu20.04:
248+
extends:
249+
- .test
250+
- .x86_64-linux-ubuntu20.04
251+
needs: ["tar-x86_64-linux-ubuntu20.04"]
252+
before_script:
253+
- apt update
254+
- apt install -y tree patchelf make curl build-essential
255+
256+
166257
######################
167258
# x86_64 linux deb10
168259
######################
@@ -418,73 +509,52 @@ test-x86_64-freebsd13:
418509
build-x86_64-darwin:
419510
extends: .build
420511
tags:
421-
- x86_64-darwin
512+
- x86_64-darwin-m1
422513
variables:
423514
ADD_CABAL_ARGS: ""
424-
before_script:
425-
- /bin/bash ./.gitlab/brew.sh autoconf automake coreutils make tree
515+
NIX_SYSTEM: x86_64-darwin
426516
script: |
427-
export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
428517
/bin/bash ./.gitlab/ci.sh
429-
after_script:
430-
- rm -Rf /private/tmp/.brew_tmp
431518
432519
tar-x86_64-darwin:
433520
extends: .artifacts
434521
stage: tar
435522
needs: ["build-x86_64-darwin"]
436523
tags:
437-
- x86_64-darwin
438-
before_script:
439-
- /bin/bash ./.gitlab/brew.sh autoconf automake coreutils make tree
524+
- x86_64-darwin-m1
440525
script: |
441-
export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
442526
/bin/bash ./.gitlab/tar.sh
443-
after_script:
444-
- rm -Rf /private/tmp/.brew_tmp
445527
variables:
446528
TARBALL_ARCHIVE_SUFFIX: x86_64-apple-darwin
447529
TARBALL_EXT: tar.xz
530+
NIX_SYSTEM: x86_64-darwin
448531

449532
test-x86_64-darwin:
450533
extends: .test
451534
needs: ["tar-x86_64-darwin"]
452535
tags:
453-
- x86_64-darwin
454-
before_script:
455-
- /bin/bash ./.gitlab/brew.sh make tree
536+
- x86_64-darwin-m1
456537
script: |
457-
export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
458538
/bin/bash .gitlab/test.sh
459-
after_script:
460-
- rm -Rf /private/tmp/.brew_tmp
539+
variables:
540+
NIX_SYSTEM: x86_64-darwin
461541

462542

463543
######################
464544
# aarch64 darwin
465545
######################
466546

467547
build-aarch64-darwin:
468-
extends: .artifacts:short
548+
extends: .build
469549
stage: build
470550
tags:
471551
- aarch64-darwin-m1
472-
before_script:
473-
- export HOMEBREW_CHANGE_ARCH_TO_ARM=1
474-
- arch -arm64 /bin/bash ./.gitlab/brew.sh llvm autoconf automake coreutils make tree
475552
script: |
476-
export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
477-
export CC=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang
478-
export CXX=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang++
479-
export LD=ld
480-
export AR=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ar
481-
export RANLIB=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ranlib
482553
arch -arm64 /bin/bash ./.gitlab/ci.sh
483-
after_script:
484-
- rm -Rf /private/tmp/.brew_tmp
485554
variables:
486555
MACOSX_DEPLOYMENT_TARGET: "10.7"
487556
ADD_CABAL_ARGS: ""
557+
NIX_SYSTEM: aarch64-darwin
488558

489559
tar-aarch64-darwin:
490560
extends: .artifacts
@@ -497,20 +567,17 @@ tar-aarch64-darwin:
497567
variables:
498568
TARBALL_ARCHIVE_SUFFIX: aarch64-apple-darwin
499569
TARBALL_EXT: tar.xz
570+
NIX_SYSTEM: aarch64-darwin
500571

501572
test-aarch64-darwin:
502573
extends: .test
503574
needs: ["tar-aarch64-darwin"]
504575
tags:
505576
- aarch64-darwin-m1
506-
before_script:
507-
- export HOMEBREW_CHANGE_ARCH_TO_ARM=1
508-
- arch -arm64 /bin/bash ./.gitlab/brew.sh make tree
509577
script: |
510-
export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
511578
arch -arm64 /bin/bash ./.gitlab/test.sh
512-
after_script:
513-
- rm -Rf /private/tmp/.brew_tmp
579+
variables:
580+
NIX_SYSTEM: aarch64-darwin
514581

515582

516583
######################
@@ -521,7 +588,6 @@ build-x86_64-windows:
521588
extends: .build
522589
tags:
523590
- new-x86_64-windows
524-
parallel: *windows_matrix
525591
script:
526592
- $env:CHERE_INVOKING = "yes"
527593
- bash '-lc' "ADD_CABAL_ARGS=$env:ADD_CABAL_ARGS GHC_VERSION=$env:GHC_VERSION CABAL_INSTALL_VERSION=$CABAL_INSTALL_VERSION .gitlab/ci.sh"

.gitlab/brew.sh

-19
This file was deleted.

0 commit comments

Comments
 (0)