|
1 |
| -# Used for ci setup in the gitlab mirror of the project: |
| 1 | +stages: |
| 2 | + - build |
| 3 | + - tar |
| 4 | + |
| 5 | +# Used for ci setup in the gitlab mirror of the project: |
2 | 6 | # https://gitlab.haskell.org/haskell/haskell-language-server/-/pipelines
|
3 | 7 | variables:
|
4 | 8 | # Commit of ghc/ci-images repository from which to pull Docker images
|
5 |
| - DOCKER_REV: "853f348f9caf38b08740b280296fbd34e09abb3a" |
| 9 | + DOCKER_REV: "4ed1a4f27828ba96a34662dc954335e29b470cd2" |
6 | 10 |
|
7 |
| - CABAL_INSTALL_VERSION: 3.4.0.0 |
| 11 | + CABAL_INSTALL_VERSION: 3.6.2.0 |
8 | 12 |
|
9 | 13 | .default_matrix: &default_matrix
|
10 | 14 | matrix:
|
@@ -32,83 +36,252 @@ workflow:
|
32 | 36 | when: always
|
33 | 37 | - when: never
|
34 | 38 |
|
35 |
| -.build: |
36 |
| - script: |
37 |
| - - bash .gitlab/ci.sh |
| 39 | +.artifacts: |
38 | 40 | artifacts:
|
39 | 41 | expire_in: 2 week
|
40 | 42 | paths:
|
41 | 43 | - out
|
42 | 44 |
|
| 45 | +.artifacts:short: |
| 46 | + artifacts: |
| 47 | + expire_in: 1 day |
| 48 | + paths: |
| 49 | + - out |
| 50 | + |
| 51 | +.build: |
| 52 | + extends: .artifacts:short |
| 53 | + stage: build |
| 54 | + script: |
| 55 | + - bash .gitlab/ci.sh |
| 56 | + |
43 | 57 | build-aarch64-linux-deb10:
|
44 | 58 | extends: .build
|
45 | 59 | tags:
|
46 | 60 | - aarch64-linux
|
47 | 61 | image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV"
|
48 | 62 | parallel: *arm_matrix
|
| 63 | + variables: |
| 64 | + ADD_CABAL_ARGS: "" |
| 65 | + |
| 66 | +tar-aarch64-linux-deb10: |
| 67 | + extends: .artifacts |
| 68 | + stage: tar |
| 69 | + needs: ["build-aarch64-linux-deb10"] |
| 70 | + tags: |
| 71 | + - aarch64-linux |
| 72 | + image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV" |
| 73 | + script: |
| 74 | + - ./.gitlab/tar.sh |
| 75 | + variables: |
| 76 | + TARBALL_ARCHIVE_SUFFIX: aarch64-linux-deb10 |
| 77 | + TARBALL_EXT: tar.xz |
49 | 78 |
|
50 | 79 | build-armv7-linux-deb10:
|
51 | 80 | extends: .build
|
52 | 81 | tags:
|
53 | 82 | - armv7-linux
|
54 | 83 | image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV"
|
55 | 84 | parallel: *arm_matrix
|
| 85 | + variables: |
| 86 | + ADD_CABAL_ARGS: "" |
| 87 | + |
| 88 | +tar-armv7-linux-deb10: |
| 89 | + extends: .artifacts |
| 90 | + stage: tar |
| 91 | + needs: ["build-armv7-linux-deb10"] |
| 92 | + tags: |
| 93 | + - armv7-linux |
| 94 | + image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV" |
| 95 | + script: |
| 96 | + - ./.gitlab/tar.sh |
| 97 | + variables: |
| 98 | + TARBALL_ARCHIVE_SUFFIX: armv7-linux-deb10 |
| 99 | + TARBALL_EXT: tar.xz |
56 | 100 |
|
57 | 101 | build-x86_64-linux:
|
58 | 102 | extends: .build
|
59 | 103 | tags:
|
60 | 104 | - x86_64-linux
|
61 |
| - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" |
| 105 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV" |
62 | 106 | parallel: *default_matrix
|
| 107 | + variables: |
| 108 | + ADD_CABAL_ARGS: "--enable-split-sections" |
| 109 | + |
| 110 | +tar-x86_64-linux: |
| 111 | + extends: .artifacts |
| 112 | + stage: tar |
| 113 | + needs: ["build-x86_64-linux"] |
| 114 | + tags: |
| 115 | + - x86_64-linux |
| 116 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV" |
| 117 | + script: |
| 118 | + - ./.gitlab/tar.sh |
| 119 | + variables: |
| 120 | + TARBALL_ARCHIVE_SUFFIX: x86_64-linux |
| 121 | + TARBALL_EXT: tar.xz |
63 | 122 |
|
64 | 123 | build-x86_64-linux-alpine:
|
65 | 124 | extends: .build
|
66 | 125 | tags:
|
67 | 126 | - x86_64-linux
|
68 | 127 | image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV"
|
| 128 | + before_script: |
| 129 | + - sudo apk add --no-cache zlib zlib-dev zlib-static bzip2 bzip2-dev bzip2-static gmp gmp-dev xz xz-dev ncurses-static |
| 130 | + parallel: *default_matrix |
| 131 | + variables: |
| 132 | + ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static" |
| 133 | + |
| 134 | +tar-x86_64-linux-alpine: |
| 135 | + extends: .artifacts |
| 136 | + stage: tar |
| 137 | + needs: ["build-x86_64-linux-alpine"] |
| 138 | + tags: |
| 139 | + - x86_64-linux |
| 140 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV" |
| 141 | + script: |
| 142 | + - ./.gitlab/tar.sh |
| 143 | + variables: |
| 144 | + TARBALL_ARCHIVE_SUFFIX: x86_64-linux-alpine |
| 145 | + TARBALL_EXT: tar.xz |
| 146 | + |
| 147 | +build-x86_64-freebsd12: |
| 148 | + extends: .build |
| 149 | + tags: |
| 150 | + - x86_64-freebsd12 |
69 | 151 | parallel: *default_matrix
|
| 152 | + variables: |
| 153 | + ADD_CABAL_ARGS: "--enable-split-sections" |
| 154 | + |
| 155 | +tar-x86_64-freebsd12: |
| 156 | + extends: .artifacts |
| 157 | + stage: tar |
| 158 | + needs: ["build-x86_64-freebsd12"] |
| 159 | + tags: |
| 160 | + - x86_64-freebsd12 |
| 161 | + script: |
| 162 | + - ./.gitlab/tar.sh |
| 163 | + variables: |
| 164 | + TARBALL_ARCHIVE_SUFFIX: x86_64-freebsd12 |
| 165 | + TARBALL_EXT: tar.xz |
70 | 166 |
|
71 |
| -build-x86_64-freebsd: |
| 167 | +build-x86_64-freebsd13: |
72 | 168 | extends: .build
|
73 | 169 | tags:
|
74 | 170 | - x86_64-freebsd13
|
75 | 171 | parallel: *default_matrix
|
| 172 | + before_script: |
| 173 | + - sudo pkg update |
| 174 | + - sudo pkg install --yes compat12x-amd64 |
| 175 | + - sudo ln -s libncurses.so.6 /usr/local/lib/libncurses.so.6.2 |
| 176 | + variables: |
| 177 | + ADD_CABAL_ARGS: "--enable-split-sections" |
| 178 | + |
| 179 | +tar-x86_64-freebsd13: |
| 180 | + extends: .artifacts |
| 181 | + stage: tar |
| 182 | + needs: ["build-x86_64-freebsd13"] |
| 183 | + tags: |
| 184 | + - x86_64-freebsd13 |
| 185 | + script: |
| 186 | + - ./.gitlab/tar.sh |
| 187 | + variables: |
| 188 | + TARBALL_ARCHIVE_SUFFIX: x86_64-freebsd13 |
| 189 | + TARBALL_EXT: tar.xz |
76 | 190 |
|
77 | 191 | build-x86_64-darwin:
|
78 | 192 | extends: .build
|
79 | 193 | tags:
|
80 | 194 | - x86_64-darwin
|
81 | 195 | parallel: *default_matrix
|
| 196 | + variables: |
| 197 | + ADD_CABAL_ARGS: "" |
| 198 | + |
| 199 | +tar-x86_64-darwin: |
| 200 | + extends: .artifacts |
| 201 | + stage: tar |
| 202 | + needs: ["build-x86_64-darwin"] |
| 203 | + tags: |
| 204 | + - x86_64-darwin |
| 205 | + script: |
| 206 | + - ./.gitlab/tar.sh |
| 207 | + variables: |
| 208 | + TARBALL_ARCHIVE_SUFFIX: x86_64-darwin |
| 209 | + TARBALL_EXT: tar.xz |
82 | 210 |
|
83 | 211 | build-aarch64-darwin:
|
| 212 | + extends: .artifacts:short |
| 213 | + stage: build |
84 | 214 | tags:
|
85 | 215 | - aarch64-darwin-m1
|
| 216 | + before_script: |
| 217 | + # Install brew locally in the project dir. Packages will also be installed here. |
| 218 | + - '[ -e "$CI_PROJECT_DIR/.brew" ] || git clone --depth=1 https://github.com/Homebrew/brew $CI_PROJECT_DIR/.brew' |
| 219 | + - export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH" |
| 220 | + |
| 221 | + # otherwise we seem to get intel binaries |
| 222 | + - export HOMEBREW_CHANGE_ARCH_TO_ARM=1 |
| 223 | + |
| 224 | + # make sure to not pollute the machine with temp files etc |
| 225 | + - mkdir -p $CI_PROJECT_DIR/.brew_cache |
| 226 | + - export HOMEBREW_CACHE=$CI_PROJECT_DIR/.brew_cache |
| 227 | + - mkdir -p $CI_PROJECT_DIR/.brew_logs |
| 228 | + - export HOMEBREW_LOGS=$CI_PROJECT_DIR/.brew_logs |
| 229 | + - mkdir -p /private/tmp/.brew_tmp |
| 230 | + - export HOMEBREW_TEMP=/private/tmp/.brew_tmp |
| 231 | + |
| 232 | + # update and install packages |
| 233 | + - brew update |
| 234 | + - brew install llvm |
| 235 | + - brew install autoconf automake coreutils |
86 | 236 | script: |
|
87 |
| - set -Eeuo pipefail |
88 |
| - function runInNixShell() { |
89 |
| - time nix-shell $CI_PROJECT_DIR/.gitlab/shell-aarch64-darwin.nix \ |
90 |
| - -I nixpkgs=https://github.com/angerman/nixpkgs/archive/75f7281738b.tar.gz \ |
91 |
| - --argstr system "aarch64-darwin" \ |
92 |
| - --pure \ |
93 |
| - --keep CI_PROJECT_DIR \ |
94 |
| - --keep MACOSX_DEPLOYMENT_TARGET \ |
95 |
| - --keep GHC_VERSION \ |
96 |
| - --keep CABAL_PROJECT \ |
97 |
| - --keep CABAL_INSTALL_VERSION \ |
98 |
| - --run "$1" 2>&1 |
99 |
| - } |
100 |
| - runInNixShell "cabal update && mkdir vendored && cd vendored && cabal unpack network-3.1.2.1 && cd network-3.1.2.1 && autoreconf -fi" 2>&1 |
101 |
| - runInNixShell "./.gitlab/ci.sh" 2>&1 |
| 237 | + export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH" |
| 238 | + export CC=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang |
| 239 | + export CXX=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang++ |
| 240 | + export LD=ld |
| 241 | + export AR=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ar |
| 242 | + export RANLIB=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ranlib |
| 243 | + arch -arm64 /bin/bash ./.gitlab/ci.sh |
| 244 | + after_script: |
| 245 | + - rm -Rf /private/tmp/.brew_tmp |
102 | 246 | variables:
|
103 | 247 | MACOSX_DEPLOYMENT_TARGET: "10.7"
|
| 248 | + ADD_CABAL_ARGS: "" |
104 | 249 | parallel: *m1_matrix
|
105 |
| - artifacts: |
106 |
| - expire_in: 2 week |
107 |
| - paths: |
108 |
| - - out |
| 250 | + |
| 251 | +tar-aarch64-darwin: |
| 252 | + extends: .artifacts |
| 253 | + stage: tar |
| 254 | + needs: ["build-aarch64-darwin"] |
| 255 | + tags: |
| 256 | + - aarch64-darwin-m1 |
| 257 | + script: |
| 258 | + - arch -arm64 /bin/bash ./.gitlab/tar.sh |
| 259 | + variables: |
| 260 | + TARBALL_ARCHIVE_SUFFIX: aarch64-darwin |
| 261 | + TARBALL_EXT: tar.xz |
109 | 262 |
|
110 | 263 | build-x86_64-windows:
|
111 | 264 | extends: .build
|
112 | 265 | tags:
|
113 | 266 | - new-x86_64-windows
|
114 | 267 | parallel: *default_matrix
|
| 268 | + script: |
| 269 | + - bash '-lc' 'pacman --noconfirm -S zip' |
| 270 | + - $env:CHERE_INVOKING = "yes" |
| 271 | + - bash '-lc' "ADD_CABAL_ARGS=$env:ADD_CABAL_ARGS GHC_VERSION=$env:GHC_VERSION CABAL_INSTALL_VERSION=$CABAL_INSTALL_VERSION .gitlab/ci.sh" |
| 272 | + variables: |
| 273 | + ADD_CABAL_ARGS: "" |
| 274 | + |
| 275 | +tar-x86_64-windows: |
| 276 | + extends: .artifacts |
| 277 | + stage: tar |
| 278 | + needs: ["build-x86_64-windows"] |
| 279 | + tags: |
| 280 | + - new-x86_64-windows |
| 281 | + script: |
| 282 | + - $env:CHERE_INVOKING = "yes" |
| 283 | + - bash '-lc' "TARBALL_ARCHIVE_SUFFIX=$env:TARBALL_ARCHIVE_SUFFIX TARBALL_EXT=$env:TARBALL_EXT .gitlab/tar.sh" |
| 284 | + variables: |
| 285 | + TARBALL_ARCHIVE_SUFFIX: x86_64-windows |
| 286 | + TARBALL_EXT: zip |
| 287 | + |
0 commit comments