diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e75d1e1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,91 @@ +language: c++ + +branches: + except: + - automatic + +cache: + directories: + - download + +matrix: + include: + - os: linux + sudo: required + env: + - _BUILD=win32 + install: + - docker pull jpcima/arch-mingw + - container=$(docker run -d -i -t -v /home:/home jpcima/arch-mingw /bin/bash) + - | + cross() { + docker exec -w "$(pwd)" -i -t "$container" "$@" + } + script: + - mkdir release + - mkdir build + - cd build + - cross i686-w64-mingw32-cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=ON .. + - cross make -j + - cross cpack -G ZIP + - cp FreeMajor-*.zip ../release/ + - os: linux + sudo: required + env: + - _BUILD=win64 + install: + - docker pull jpcima/arch-mingw + - container=$(docker run -d -i -t -v /home:/home jpcima/arch-mingw /bin/bash) + - | + cross() { + docker exec -w "$(pwd)" -i -t "$container" "$@" + } + script: + - mkdir release + - mkdir build + - cd build + - cross x86_64-w64-mingw32-cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=ON .. + - cross make -j + - cross cpack -G ZIP + - cp FreeMajor-*.zip ../release/ + - os: linux + sudo: required + env: + - _BUILD=macos + install: + - docker pull jpcima/osxcross-10.6 + - container=$(docker run -d -i -t -v /home:/home jpcima/osxcross-10.6 /bin/bash) + - | + cross() { + docker exec -w "$(pwd)" -e 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/osxcross/target/bin' -e 'MACOSX_DEPLOYMENT_TARGET=10.7' -i -t "$container" "$@" + } + script: + - mkdir release + - mkdir build + - cd build + - cross x86_64-apple-darwin15-cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=ON .. + - cross make -j + - cross cpack -G ZIP + - cp FreeMajor-*.zip ../release/ + +before_deploy: + - | + if test "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false"; then + export TRAVIS_TAG=automatic + git tag -f "$TRAVIS_TAG" + fi + +deploy: + provider: releases + api_key: "$GITHUB_TOKEN" + file: release/* + file_glob: true + skip_cleanup: true + prerelease: true + overwrite: true + on: + branch: master + +env: + global: + secure: FienNdSG/JYHRJKvATWgOxY41zZck+q/xTDv3hMOU5DsznT4H14PHfWfYUqEttD7wawtuEJFqj4IX/ESpczcVVNNzk+vER4NXTTIdkFOu+zD8ayqU/hEiISWqykgeNt0aFvbmbahUOQC4/FvRo4svekgHkEMOOBGxdPC2mY61i1aBZUXGEd0hi2K/fj4Rfg+j7SSvOoIRs0q1qGKYn2yzY4mX9UimDAenjHW9qQLnH1JPYyU18Aisvrh8vtx4+h8xRSSNroMUXprvIR3rS7JpO+2x77lj/+6yf2RSOSfePE6Czv1TOll4n2tpia0FlYkiMIZAAO6bOVwbe35MXn0pn9Te1/NCpts3RwN4SsQMaNX2uk7E0xMGQs1aIeBVBiYhj3H9xVWR3qQ7s/KkjaIDD01GHwRxNaapFWl0BFYvkikvzlJ2C2I5ZUJU/pL+ZLTbph7+gPSxTX16pftUagjy3ABOMNBUHnbz8tc4NYr2jp1m1mprBd88MjS39DMksO9PO+adKnWeb75X4kMQ1E7x7jaOfIuAAwk2t/JnTWZfTC73MKlLPHgPMASy3WUp22xEa5ElRo3jNWvCS0IatSPJbqSKIuM1TkDlGu18w/hu8bQiFuyiKjA0u4kxrx4rc5SP0fxRWMy3YDoyeT7D5irotD5m1Xbu7fC4wHR0JfaCWY=