CI: disable prerelease validation
[cabal.git] / .gitlab-ci.yml
blob3df905884ae1fa48d8b96cea20f1a8353f0137c6
1 stages:
2   - build
4 variables:
5   # Commit of ghc/ci-images repository from which to pull Docker images
6   DOCKER_REV: "572353e0644044fe3a5465bba4342a9a0b0eb60e"
8   GHC_VERSION: 9.2.3
9   CABAL_INSTALL_VERSION: 3.6.2.0
11 workflow:
12   rules:
13     - if: $CI_COMMIT_TAG
14       when: always
15     # Triggered if you start it from the gitlab web ui
16     - if: '$CI_PIPELINE_SOURCE == "web"'
17       when: always
18     - when: never
20 .build:
21   stage: build
22   script:
23     - bash .gitlab/ci.sh
24   artifacts:
25     expire_in: 2 week
26     paths:
27       - out/*
29 build-x86_64-linux:
30   extends: .build
31   parallel:
32     matrix:
33       - PLATFORM:
34         - i386-linux-deb9
35         - x86_64-linux-centos7
36         - x86_64-linux-deb9
37         - x86_64-linux-fedora33
38         - x86_64-linux-rocky8
39         - x86_64-linux-ubuntu18_04
40         - x86_64-linux-ubuntu20_04
41         - x86_64-linux-deb10
42         - x86_64-linux-deb11
43   tags:
44     - x86_64-linux
45   image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV"
46   variables:
47     TARBALL_ARCHIVE_SUFFIX: $PLATFORM
48     TARBALL_EXT: tar.xz
49     ADD_CABAL_ARGS: "--enable-split-sections"
51 build-x86_64-linux-alpine:
52   extends: .build
53   tags:
54     - x86_64-linux
55   before_script:
56     # for cabal build
57     - sudo apk add --no-cache zlib zlib-dev zlib-static
58   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV"
59   variables:
60     TARBALL_ARCHIVE_SUFFIX: x86_64-linux-alpine
61     TARBALL_EXT: tar.xz
62     ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
64 build-x86_64-darwin:
65   extends: .build
66   tags:
67     - x86_64-darwin
68   variables:
69     TARBALL_ARCHIVE_SUFFIX: x86_64-darwin
70     TARBALL_EXT: tar.xz
71     ADD_CABAL_ARGS: ""
73 build-aarch64-darwin:
74   stage: build
75   tags:
76     - aarch64-darwin-m1
77   before_script:
78     - export HOMEBREW_CHANGE_ARCH_TO_ARM=1
79     - arch -arm64 /bin/bash ./.gitlab/brew.sh llvm autoconf automake coreutils make tree
80   # C_INCLUDE_PATH: https://gitlab.haskell.org/ghc/ghc/-/issues/20592
81   script: |
82     export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
83     export CC=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang
84     export CXX=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang++
85     export LD=ld
86     export AR=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ar
87     export RANLIB=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ranlib
88     export C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi"
89     arch -arm64 /bin/bash ./.gitlab/ci.sh
90   after_script:
91     - rm -Rf /private/tmp/.brew_tmp
92   variables:
93     MACOSX_DEPLOYMENT_TARGET: "10.7"
94     TARBALL_ARCHIVE_SUFFIX: aarch64-darwin
95     TARBALL_EXT: tar.xz
96     ADD_CABAL_ARGS: ""
97     # Update periodically.
98     BREW_VERSION: 4.0.5
99   artifacts:
100     expire_in: 2 week
101     paths:
102       - out/*
103   cache:
104     paths:
105       - .brew
107 build-x86_64-windows:
108   extends: .build
109   script:
110     - $env:CHERE_INVOKING = "yes"
111     - bash '-lc' "ADD_CABAL_ARGS=$env:ADD_CABAL_ARGS GHC_VERSION=$env:GHC_VERSION CABAL_INSTALL_VERSION=$CABAL_INSTALL_VERSION .gitlab/ci.sh"
112   tags:
113     - new-x86_64-windows
114   variables:
115     TARBALL_ARCHIVE_SUFFIX: x86_64-windows
116     TARBALL_EXT: zip
117     ADD_CABAL_ARGS: ""
118   retry: 2