Build releases

This commit is contained in:
2020-04-19 17:00:05 +02:00
parent 5184609dba
commit 27ead1be7c
3 changed files with 141 additions and 20 deletions

View File

@@ -0,0 +1,38 @@
#!/bin/sh
set -eux
apk add --no-cache \
curl \
gcc \
g++ \
gmp-dev \
ncurses-dev \
libffi-dev \
make \
xz \
tar \
perl \
\
cabal \
ghc
# utils
apk add --no-cache \
bash
## Package specific
apk add --no-cache \
zlib \
zlib-dev \
zlib-static \
gmp \
gmp-dev \
openssl-dev \
openssl-libs-static \
xz \
xz-dev
. "$( cd "$(dirname "$0")" ; pwd -P )/../../../ghcup_env"

26
.gitlab/script/ghcup_release.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
set -eux
. "$( cd "$(dirname "$0")" ; pwd -P )/../ghcup_env"
mkdir -p "$CI_PROJECT_DIR"/.local/bin
ecabal() {
cabal --store-dir="$(pwd)"/.store "$@"
}
# build
ecabal update
if [ "${OS}" = "LINUX" ] ; then
ecabal build -w ghc-${GHC_VERSION} -fcurl --ghc-options='-split-sections -optl-static'
else
ecabal build -w ghc-${GHC_VERSION} -fcurl
fi
mkdir out
cp "$(ecabal new-exec --verbose=0 --offline sh -- -c 'command -v ghcup')" .
ver=$(./ghcup --numeric-version)
cp ghcup out/${ARTIFACT}-${ver}