Skip to content

Commit 1f60a97

Browse files
chreekatMikolaj
authored andcommitted
Rework Darwin jobs
* Use `arch` explicitly in both jobs. I don't know why x86_64 is the default, and I don't like it. * Stop using brew. This means a toolchain needs to already be installed where CI is run. This is the case today, although it's a bit fragile and I'll probably revisit it. * Use a matrix build to clean up the yml. * Use GHC 9.8.2 to work around GHC#24050
1 parent 50c0c0f commit 1f60a97

File tree

1 file changed

+15
-37
lines changed

1 file changed

+15
-37
lines changed

.gitlab-ci.yml

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -91,48 +91,26 @@ alpine-linux:
9191
TARBALL_EXT: tar.xz
9292
ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
9393

94-
build-x86_64-darwin:
94+
darwin:
9595
extends: .build
96+
parallel:
97+
matrix:
98+
# Help me with names pls
99+
- ARCH: x86_64
100+
ARCHARCH: x86_64
101+
- ARCH: aarch64
102+
ARCHARCH: arm64
96103
tags:
97-
- x86_64-darwin
98-
variables:
99-
TARBALL_ARCHIVE_SUFFIX: x86_64-darwin
100-
TARBALL_EXT: tar.xz
101-
ADD_CABAL_ARGS: ""
102-
103-
build-aarch64-darwin:
104-
stage: build
105-
tags:
106-
- aarch64-darwin-m1
107-
before_script:
108-
- export HOMEBREW_CHANGE_ARCH_TO_ARM=1
109-
- arch -arm64 /bin/bash ./.gitlab/brew.sh llvm autoconf automake coreutils make tree
110-
# C_INCLUDE_PATH: https://gitlab.haskell.org/ghc/ghc/-/issues/20592
111-
script: |
112-
export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
113-
export CC=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang
114-
export CXX=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang++
115-
export LD=ld
116-
export AR=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ar
117-
export RANLIB=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ranlib
118-
export C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi"
119-
arch -arm64 /bin/bash ./.gitlab/ci.sh
120-
after_script:
121-
- rm -Rf /private/tmp/.brew_tmp
104+
- ${ARCH}-darwin-m1
122105
variables:
123-
MACOSX_DEPLOYMENT_TARGET: "10.7"
124-
TARBALL_ARCHIVE_SUFFIX: aarch64-darwin
106+
# Using 9.8.2 to work around
107+
# https://gitlab.haskell.org/ghc/ghc/-/issues/24050
108+
GHC_VERSION: 9.8.2
109+
TARBALL_ARCHIVE_SUFFIX: ${ARCH}-darwin
125110
TARBALL_EXT: tar.xz
126111
ADD_CABAL_ARGS: ""
127-
# Update periodically.
128-
BREW_VERSION: 4.0.5
129-
artifacts:
130-
expire_in: 2 week
131-
paths:
132-
- out/*
133-
cache:
134-
paths:
135-
- .brew
112+
script:
113+
- arch -${ARCHARCH} /bin/bash .gitlab/ci.sh
136114

137115
x86_64-windows:
138116
extends: .build

0 commit comments

Comments
 (0)