language: cpp jobs: include: - os: linux dist: bionic # - os: osx addons: apt: packages: - python3 - python3-pip - cmake - libsdl2-dev - libsdl2-mixer-dev - libsdl2-image-dev - liblua5.1-0-dev - libtolua++5.1-dev - libtolua-dev - libtheora-dev - libvorbis-dev - libogg-dev - libmng-dev - libpng-dev - zlib1g-dev before_script: - "if [ $TRAVIS_OS_NAME == osx ]; then brew install lua51 sdl2 sdl2_mixer sdl2_image; \ git clone https://github.com/LuaDist/toluapp.git; \ cd toluapp; mkdir build; cd build; cmake ..; make; \ export CMAKEARGS=\"-DTOLUA++_INCLUDE_DIR=$(pwd)/../include/ -DTOLUA++_LIBRARY=$(pwd)/libtoluapp.dylib -DTOLUA++_APP=$(pwd)/toluapp -DWITH_X11=OFF\"; cd ..; cd ..; fi" - mkdir build - cd build - cmake $CMAKEARGS .. script: make after_success: - "if [ $TRAVIS_REPO_SLUG == Wargus/stratagus -a \ $TRAVIS_BRANCH == master -a \ $TRAVIS_OS_NAME == linux -a \ $TRAVIS_PULL_REQUEST == 'false' ]; then \ cd $TRAVIS_BUILD_DIR; git clone https://${GH_TOKEN}@github.com/Wargus/wargus.github.io; python3 -m pip install --user Pygments; python3 doc/lua/generate_index.py; cp index.html wargus.github.io/lua_bindings.html; cd wargus.github.io; git config --global user.email \"travis-ci@travis.org\"; git config --global user.name \"Travis CI\"; git add lua_bindings.html; git commit -m \"update bindings\"; git push origin master; cd ..; fi" - "if [ $TRAVIS_REPO_SLUG == Wargus/stratagus -a \ $TRAVIS_BRANCH == master -a \ $TRAVIS_OS_NAME == osx -a \ $TRAVIS_PULL_REQUEST == 'false' ]; then \ git clone https://${GH_TOKEN}@github.com/Wargus/stratagus.wiki.git; mkdir -p stratagus.wiki/$TRAVIS_OS_NAME; cp $TRAVIS_BUILD_DIR/build/stratagus stratagus.wiki/$TRAVIS_OS_NAME/; rm -rf macdylibbundler; git clone https://github.com/auriamg/macdylibbundler; cd macdylibbundler; make; cd ..; macdylibbundler/dylibbundler -cd -of -b -x stratagus.wiki/$TRAVIS_OS_NAME/stratagus -d stratagus.wiki/libs/; cd stratagus.wiki/; git config --global user.email \"travis-ci@travis.org\"; git config --global user.name \"Travis CI\"; git add $TRAVIS_OS_NAME/stratagus; git add libs; git commit --amend -C HEAD; git push -fq origin master; cd ..; fi"