From 7a0b59140d72d356cfb699c6058d37c6bdcb26d5 Mon Sep 17 00:00:00 2001 From: Bryan Richter Date: Tue, 26 May 2026 12:14:39 +0300 Subject: [PATCH] Remove gitlab release pipelines Last used for the 3.14 series, which probably won't see any more releases. Closes #11666 --- .gitlab-ci.yml | 119 --------------------------------------- .gitlab/brew.sh | 27 --------- .gitlab/ci.sh | 139 ---------------------------------------------- .gitlab/common.sh | 49 ---------------- .gitlab/ghcup.sh | 38 ------------- README.md | 1 - 6 files changed, 373 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 .gitlab/brew.sh delete mode 100755 .gitlab/ci.sh delete mode 100644 .gitlab/common.sh delete mode 100644 .gitlab/ghcup.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e5d2c7e930a..00000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,119 +0,0 @@ -stages: - - build - -variables: - # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: "be4ac2cd18f38e63b263e2a27c76a7c279385796" - - GHC_VERSION: 9.10.3 - CABAL_INSTALL_VERSION: 3.14.2.0 - -workflow: - rules: - - if: $CI_COMMIT_TAG - when: always - # Triggered if you start it from the gitlab web ui - - if: '$CI_PIPELINE_SOURCE == "web"' - when: always - - when: never - -.build: - stage: build - script: - - bash .gitlab/ci.sh - artifacts: - expire_in: 2 week - paths: - - out/* - -linux: - extends: .build - parallel: - matrix: - - ARCH: i386 - TAG: x86_64-linux - OS: - - deb10 - - ARCH: x86_64 - TAG: x86_64-linux - OS: - - deb10 - - deb11 - - deb12 - - fedora33 - - fedora36 - - fedora38 - - rocky8 - - ubuntu20_04 - - ubuntu22_04 - - ubuntu24_04 - - ARCH: aarch64 - TAG: aarch64-linux - OS: - - deb10 - - deb11 - - deb12 - tags: - - $TAG - image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV" - variables: - PLATFORM: "${ARCH}-linux-${OS}" - TARBALL_ARCHIVE_SUFFIX: $PLATFORM - TARBALL_EXT: tar.xz - ADD_CABAL_ARGS: "--enable-split-sections" - -alpine-linux: - extends: .build - parallel: - matrix: - - ARCH: [x86_64] - OS: [alpine3_12, alpine3_22] - TAG: x86_64-linux - - ARCH: [i386] - OS: alpine3_22 - TAG: x86_64-linux - - ARCH: [aarch64] - OS: [alpine3_22] - TAG: aarch64-linux - tags: - - $TAG - before_script: - # for cabal build - - sudo apk add --no-cache zlib zlib-dev zlib-static - image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV" - variables: - PLATFORM: "${ARCH}-linux-${OS}" - TARBALL_ARCHIVE_SUFFIX: $PLATFORM - TARBALL_EXT: tar.xz - ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static" - -darwin: - extends: .build - parallel: - matrix: - # Help me with names pls - - ARCH: x86_64 - ARCHARCH: x86_64 - - ARCH: aarch64 - ARCHARCH: arm64 - tags: - - ${ARCH}-darwin-m1 - variables: - TARBALL_ARCHIVE_SUFFIX: ${ARCH}-darwin - TARBALL_EXT: tar.xz - ADD_CABAL_ARGS: "" - script: - - arch -${ARCHARCH} /bin/bash .gitlab/ci.sh - -x86_64-windows: - extends: .build - script: - - $env:CHERE_INVOKING = "yes" - - bash '-lc' "ADD_CABAL_ARGS=$env:ADD_CABAL_ARGS GHC_VERSION=$env:GHC_VERSION CABAL_INSTALL_VERSION=$CABAL_INSTALL_VERSION .gitlab/ci.sh" - tags: - - new-x86_64-windows - variables: - TARBALL_ARCHIVE_SUFFIX: x86_64-windows - TARBALL_EXT: zip - ADD_CABAL_ARGS: "" - retry: 2 diff --git a/.gitlab/brew.sh b/.gitlab/brew.sh deleted file mode 100644 index b2771811d47..00000000000 --- a/.gitlab/brew.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuo pipefail - -# Install brew locally in the project dir. Packages will also be installed here. -# FIXME: Use brew in supported way. See -# https://docs.brew.sh/Installation#untar-anywhere-unsupported -brew_dir="${CI_PROJECT_DIR}/.brew" - -if [ ! -e "${brew_dir}" ]; then - mkdir -p "${brew_dir}" - curl --fail -L "https://github.com/Homebrew/brew/archive/refs/tags/${BREW_VERSION}.tar.gz" | tar xz --strip 1 -C "${brew_dir}" -fi - -export PATH="${brew_dir}/bin:${brew_dir}/sbin:$PATH" - -# make sure to not pollute the machine with temp files etc -mkdir -p $CI_PROJECT_DIR/.brew_cache -export HOMEBREW_CACHE=$CI_PROJECT_DIR/.brew_cache -mkdir -p $CI_PROJECT_DIR/.brew_logs -export HOMEBREW_LOGS=$CI_PROJECT_DIR/.brew_logs -mkdir -p /private/tmp/.brew_tmp -export HOMEBREW_TEMP=/private/tmp/.brew_tmp - -# update and install packages -brew update -brew install ${1+"$@"} diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh deleted file mode 100755 index 708ff0e0d30..00000000000 --- a/.gitlab/ci.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuo pipefail - -source "$CI_PROJECT_DIR/.gitlab/common.sh" - -# Required arguments to the script -: "${GHC_VERSION:?Need to set GHC_VERSION}" -: "${CABAL_INSTALL_VERSION:?Need to set CABAL_INSTALL_VERSION}" - -# If GHC is set, extract its directory and add it to PATH -# The linux images set the GHC variable to specify the location of the GHC installation. -if [[ -n "${GHC:-}" ]]; then - echo "GHC variable is set to: $GHC" - export PATH="$(dirname "$GHC"):$PATH" -else - GHC="ghc" -fi - -echo "Checking toolchain versions..." - -# GHC check -ghc_version_ok=false -if command -v ghc &>/dev/null; then - current_ghc_version=$(ghc --numeric-version) - if [[ "$current_ghc_version" == "$GHC_VERSION" ]]; then - ghc_version_ok=true - else - echo "Wrong GHC version: found $current_ghc_version, expected $GHC_VERSION" - fi -else - echo "GHC executable '$GHC' not found on PATH" -fi - -# cabal check -cabal_version_ok=false -if command -v cabal &>/dev/null; then - current_cabal_version=$(cabal --numeric-version) - if [[ "$current_cabal_version" == "$CABAL_INSTALL_VERSION" ]]; then - cabal_version_ok=true - else - echo "Wrong cabal version: found $current_cabal_version, expected $CABAL_INSTALL_VERSION" - fi -else - echo "cabal not found on PATH" -fi - -# If either is wrong, install via ghcup -if ! $ghc_version_ok || ! $cabal_version_ok; then - echo "Installing correct GHC and/or cabal via ghcup..." - . "$CI_PROJECT_DIR/.gitlab/ghcup.sh" -fi - -# Final verification (ghc and cabal must now be on PATH) -echo "Verifying installed versions..." - -actual_ghc_version=$(ghc --numeric-version) -actual_cabal_version=$(cabal --numeric-version) - -if [[ "$actual_ghc_version" != "$GHC_VERSION" ]]; then - fail "Incorrect GHC version (actual: $actual_ghc_version, expected: $GHC_VERSION)" -fi - -if [[ "$actual_cabal_version" != "$CABAL_INSTALL_VERSION" ]]; then - fail "Incorrect cabal version (actual: $actual_cabal_version, expected: $CABAL_INSTALL_VERSION)" -fi - -echo "Using GHC version: $actual_ghc_version" -echo "Using cabal-install version: $actual_cabal_version" - -export CABAL_DIR="$CI_PROJECT_DIR/cabal" - -case "$(uname)" in - MSYS_*|MINGW*) - export CABAL_DIR="$(cygpath -w "$CABAL_DIR")" - EXE_EXT=".exe" - ;; - *) - EXE_EXT="" - ;; -esac - -mkdir -p "$CABAL_DIR" - -# https://github.com/haskell/cabal/issues/7313#issuecomment-811851884 -# and -# https://github.com/haskellari/lukko/issues/17 -# -# $PLATFORM comes from CI. -if [ "$(getconf LONG_BIT)" = "32" -o "${PLATFORM:=xxx}" = "x86_64-linux-centos7" ] ; then - echo 'constraints: lukko -ofd-locking' >> cabal.release.project.local -fi - -# In February 2024, cabal started using zlib-0.7.0.0, which uses pkg-config by -# default. The GitLab CI environment doesn't (yet) supply pkg-config, and zlib -# does just fine without it on modern GHCs. That said, the CI environment -# probably *should* have pkg-config installed. See -# https://github.com/haskell/cabal/issues/9774. -echo 'constraints: zlib -pkg-config' >> cabal.release.project.local -# Furthermore, on Windows, zlib claims that libz is shipped with GHC, so it just -# uses @extra-libraries: z@ if pkg-config is False. If you are reading this -# comment, however, this didn't work. Thus we switch to using the bundled libz, -# as was done in zlib <0.7.0.0. -case "$(uname)" in - MSYS_*|MINGW*) - echo 'constraints: zlib +bundled-c-zlib' >> cabal.release.project.local - ;; -esac - -args=( - --disable-profiling - --enable-executable-stripping - --project-file=cabal.release.project - ${ADD_CABAL_ARGS} -) - -run cabal update hackage.haskell.org,HEAD -run cabal v2-build ${args[@]} cabal-install - -mkdir "$CI_PROJECT_DIR/out" -cp "$(cabal list-bin ${args[@]} cabal-install:exe:cabal)" "$CI_PROJECT_DIR/out/cabal$EXE_EXT" -cp dist-newstyle/cache/plan.json "$CI_PROJECT_DIR/out/plan.json" -cd "$CI_PROJECT_DIR/out/" - -# create tarball/zip -TARBALL_PREFIX="cabal-install-$("$CI_PROJECT_DIR/out/cabal" --numeric-version)" -case "${TARBALL_EXT}" in - zip) - zip "${TARBALL_PREFIX}-${TARBALL_ARCHIVE_SUFFIX}.${TARBALL_EXT}" "cabal${EXE_EXT}" plan.json - ;; - tar.xz) - tar caf "${TARBALL_PREFIX}-${TARBALL_ARCHIVE_SUFFIX}.${TARBALL_EXT}" "cabal${EXE_EXT}" plan.json - ;; - *) - fail "Unknown TARBALL_EXT: ${TARBALL_EXT}" - ;; -esac - -rm cabal plan.json diff --git a/.gitlab/common.sh b/.gitlab/common.sh deleted file mode 100644 index b6bce698c91..00000000000 --- a/.gitlab/common.sh +++ /dev/null @@ -1,49 +0,0 @@ -# Common bash utilities -# ---------------------- - -# Colors -BLACK="0;30" -GRAY="1;30" -RED="0;31" -LT_RED="1;31" -BROWN="0;33" -LT_BROWN="1;33" -GREEN="0;32" -LT_GREEN="1;32" -BLUE="0;34" -LT_BLUE="1;34" -PURPLE="0;35" -LT_PURPLE="1;35" -CYAN="0;36" -LT_CYAN="1;36" -WHITE="1;37" -LT_GRAY="0;37" - -# GitLab Pipelines log section delimiters -# https://gitlab.com/gitlab-org/gitlab-foss/issues/14664 -start_section() { - name="$1" - echo -e "section_start:$(date +%s):$name\015\033[0K" -} - -end_section() { - name="$1" - echo -e "section_end:$(date +%s):$name\015\033[0K" -} - -echo_color() { - local color="$1" - local msg="$2" - echo -e "\033[${color}m${msg}\033[0m" -} - -error() { echo_color "${RED}" "$1"; } -warn() { echo_color "${LT_BROWN}" "$1"; } -info() { echo_color "${LT_BLUE}" "$1"; } - -fail() { error "error: $1"; exit 1; } - -function run() { - info "Running $*..." - "$@" || ( error "$* failed"; return 1; ) -} diff --git a/.gitlab/ghcup.sh b/.gitlab/ghcup.sh deleted file mode 100644 index 98a8b433b79..00000000000 --- a/.gitlab/ghcup.sh +++ /dev/null @@ -1,38 +0,0 @@ -export GHCUP_INSTALL_BASE_PREFIX="$CI_PROJECT_DIR/toolchain" - -case "$(uname)" in - MSYS_*|MINGW*) - GHCUP_BINDIR="${GHCUP_INSTALL_BASE_PREFIX}/ghcup/bin" - ;; - *) - GHCUP_BINDIR="${GHCUP_INSTALL_BASE_PREFIX}/.ghcup/bin" - ;; -esac - -mkdir -p "$GHCUP_BINDIR" -export PATH="$GHCUP_BINDIR:$PATH" - -export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 -export BOOTSTRAP_HASKELL_GHC_VERSION=$GHC_VERSION -export BOOTSTRAP_HASKELL_CABAL_VERSION=$CABAL_INSTALL_VERSION -export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=yes -# We don't use stack, and it isn't available on i386-deb9 -export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes - -# for some reason the subshell doesn't pick up the arm64 environment on darwin -# and starts installing x86_64 GHC -case "$(uname -s)" in - "Darwin"|"darwin") - case "$(/usr/bin/arch)" in - aarch64|arm64|armv8l) - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -arm64 /bin/bash - ;; - *) - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh - ;; - esac - ;; - *) - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh - ;; -esac diff --git a/README.md b/README.md index 993faf6bd01..4ba0f7e17f1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![Documentation Status](http://readthedocs.org/projects/cabal/badge/?version=latest)](http://cabal.readthedocs.io/en/latest/?badge=latest) [![IRC chat](https://img.shields.io/badge/chat-via%20libera-brightgreen.svg)](https://web.libera.chat/#hackage) [![Matrix chat](https://img.shields.io/badge/chat-via%20matrix-brightgreen.svg)](https://matrix.to/#/#hackage:matrix.org) -[![GitLab pipeline status](https://gitlab.haskell.org/haskell/cabal/badges/cabal-head/pipeline.svg?key_text=Release%20CI%20Early%20Warning&key_width=150)](https://gitlab.haskell.org/haskell/cabal/-/commits/cabal-head)