on master help sign in
Merge branch 'travis'

# Conflicts: # .travis.yml

commitb19629dc078300bb9845bc2310071b4772fbb259 authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> dateMon 3 Oct 2016, 02:05 (10 years ago) parent86dd3d7
5 files changed+72−29
.travis.yml+17−29 travis/build.sh+22 travis/vivid.Dockerfile+11 travis/wily.Dockerfile+11 travis/xenial.Dockerfile+11
.travis.yml+17−29
@@ -1,41 +1,29 @@
11sudo: required
2−dist: trusty
3−
4−env:
5− - CABALVER=1.24 GHCVER=7.10.1
6− - CABALVER=1.24 GHCVER=7.10.2
7− - CABALVER=1.24 GHCVER=7.10.3
8− - CABALVER=1.24 GHCVER=8.0.1
9− - CABALVER=head GHCVER=head
2+services:
3+ - docker
104
115cache:
126 directories:
13− - $HOME/.cabal
14− - $HOME/.ghc
7+ - .cabal
8+ - .ghc
159
16−before_install:
17− - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
18− - travis_retry sudo apt-get update
19− - travis_retry sudo apt-get install -y cabal-install-$CABALVER ghc-$GHCVER happy-1.19.5 alex-3.1.7 nodejs node-ws
20− - export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH
10+env:
11+ - CABALVER=1.24 GHCVER=7.10.3 OSVER=xenial
12+ - CABALVER=1.24 GHCVER=8.0.1 OSVER=xenial
13+ - CABALVER=1.24 GHCVER=7.10.3 OSVER=wily
14+ - CABALVER=1.24 GHCVER=8.0.1 OSVER=wily
2115
22−install:
23− - cabal --version
24− - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
25− - travis_retry cabal update
16+before_install:
17+ - docker build -t ghc -f travis/$OSVER.Dockerfile travis
2618
2719script:
28− - cabal install --only-dependencies --enable-tests --force-reinstalls
29− - cabal configure
30− - cabal build
31− - cabal haddock
32− - node --version
33− - cabal test
34− - cabal clean
35− - cabal sdist
36−
20+ - docker run -v `pwd`:/build ghc
21+ sh -x -c "
22+ apt-get install -y cabal-install-$CABALVER ghc-$GHCVER &&
23+ export PATH=\$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:\$PATH &&
24+ ./travis/build.sh"
3725notifications:
3826 irc:
3927 channels: "irc.freenode.net#ghcjs"
4028 skip_join: true
41− email: true
29+ email: true
travis/build.shnew file+22
@@ -0,0 +1,22 @@
1+#!/bin/bash -ex
2+
3+echo $PATH
4+export LC_ALL=C.UTF-8
5+GHCVER=`ghc --numeric-version`
6+
7+if [[ -d .cabal && -d .ghc ]]; then
8+ cp -a .cabal .ghc /root
9+fi
10+
11+npm install ws
12+
13+cabal update
14+cabal new-build 'jsaddle:lib:jsaddle' 'jsaddle:test:test-tool'
15+GHC_PACKAGE_PATH=/opt/ghc/$GHCVER/lib/ghc-$GHCVER/package.conf.d:~/.cabal/store/ghc-$GHCVER/package.db:./dist-newstyle/packagedb/ghc-$GHCVER jsaddle_datadir=`pwd` ./dist-newstyle/build/jsaddle-0.5.0.0/build/test-tool/test-tool
16+
17+# update the cache
18+rm -rf .cabal
19+cp -a /root/.cabal ./
20+rm -rf .ghc
21+cp -a /root/.ghc ./
22+
travis/vivid.Dockerfilenew file+11
@@ -0,0 +1,11 @@
1+FROM ubuntu:vivid
2+
3+RUN apt-get update && \
4+ apt-get -y install software-properties-common && \
5+ add-apt-repository -y ppa:hvr/ghc && \
6+ apt-get update && \
7+ apt-get -y install happy-1.19.5 alex-3.1.7 nodejs npm
8+
9+RUN mkdir /build
10+WORKDIR /build
11+
travis/wily.Dockerfilenew file+11
@@ -0,0 +1,11 @@
1+FROM ubuntu:wily
2+
3+RUN apt-get update && \
4+ apt-get -y install software-properties-common && \
5+ add-apt-repository -y ppa:hvr/ghc && \
6+ apt-get update && \
7+ apt-get -y install happy-1.19.5 alex-3.1.7 nodejs npm
8+
9+RUN mkdir /build
10+WORKDIR /build
11+
travis/xenial.Dockerfilenew file+11
@@ -0,0 +1,11 @@
1+FROM ubuntu:xenial
2+
3+RUN apt-get update && \
4+ apt-get -y install software-properties-common && \
5+ add-apt-repository -y ppa:hvr/ghc && \
6+ apt-get update && \
7+ apt-get -y install happy-1.19.5 alex-3.1.7 nodejs npm
8+
9+RUN mkdir /build
10+WORKDIR /build
11+