cache: timeout: 1000 directories: - $HOME/.opam - $HOME/neko - $HOME/apt-cache - $HOME/hxcache - $HOME/lua_env - $HOME/.luarocks before_cache: - if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get autoclean; sudo rm -f $HOME/apt-cache/lock || true; fi # somehow these files are recreated everytime - rm -f $HOME/lua_env/lib/liblua51.a - rm -f $HOME/lua_env/lib/liblua52.a - rm -f $HOME/lua_env/lib/liblua53.a - rm -f $HOME/lua_env/lib/libluajit-5.1.a #- if [ $TRAVIS_OS_NAME = 'osx' ]; then brew cleanup; fi env: global: - OPAMYES=1 # make variables - ADD_REVISION=1 # nightly builds submit - secure: "UoGjYvQqt66GWmeLC4Pih1iue5AufVgW8XQOd2Bx839NN/2mQQ9bD1HuONJe+taWBJ+PHInkAjYROYYaiCQUA7B1SXs3oQD7Og6arVcR7kY7XOdAQ2t8ZkxJHTnuYGWW/2gNFBESv+3H17bkXG4rzaSn2LV5PJLOxSjw0ziBUMY=" - secure: "ugpxt+zeYiAiMYKLK96f5TLSxbQAtmDWiumdwaLHl88fIUeefxJJPIF1Xm0AHeYEJE7sD8dLE1dMbRSzOpXFfTmJoQZv19Wjv+2N5B+DaabKjGj1nZG7q3blGa3nUYzWVfFNFiIpM9c5fvW8yiUFzacZE5itEY8+lZQeGsNh+WQ=" sudo: required dist: trusty install_linux: &install_linux # Install dependencies - export APT_CACHE_DIR=~/apt-cache && mkdir -pv $APT_CACHE_DIR - sudo apt-get install --reinstall ca-certificates # workaround for "Cannot add PPA: 'ppa:haxe/ocaml'. Please check that the PPA name or format is correct." - sudo add-apt-repository ppa:haxe/ocaml -y - sudo apt-get update -y - sudo apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y ocaml ocaml-native-compilers ocaml-findlib libpcre3-dev zlib1g-dev libgtk2.0-dev ninja-build awscli $JOB_DEPENDENCIES # install neko - if [ ! $DEPLOY_NIGHTLIES ]; then sudo add-apt-repository ppa:haxe/snapshots -y; sudo apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y neko neko-dev; else if [ ! -d "$HOME/neko" ]; then mkdir $HOME/neko; pushd $HOME/neko; git clone https://github.com/HaxeFoundation/neko.git .; git submodule update --init --recursive; else pushd $HOME/neko; if [ ! -d "$HOME/neko/.git" ]; then git clone https://github.com/HaxeFoundation/neko.git .; git submodule update --init --recursive; else git fetch --all; git reset --hard origin/master; git submodule update --init --recursive; fi; fi; cmake . -DSTATIC_DEPS=all -G Ninja || (git clean -dfx && cmake . -DSTATIC_DEPS=all -G Ninja); ninja download_static_deps || ninja download_static_deps || ninja download_static_deps; ninja -j 4; sudo ninja install; popd; fi # Setup JDK - jdk_switcher use oraclejdk7 - java -version # ocaml dependencies - wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin system - opam update - opam pin add haxe . --no-action - opam install haxe --deps-only # Build haxe - make package_src -s - opam config exec -- make -s STATICLINK=1 libs - opam config exec -- make -s -j STATICLINK=1 haxe - opam config exec -- make -s haxelib - make package_bin -s - ls -l out - ldd -v ./haxe - ldd -v ./haxelib - export PATH="$PATH:$TRAVIS_BUILD_DIR" - export HAXE_STD_PATH="$TRAVIS_BUILD_DIR/std" install_osx: &install_osx # Install dependencies - travis_retry brew update --merge - brew uninstall --force brew-cask # https://github.com/caskroom/homebrew-cask/pull/15381 - travis_retry brew tap Homebrew/bundle - travis_retry brew bundle --file=tests/Brewfile # install neko - if [ ! $DEPLOY_NIGHTLIES ]; then brew install neko --HEAD; else if [ ! -d "$HOME/neko" ]; then mkdir $HOME/neko; pushd $HOME/neko; git clone https://github.com/HaxeFoundation/neko.git .; git submodule update --init --recursive; else pushd $HOME/neko; if [ ! -d "$HOME/neko/.git" ]; then git clone https://github.com/HaxeFoundation/neko.git .; git submodule update --init --recursive; else git fetch --all; git reset --hard origin/master; git submodule update --init --recursive; fi; fi; cmake . -DSTATIC_DEPS=all -G Ninja || (git clean -dfx && cmake . -DSTATIC_DEPS=all -G Ninja); ninja download_static_deps || ninja download_static_deps || ninja download_static_deps; ninja -j 4; sudo ninja install; popd; fi # ocaml dependencies - opam init - eval `opam config env` - opam update - opam pin add haxe . --no-action - opam install haxe --deps-only # Build haxe - make -s STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" libs - make -s -j STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" haxe - make -s haxelib - make package_bin -s - ls -l out - otool -L ./haxe - otool -L ./haxelib - export PATH="$PATH:$TRAVIS_BUILD_DIR" - export HAXE_STD_PATH="$TRAVIS_BUILD_DIR/std" matrix: include: ######### # linux # ######### - os: linux env: - TEST=neko - DEPLOY_API_DOCS=1 - DEPLOY_NIGHTLIES=1 # haxeci_decrypt (Deploy source package to ppa:haxe/snapshots.) - secure: "Mw3p6bDZuqVQ6u7GrwLQfje5hhIOA4+mdqqLXYHP79UKdhgqb91Dn6IbG9vQ1VXVe64W4YZbQAMBMMRX5kEPDl6JvTVGSBhg00Mi69oO5qrCMcBI6f9FntG72YaVvLf+PA7co+vKrnJzaP2M9pe4SH9Ztbhy0YNxULp7NQ8FLsM=" addons: ssh_known_hosts: - haxe.org - api.haxe.org before_install: - eval `ssh-agent -s` # for deployment to haxe.org install: *install_linux - os: linux env: - TEST=macro,js,php,flash9,as3,java,cs,python,lua - SAUCE=1 addons: sauce_connect: true before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - "export AUDIODEV=null" install: *install_linux - os: linux env: - TEST=cpp - HXCPP_COMPILE_THREADS=4 - HXCPP_COMPILE_CACHE=~/hxcache - JOB_DEPENDENCIES="gcc-multilib g++-multilib" install: *install_linux ####### # osx # ####### - os: osx osx_image: xcode7.3 # to compile binaries that support older versions of Mac, and 10.11 is the min version that brew provides bottles env: - TEST=neko - DEPLOY_NIGHTLIES=1 install: *install_osx - os: osx osx_image: xcode9.1 # to compile faster env: - TEST=macro,java,cs,lua,js,php,flash9,python install: *install_osx - os: osx osx_image: xcode9.1 # to compile faster env: - TEST=cpp - HXCPP_COMPILE_CACHE=~/hxcache - HXCPP_COMPILE_THREADS=4 install: *install_osx script: - pushd tests - mkdir ~/haxelib && haxelib setup ~/haxelib - haxe -version - haxe RunCi.hxml - popd notifications: webhooks: urls: - https://webhooks.gitter.im/e/95a5fa471c27beee8e7c on_success: change # options: [always|never|change] default: always on_failure: always # options: [always|never|change] default: always on_start: false # default: false