1
0
forked from GitHub/gf-rgl

(travis) refactor travis CI

- add ubuntu, mac, and windows builds

add travis build with mac and ubuntu
- fix signature in Make.hs for compatibility with ghc<8

add windows build to travis

using haskell and bash scripts

(travis) use  env variable

Make.bat works

(Make.bar) [temporary] comment some Langs

merge upstream and uncomment langs
This commit is contained in:
odanoburu
2018-10-31 09:03:42 -03:00
parent ef2c348d3a
commit 41ec90c3fe
2 changed files with 19 additions and 8 deletions

View File

@@ -1,14 +1,25 @@
sudo: required
language: c
services:
- docker
os:
- linux
- osx
- windows
addons:
apt:
packages:
- ghc
before_install:
- docker pull odanoburu/haskell-gf:3.9
- mkdir rgl
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ghc@8.2 && export PATH="/usr/local/opt/ghc@8.2/bin:$PATH" ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl http://www.grammaticalframework.org/download/gf-3.9-bin-intel-mac.tar.gz > gf.tar.gz && sudo tar --no-same-owner --no-same-permissions -C /usr/local -zxf gf.tar.gz && rm gf.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl http://www.grammaticalframework.org/download/gf_3.9.1-1_amd64-trusty.deb > gf.deb && sudo dpkg -i gf.deb && rm gf.deb ; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install ghc --version=8.4.4 && export PATH="/c/ProgramData/chocolatey/lib/ghc/tools/ghc-8.4.4/bin:$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then curl http://www.grammaticalframework.org/download/gf-3.9-bin-windows.zip > gf.zip && unzip gf.zip && rm gf.zip && export PATH="$TRAVIS_BUILD_DIR/gf-3.9/bin:$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then alias gf='gf.exe' && alias runghc='runghc.exe' ; fi
script:
- docker run --mount src="$(pwd)",target=/home,type=bind odanoburu/haskell-gf:3.9 /bin/bash -c "cd /home/; export GF_LIB_PATH=/home/rgl ; runghc Make.hs build prelude all --verbose ;"
- docker run --mount src="$(pwd)",target=/home,type=bind odanoburu/haskell-gf:3.9 /bin/bash -c "cd /home/; export GF_LIB_PATH=/home/rgl; bash Make.sh --dest=rgl --verbose ;"
- runghc Make.hs build prelude all --verbose ; rm -rf dist
- bash Make.sh --dest=dist-bash --verbose ; rm -rf dist
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then cmd //c Make.bat --dest=dist-bat --verbose ; fi