Last active
June 8, 2018 20:18
-
-
Save TerrorJack/c0b847fff0e9f221144c5b61f69f9988 to your computer and use it in GitHub Desktop.
Recipe for building ghc-8.4.3 bindist for Alpine Linux on CircleCI
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
SRC_HC_OPTS = -O -H64m | |
GhcStage1HcOpts = -O | |
GhcStage2HcOpts = -O2 | |
GhcLibHcOpts = -O2 | |
BUILD_PROF_LIBS = YES | |
SplitObjs = NO | |
SplitSections = YES | |
BUILD_SPHINX_HTML = YES | |
BUILD_SPHINX_PDF = NO | |
HADDOCK_DOCS = YES | |
EXTRA_HADDOCK_OPTS += --quickjump --hyperlinked-source |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: alpine:edge | |
environment: | |
GHC_REV: ghc-8.4.3-release | |
JOBS: 4 | |
XZ_OPT: -9 | |
steps: | |
- checkout | |
- run: | |
name: Compile GHC | |
no_output_timeout: 1h | |
command: | | |
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | |
apk upgrade --no-cache --no-progress | |
apk add --no-cache --no-progress \ | |
autoconf \ | |
automake \ | |
binutils-gold \ | |
bzip2 \ | |
ca-certificates \ | |
coreutils \ | |
curl \ | |
file \ | |
findutils \ | |
g++ \ | |
gawk \ | |
gcc \ | |
ghc \ | |
git \ | |
gmp-dev \ | |
gzip \ | |
libffi-dev \ | |
libtool \ | |
make \ | |
musl-dev \ | |
ncurses-dev \ | |
numactl-dev \ | |
openssh \ | |
patch \ | |
perl \ | |
py3-sphinx \ | |
sed \ | |
tar \ | |
xz \ | |
zlib-dev | |
mkdir -p ~/.local/bin | |
export PATH=~/.local/bin:$PATH | |
curl -L https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-linux-x86_64-static.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' | |
stack --no-terminal --resolver lts-9 --system-ghc install \ | |
alex \ | |
happy \ | |
hscolour | |
export PROJECT_DIR=$(pwd) | |
cd /tmp | |
git clone git://git.haskell.org/ghc.git | |
cd ghc | |
git checkout $GHC_REV | |
git submodule update --init --recursive | |
mv $PROJECT_DIR/build.mk mk/ | |
./boot | |
SPHINXBUILD=/usr/bin/sphinx-build-3 ./configure --disable-ld-override | |
make -j$JOBS | |
make binary-dist | |
mkdir /tmp/ghc-bindist | |
mv *.tar.xz /tmp/ghc-bindist/ | |
- store_artifacts: | |
path: /tmp/ghc-bindist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment