Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rewrite paths to configure * add gitlab ci integration to cabal * Add darwin aarch64 support to CI (#7636) * Add i386 build (#7700) No CI neeeded * Bump to 3.4.1.0 * Fix CI on M1 * Fix linux build * Use cabal.project.release in gitlab CI * Force cabal to use a build plan where exe:cabal-plan is enabled (cherry picked from commit 26b94bb) * Update boostrap CI to the ghcup format GHA now uses * Add ghcup install call to boostrap script to be future safe * Fix quick jobs Co-authored-by: Tamar Christina <tamar@zhox.com> Co-authored-by: Emily Pillmore <emilypi@cohomolo.gy> Co-authored-by: Fendor <power.walross@gmail.com> Co-authored-by: Mikolaj Konarski <mikolaj@well-typed.com>
- Loading branch information
1 parent
b086c19
commit a41797d
Showing
24 changed files
with
407 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
variables: | ||
# Commit of ghc/ci-images repository from which to pull Docker images | ||
DOCKER_REV: "853f348f9caf38b08740b280296fbd34e09abb3a" | ||
|
||
GHC_VERSION: 8.10.7 | ||
CABAL_INSTALL_VERSION: 3.4.0.0 | ||
|
||
workflow: | ||
rules: | ||
- if: $CI_COMMIT_TAG | ||
when: always | ||
- if: '$CI_PIPELINE_SOURCE == "web"' | ||
when: always | ||
- when: never | ||
|
||
.build: | ||
script: | ||
- bash .gitlab/ci.sh | ||
artifacts: | ||
expire_in: 2 week | ||
paths: | ||
- out | ||
|
||
build-aarch64-linux-deb10: | ||
extends: .build | ||
tags: | ||
- aarch64-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV" | ||
|
||
build-armv7-linux-deb10: | ||
extends: .build | ||
tags: | ||
- armv7-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV" | ||
|
||
build-x86_64-linux: | ||
extends: .build | ||
tags: | ||
- x86_64-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV" | ||
|
||
build-x86_64-linux-alpine: | ||
extends: .build | ||
tags: | ||
- x86_64-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV" | ||
|
||
build-i386-linux-alpine: | ||
extends: .build | ||
tags: | ||
- x86_64-linux | ||
image: "i386/alpine:3.12" | ||
before_script: | ||
# for GHC | ||
- apk add --no-cache bash curl gcc g++ binutils binutils-gold bsd-compat-headers gmp-dev ncurses-dev libffi-dev make xz tar perl | ||
# for cabal build | ||
- apk add --no-cache zlib zlib-dev zlib-static | ||
|
||
build-x86_64-freebsd: | ||
extends: .build | ||
tags: | ||
- x86_64-freebsd13 | ||
|
||
build-x86_64-darwin: | ||
extends: .build | ||
tags: | ||
- x86_64-darwin | ||
|
||
build-aarch64-darwin: | ||
tags: | ||
- aarch64-darwin-m1 | ||
script: | | ||
set -Eeuo pipefail | ||
function runInNixShell() { | ||
time nix-shell $CI_PROJECT_DIR/.gitlab/shell.nix \ | ||
-I nixpkgs=https://github.com/angerman/nixpkgs/archive/75f7281738b.tar.gz \ | ||
--argstr system "aarch64-darwin" \ | ||
--pure \ | ||
--keep CI_PROJECT_DIR \ | ||
--keep MACOSX_DEPLOYMENT_TARGET \ | ||
--keep GHC_VERSION \ | ||
--keep CABAL_INSTALL_VERSION \ | ||
--run "$1" 2>&1 | ||
} | ||
# temporary fix | ||
runInNixShell "cabal update && mkdir vendored && cd vendored && cabal unpack network-3.1.2.2 && cd network-3.1.2.2 && autoreconf -fi" 2>&1 | ||
runInNixShell "./.gitlab/ci.sh" 2>&1 | ||
variables: | ||
MACOSX_DEPLOYMENT_TARGET: "10.7" | ||
artifacts: | ||
expire_in: 2 week | ||
paths: | ||
- out | ||
|
||
build-x86_64-windows: | ||
extends: .build | ||
tags: | ||
- new-x86_64-windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeuo pipefail | ||
|
||
source "$CI_PROJECT_DIR/.gitlab/common.sh" | ||
|
||
|
||
export GHCUP_INSTALL_BASE_PREFIX="$CI_PROJECT_DIR/toolchain" | ||
export CABAL_DIR="$CI_PROJECT_DIR/cabal" | ||
|
||
case "$(uname)" in | ||
MSYS_*|MINGW*) | ||
export CABAL_DIR="$(cygpath -w "$CABAL_DIR")" | ||
GHCUP_BINDIR="${GHCUP_INSTALL_BASE_PREFIX}/ghcup/bin" | ||
;; | ||
*) | ||
GHCUP_BINDIR="${GHCUP_INSTALL_BASE_PREFIX}/.ghcup/bin" | ||
;; | ||
esac | ||
|
||
mkdir -p "$CABAL_DIR" | ||
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_VERBOSE=1 | ||
export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=yes | ||
|
||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh | ||
|
||
run cabal v2-install cabal-install \ | ||
-w "ghc-$GHC_VERSION" \ | ||
--project-file=cabal.project.release \ | ||
--installdir="$CI_PROJECT_DIR/out" \ | ||
--install-method=copy \ | ||
--overwrite-policy=always \ | ||
--enable-executable-static \ | ||
--disable-profiling \ | ||
--enable-split-sections \ | ||
--enable-executable-stripping | ||
|
||
cp dist-newstyle/cache/plan.json "$CI_PROJECT_DIR/out/plan.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# 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; ) | ||
} | ||
.gitlab-ci.yml | ||
+ | ||
61 | ||
- | ||
0 | ||
|
||
Viewed | ||
variables: | ||
# Commit of ghc/ci-images repository from which to pull Docker images | ||
DOCKER_REV: "853f348f9caf38b08740b280296fbd34e09abb3a" | ||
|
||
GHC_VERSION: 8.10.7 | ||
CABAL_INSTALL_VERSION: 3.2.0.0 | ||
|
||
workflow: | ||
rules: | ||
- if: $CI_COMMIT_TAG | ||
when: always | ||
- if: '$CI_PIPELINE_SOURCE == "web"' | ||
when: always | ||
- when: never | ||
|
||
.build: | ||
script: | ||
- bash .gitlab/ci.sh | ||
artifacts: | ||
expire_in: 2 week | ||
paths: | ||
- out | ||
|
||
build-aarch64-linux-deb10: | ||
extends: .build | ||
tags: | ||
- aarch64-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV" | ||
|
||
build-armv7-linux-deb10: | ||
extends: .build | ||
tags: | ||
- armv7-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV" | ||
|
||
build-x86_64-linux: | ||
extends: .build | ||
tags: | ||
- x86_64-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" | ||
|
||
build-x86_64-linux-alpine: | ||
extends: .build | ||
tags: | ||
- x86_64-linux | ||
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV" | ||
|
||
build-x86_64-freebsd: | ||
extends: .build | ||
tags: | ||
- x86_64-freebsd | ||
|
||
build-x86_64-darwin: | ||
extends: .build | ||
tags: | ||
- x86_64-darwin | ||
|
||
build-x86_64-windows: | ||
extends: .build | ||
tags: | ||
- new-x86_64-windows |
Oops, something went wrong.