roswell.roswell/.travis.yml
2016-03-02 03:15:18 +09:00

118 lines
6.6 KiB
YAML

language: c
sudo: false
env:
global:
- PATH=~/.roswell/bin:~/.linuxbrew/bin:$PATH
- ROSWELL_BRANCH=master
- ROSWELL_INSTALL_DIR=$HOME/.roswell
matrix:
include:
- sudo: required
env: METHOD=cross XCC=i686-w64-mingw32-gcc HOST="--host=i686-w64-mingw32" PREFIX="--prefix=/usr/i686-w64-mingw32"
- sudo: required
env: METHOD=debian
- sudo: required
env: METHOD=documents
- sudo: required
env: METHOD=valgrind XCFLAGS="-g -O0"
- env: METHOD=brew
- env: METHOD=brew WORKARROUND=true
- env: METHOD=ci LISP=sbcl/1.1.14
- env: METHOD=ci LISP=ccl32
- env: METHOD=ci LISP=sbcl
- env: METHOD=ci LISP=ecl
- env: METHOD=ci LISP=clisp
- env: METHOD=ci LISP=alisp
- env: METHOD=ci LISP=abcl
- env: METHOD=ci LISP=ccl
- env: METHOD=ci LISP=cmucl
- env: METHOD=ci LISP=sbcl-bin
os:
- osx
- linux
matrix:
exclude:
- os: osx
env: METHOD=cross XCC=i686-w64-mingw32-gcc HOST="--host=i686-w64-mingw32" PREFIX="--prefix=/usr/i686-w64-mingw32"
- os: osx
env: METHOD=debian
- os: osx
env: METHOD=documents
- os: osx
env: METHOD=valgrind XCFLAGS="-g -O0"
- os: osx
env: METHOD=brew WORKARROUND=true
#branches:
# except:
# - /^v[0-9]/
# addons:
# apt:
# packages:
# - gcc-multilib
# - gcc-mingw-w64-i686
# - binutils-mingw-w64-i686
# - wine
before_install:
- date
- if [ $METHOD = cross ]; then find . \( -name \*.c -o -name \*.h \) -type f|xargs wc -l -c; fi
- if [ $METHOD = cross ]; then find . \( -name \*.lisp -o -name \*.ros \) -type f|xargs wc -l -c; fi
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -qq update --force-yes > /dev/null; fi
- if [ $TRAVIS_OS_NAME = linux ] && [ $METHOD = brew ]; then yes ""| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"; fi
- if [ $TRAVIS_OS_NAME = osx ] || [ $METHOD = brew ]; then brew update;brew --env;brew config; fi
- if [ $TRAVIS_OS_NAME = linux ] && [ $METHOD = brew ] && [ $WORKARROUND = true ]; then brew tap homebrew/dupes; fi #work arround https://github.com/Linuxbrew/linuxbrew/issues/742#issuecomment-176486281
- if [ $METHOD = brew ]; then brew update;brew doctor || true; fi
install:
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = cross ]; then sudo apt-get install -qq lcab > /dev/null; fi
- if [ $METHOD = documents ]; then sudo apt-get install -qq pandoc ruby-sass; pandoc -v; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = debian ]; then sudo apt-get install -qq debhelper dh-autoreconf; fi
- if [ x$XCC = xi686-w64-mingw32-gcc ]; then sudo apt-get install -qq gcc-mingw-w64-i686 binutils-mingw-w64-i686; fi
- if [ x$WINE != x ]; then sudo apt-get install -qq wine > /dev/null; fi
- if [ $METHOD = valgrind ]; then sudo apt-get install -qq valgrind > /dev/null; fi
- if [ $METHOD = brew ]; then brew tap roswell/roswell; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = cross ]; then git clone https://github.com/snmsts/sn.github.git ~/lisp/sn.github; fi
script:
- if [ "$METHOD" = "documents" ]; then rm documents/man/* documents/html/*; fi
- if [ "$METHOD" = "documents" ]; then sh bootstrap;./configure --enable-manual-generation --enable-html-generation;make clean;make;sudo make install; fi
- if [ "$METHOD" = "brew" ]; then brew install roswell --verbose --HEAD; fi
- if [ "$METHOD" = "ci" ]; then sh ./scripts/install-for-ci.sh; fi
- if [ "$METHOD" = "cross" ] || [ "$METHOD" = "valgrind" ] || ([ x$TRAVIS_TAG != x ] && [ $METHOD = debian ]); then
sh bootstrap;CFLAGS=$XCFLAGS ./configure --disable-dependency-tracking --disable-maintainer-mode;make;sudo make install;make maintainer-clean; fi
- if [ "$METHOD" = "cross" ]; then CC=$XCC ./configure ${PREFIX} ${HOST};make; fi
- if [ "$METHOD" = "brew" ] || [ "$METHOD" = "ci" ]; then ros version; fi
- if [ "$METHOD" = "brew" ] || [ "$METHOD" = "ci" ]; then ros version=t run; fi
- if [ "$METHOD" = "brew" ] || [ "$METHOD" = "ci" ]; then ros config; fi
- if [ "$METHOD" = "brew" ] || [ "$METHOD" = "ci" ]; then ros -s prove-asdf -s quri-test -e "(asdf:test-system :quri-test)"; fi
- if [ "$METHOD" = "ci" ]; then ros -q run && [`ros -q run 2>&1` == ""]; fi
- if [ "$METHOD" = "ci" ] && [ "$LISP" = "sbcl-bin" ]; then [`ros -e "(ros:ignore-shebang)" -e '(loop for x in (directory "src/lisp/*.ros") do (load x))' 2>&1` == ""]; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = debian ]; then ros ./scripts/debian.ros; fi
after_success:
- if [ "$METHOD" = "documents" ] || [ $METHOD = brew ]; then git config user.email "auto@example.com"; fi
- if [ "$METHOD" = "documents" ] || [ $METHOD = brew ]; then git config user.name "Travis-CI"; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then git clone https://github.com/roswell/homebrew-roswell/ ~/lisp/homebrew-roswell; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then ros ./scripts/homebrew.ros; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then cp ./scripts/homebrew/roswell.rb ~/lisp/homebrew-roswell/roswell.rb; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then cd ~/lisp/homebrew-roswell/; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then git add roswell.rb; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then git commit -m v`ros roswell-internal-use version`; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = brew ] && [ $TRAVIS_OS_NAME = linux ]; then
git push --force --quiet "https://${GITHUB_OAUTH_TOKEN}:x-oauth-basic@github.com/roswell/homebrew-roswell.git" master > /dev/null 2>&1; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = cross ]; then lcab -q src/ros.exe src/lisp/* ros-$XCC.cab; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = cross ]; then ros ./scripts/release.ros github ros-$XCC.cab; fi
- if [ x$TRAVIS_TAG != x ] && [ $METHOD = debian ]; then ros ./scripts/release.ros debian; fi
- if [ "$METHOD" = "documents" ]; then git branch;git status; fi
- if [ "$METHOD" = "documents" ]; then git checkout $TRAVIS_BRANCH;git add -u;git add documents/man/* documents/html/*; fi
- if [ "$METHOD" = "documents" ]; then git commit -m "[ci skip] documents update"; fi
- if [ "$METHOD" = "documents" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
git push --force --quiet "https://${GITHUB_OAUTH_TOKEN}:x-oauth-basic@github.com/roswell/roswell.git" $TRAVIS_BRANCH > /dev/null 2>&1; fi
- if [ "$METHOD" = "valgrind" ]; then ros setup; fi
- if [ "$METHOD" = "valgrind" ]; then valgrind --leak-check=yes ros config; fi