[commit: ghc] wip/nfs-locking: Add Travis support (64da998)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:36:14 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/64da99895a240d9af031ac9357b0bedcb215ac02/ghc
>---------------------------------------------------------------
commit 64da99895a240d9af031ac9357b0bedcb215ac02
Author: David Luposchainsky <dluposchainsky at gmail.com>
Date: Mon Jan 4 18:20:23 2016 +0100
Add Travis support
>---------------------------------------------------------------
64da99895a240d9af031ac9357b0bedcb215ac02
.travis.yml | 32 ++++++++++++++++++++++++++++++++
.travis/install-cabal-happy-alex.sh | 18 ++++++++++++++++++
.travis/install-ghc-shake.sh | 16 ++++++++++++++++
.travis/install-ghc.sh | 15 +++++++++++++++
.travis/print-env.sh | 9 +++++++++
.travis/run-ghc-shake.sh | 9 +++++++++
README.md | 2 ++
7 files changed, 101 insertions(+)
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..5e169fa
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,32 @@
+sudo: false
+
+matrix:
+ include:
+ - env: CABALVER=1.22 GHCVER=7.10.3
+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,zlib1g-dev,terminfo-dev], sources: [hvr-ghc]}}
+
+before_install:
+
+ - PATH="$HOME/.cabal/bin:$PATH"
+ - PATH="/opt/ghc/$GHCVER/bin:$PATH"
+ - PATH="/opt/cabal/$CABALVER/bin:$PATH"
+ - export PATH
+
+ - .travis/print-env.sh
+
+install:
+ - .travis/install-cabal-happy-alex.sh
+ - .travis/install-ghc.sh
+ - .travis/install-ghc-shake.sh
+
+script:
+ - .travis/run-ghc-shake.sh
+
+cache:
+ directories:
+ - $HOME/.cabal
+ # - ghc/shake-build/.cabal-sandbox
+ # - ghc/shake-build/cabal.sandbox.config
+
+# before_cache:
+# - rm -rf ghc/shake-build
diff --git a/.travis/install-cabal-happy-alex.sh b/.travis/install-cabal-happy-alex.sh
new file mode 100755
index 0000000..93df460
--- /dev/null
+++ b/.travis/install-cabal-happy-alex.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+COLOR="\e[32m" # Green
+RESET="\e[m"
+
+echo -e "${COLOR}GHC version:${RESET}"
+ghc --version
+
+echo -e "${COLOR}Cabal version:${RESET}"
+cabal --version
+
+echo -e "${COLOR}Update Cabal${RESET}"
+cabal update
+
+echo -e "${COLOR}Install Alex+Happy${RESET}"
+cabal install alex happy
diff --git a/.travis/install-ghc-shake.sh b/.travis/install-ghc-shake.sh
new file mode 100755
index 0000000..2dc0392
--- /dev/null
+++ b/.travis/install-ghc-shake.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+COLOR="\e[31m" # Red, because this file is serious business
+RESET="\e[m"
+
+echo -e "${COLOR}Brutally hacking GHC-Shake to its proper location${RESET}"
+SHAKEDIR="ghc/shake-build"
+mkdir -p "$SHAKEDIR"
+mv .git "$SHAKEDIR/"
+( cd "$SHAKEDIR" && git reset --hard HEAD )
+
+echo -e "${COLOR}Installing deps into sandbox${RESET}"
+( cd "$SHAKEDIR" && cabal sandbox init )
+( cd "$SHAKEDIR" && cabal install --only-dependencies . )
diff --git a/.travis/install-ghc.sh b/.travis/install-ghc.sh
new file mode 100755
index 0000000..126cbe2
--- /dev/null
+++ b/.travis/install-ghc.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+COLOR="\e[34m" # Blue
+RESET="\e[m"
+
+echo -e "${COLOR}Clone GHC source${RESET}"
+git clone git://git.haskell.org/ghc
+
+echo -e "${COLOR}Initialize GHC submodules${RESET}"
+( cd ghc && git submodule update --init )
+
+echo -e "${COLOR}GHC boot/configure${RESET}"
+( cd ghc && ./boot && ./configure)
diff --git a/.travis/print-env.sh b/.travis/print-env.sh
new file mode 100755
index 0000000..c09c11f
--- /dev/null
+++ b/.travis/print-env.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+COLOR="\e[32m" # Green
+RESET="\e[m"
+
+echo -e "${COLOR}Environment:${RESET}"
+env
diff --git a/.travis/run-ghc-shake.sh b/.travis/run-ghc-shake.sh
new file mode 100755
index 0000000..7b867b7
--- /dev/null
+++ b/.travis/run-ghc-shake.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+COLOR="\e[32m" # Green
+RESET="\e[m"
+
+echo -e "${COLOR}Running Shake build system${RESET}"
+( cd ghc && ./shake-build/build.cabal.sh )
diff --git a/README.md b/README.md
index f26cc49..43b74be 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
Shaking up GHC
==============
+[![Build Status](https://travis-ci.org/snowleopard/shaking-up-ghc.svg)](https://travis-ci.org/snowleopard/shaking-up-ghc)
+
As part of my 6-month research secondment to Microsoft Research in Cambridge
I am taking up the challenge of migrating the current [GHC][ghc] build system
based on standard `make` into a new and (hopefully) better one based on
More information about the ghc-commits
mailing list