Skip to content

Instantly share code, notes, and snippets.

@jmitchell
Created June 25, 2018 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmitchell/97ec81a114cb92a3323abb4ec3e020b6 to your computer and use it in GitHub Desktop.
Save jmitchell/97ec81a114cb92a3323abb4ec3e020b6 to your computer and use it in GitHub Desktop.
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p autoreconfHook python3 ncurses "(with haskellPackages; [ alex happy hscolour ])" "(with python36Packages; [ sphinx ])"
set -ex
REV=838aeb9b254efb3df7ed0cedeb945ec7c7789c90
BUILD_FLAVOUR=validate
THREADS=7
SKIP_PERF_TESTS=YES
VERBOSE=2
GHC_COLLECTOR_FLAVOR=x86_64-linux
# checkout
if [ ! -d ./ghc ]; then
git clone https://github.com/ghc/ghc.git
fi
cd ghc
git fetch --all
git checkout "$REV"
# *prepare
.circleci/prepare-system.sh
# *submodules
.circleci/fetch-submodules.sh
# *boot
./boot
cat <<EOF >> mk/build.mk
BuildFlavour=$BUILD_FLAVOUR
ifneq "\$(BuildFlavour)" ""
include mk/flavours/\$(BuildFlavour).mk
endif
EOF
# *configure_unix
./configure
# *make
make -j$THREADS
# *bindist
make binary-dist
# *storeartifacts
# curl https://ghc-artifacts.s3.amazonaws.com/tools/ghc-artifact-collector-$GHC_COLLECTOR_FLAVOR --output ghc-artifact-collector
# chmod +x ghc-artifact-collector
# ./ghc-artifact-collector ghc*.tar.xz
# *test
mkdir -p test-results
make test SKIP_PERF_TESTS=YES JUNIT_FILE=../../test-results/junit.xml
# *store_test_results
# TODO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment