on master help sign in
Merge branch 'travis'
b19629dHamish Mackenzie
.travis.yml+17−29
@@ -1,41 +1,29 @@
1sudo: required
1sudo: required
2−dist: trusty
2+services:
3−
3+ - docker
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
10
4
11cache:
5cache:
12 directories:
6 directories:
13− - $HOME/.cabal
7+ - .cabal
14− - $HOME/.ghc
8+ - .ghc
15
9
16−before_install:
10+env:
17− - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
11+ - CABALVER=1.24 GHCVER=7.10.3 OSVER=xenial
18− - travis_retry sudo apt-get update
12+ - CABALVER=1.24 GHCVER=8.0.1 OSVER=xenial
19− - travis_retry sudo apt-get install -y cabal-install-$CABALVER ghc-$GHCVER happy-1.19.5 alex-3.1.7 nodejs node-ws
13+ - CABALVER=1.24 GHCVER=7.10.3 OSVER=wily
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
14+ - CABALVER=1.24 GHCVER=8.0.1 OSVER=wily
21
15
22−install:
16+before_install:
23− - cabal --version
17+ - docker build -t ghc -f travis/$OSVER.Dockerfile travis
24− - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
25− - travis_retry cabal update
26
18
27script:
19script:
28− - cabal install --only-dependencies --enable-tests --force-reinstalls
20+ - docker run -v `pwd`:/build ghc
29− - cabal configure
21+ sh -x -c "
30− - cabal build
22+ apt-get install -y cabal-install-$CABALVER ghc-$GHCVER &&
31− - cabal haddock
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 &&
32− - node --version
24+ ./travis/build.sh"
33− - cabal test
34− - cabal clean
35− - cabal sdist
36−
37notifications:
25notifications:
38 irc:
26 irc:
39 channels: "irc.freenode.net#ghcjs"
27 channels: "irc.freenode.net#ghcjs"
40 skip_join: true
28 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+