Improve error message for empty --allow-newer= (fix #7740)
[cabal.git] / .gitlab-ci.yml
blob8ab20f2c04448a341f8f80f9231243d34a8fcff5
1 stages:
2   - build
4 # Used for ci setup in the gitlab mirror of the project:
5 # https://gitlab.haskell.org/haskell/haskell-language-server/-/pipelines
6 variables:
7   # Commit of ghc/ci-images repository from which to pull Docker images
8   DOCKER_REV: "4ed1a4f27828ba96a34662dc954335e29b470cd2"
10   GHC_VERSION: 8.10.7
11   CABAL_INSTALL_VERSION: 3.6.2.0
13 workflow:
14   rules:
15     - if: $CI_COMMIT_TAG
16       when: always
17     # Triggered if you start it from the gitlab web ui
18     - if: '$CI_PIPELINE_SOURCE == "web"'
19       when: always
20     - when: never
22 .build:
23   stage: build
24   script:
25     - bash .gitlab/ci.sh
26   artifacts:
27     expire_in: 2 week
28     paths:
29       - out/*
31 build-aarch64-linux-deb10:
32   extends: .build
33   tags:
34     - aarch64-linux
35   image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV"
36   variables:
37     TARBALL_ARCHIVE_SUFFIX: aarch64-linux-deb10
38     TARBALL_EXT: tar.xz
39     ADD_CABAL_ARGS: ""
41 build-armv7-linux-deb10:
42   extends: .build
43   tags:
44     - armv7-linux
45   image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV"
46   variables:
47     TARBALL_ARCHIVE_SUFFIX: armv7-linux-deb1
48     TARBALL_EXT: tar.xz
49     ADD_CABAL_ARGS: ""
50     # temp, because 3.6.2.0 is broken
51     CABAL_INSTALL_VERSION: 3.4.0.0
52   retry: 2
54 build-x86_64-linux:
55   extends: .build
56   tags:
57     - x86_64-linux
58   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
59   variables:
60     TARBALL_ARCHIVE_SUFFIX: x86_64-linux-deb10
61     TARBALL_EXT: tar.xz
62     ADD_CABAL_ARGS: "--enable-split-sections"
64 build-x86_64-linux-alpine:
65   extends: .build
66   tags:
67     - x86_64-linux
68   before_script:
69     # for cabal build
70     - sudo apk add --no-cache zlib zlib-dev zlib-static
71   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV"
72   variables:
73     TARBALL_ARCHIVE_SUFFIX: x86_64-linux-alpine
74     TARBALL_EXT: tar.xz
75     ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
77 build-i386-linux-alpine:
78   extends: .build
79   tags:
80     - x86_64-linux
81   image: "i386/alpine:3.12"
82   before_script:
83     # for GHC
84     - apk add --no-cache bash curl gcc g++ binutils binutils-gold bsd-compat-headers gmp-dev ncurses-dev libffi-dev make xz tar perl
85     # for cabal build
86     - apk add --no-cache zlib zlib-dev zlib-static
87   variables:
88     TARBALL_ARCHIVE_SUFFIX: i386-linux-alpine
89     TARBALL_EXT: tar.xz
90     ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
91     # temp, because 3.6.2.0 is broken
92     CABAL_INSTALL_VERSION: 3.4.0.0
94 build-x86_64-freebsd12:
95   extends: .build
96   tags:
97     - x86_64-freebsd12
98   variables:
99     TARBALL_ARCHIVE_SUFFIX: x86_64-freebsd12
100     TARBALL_EXT: tar.xz
101     ADD_CABAL_ARGS: "--enable-split-sections"
103 build-x86_64-darwin:
104   extends: .build
105   tags:
106     - x86_64-darwin
107   variables:
108     TARBALL_ARCHIVE_SUFFIX: x86_64-darwin
109     TARBALL_EXT: tar.xz
110     ADD_CABAL_ARGS: ""
112 build-aarch64-darwin:
113   stage: build
114   tags:
115     - aarch64-darwin-m1
116   before_script:
117     - export HOMEBREW_CHANGE_ARCH_TO_ARM=1
118     - arch -arm64 /bin/bash ./.gitlab/brew.sh llvm autoconf automake coreutils make tree
119   # C_INCLUDE_PATH: https://gitlab.haskell.org/ghc/ghc/-/issues/20592
120   script: |
121     export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
122     export CC=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang
123     export CXX=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang++
124     export LD=ld
125     export AR=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ar
126     export RANLIB=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ranlib
127     export C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi"
128     arch -arm64 /bin/bash ./.gitlab/ci.sh
129   after_script:
130     - rm -Rf /private/tmp/.brew_tmp
131   variables:
132     MACOSX_DEPLOYMENT_TARGET: "10.7"
133     TARBALL_ARCHIVE_SUFFIX: aarch64-darwin
134     TARBALL_EXT: tar.xz
135     ADD_CABAL_ARGS: ""
136   artifacts:
137     expire_in: 2 week
138     paths:
139       - out/*
141 build-x86_64-windows:
142   extends: .build
143   script:
144     - $env:CHERE_INVOKING = "yes"
145     - bash '-lc' "ADD_CABAL_ARGS=$env:ADD_CABAL_ARGS GHC_VERSION=$env:GHC_VERSION CABAL_INSTALL_VERSION=$CABAL_INSTALL_VERSION .gitlab/ci.sh"
146   tags:
147     - new-x86_64-windows
148   variables:
149     TARBALL_ARCHIVE_SUFFIX: x86_64-windows
150     TARBALL_EXT: zip
151     ADD_CABAL_ARGS: ""
152   retry: 2