mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Use ninja for building on Travis
This commit is contained in:
parent
8a47308786
commit
34fab632e6
2 changed files with 13 additions and 13 deletions
16
.travis.yml
16
.travis.yml
|
@ -7,7 +7,7 @@ before_install:
|
||||||
echo "This build will get pushed!" ; echo "tag = ${TRAVIS_TAG}" ; echo "branch = ${TRAVIS_BRANCH}" ;
|
echo "This build will get pushed!" ; echo "tag = ${TRAVIS_TAG}" ; echo "branch = ${TRAVIS_BRANCH}" ;
|
||||||
fi
|
fi
|
||||||
- if [[ $TRAVIS_REPO_SLUG == "OpenRCT2/OpenRCT2" ]] && [[ $TRAVIS_PULL_REQUEST != "false" ]] && [[ $TRAVIS_BRANCH == "master" ]]; then echo "Pull requests to master branch are not allowed!" ; exit 1 ; fi
|
- if [[ $TRAVIS_REPO_SLUG == "OpenRCT2/OpenRCT2" ]] && [[ $TRAVIS_PULL_REQUEST != "false" ]] && [[ $TRAVIS_BRANCH == "master" ]]; then echo "Pull requests to master branch are not allowed!" ; exit 1 ; fi
|
||||||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/install.sh; export OPENRCT_MAKE_OPTS="-j2 -k all openrct2-cli" ; fi
|
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/install.sh; export OPENRCT_MAKE_OPTS="-k 10 all openrct2-cli" ; fi
|
||||||
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then sudo gem install xcpretty-travis-formatter; fi
|
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then sudo gem install xcpretty-travis-formatter; fi
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
@ -22,7 +22,7 @@ matrix:
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
env:
|
env:
|
||||||
- OPENRCT2_CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DPORTABLE=ON -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_amd64
|
- OPENRCT2_CMAKE_OPTS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DPORTABLE=ON -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_amd64
|
||||||
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
||||||
after_success:
|
after_success:
|
||||||
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
||||||
|
@ -45,7 +45,7 @@ matrix:
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
env:
|
env:
|
||||||
- OPENRCT2_CMAKE_OPTS="-DFORCE32=ON -DDISABLE_RCT2=OFF -DBUILD_SHARED_LIBS=off -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_i686
|
- OPENRCT2_CMAKE_OPTS="-G Ninja -DFORCE32=ON -DDISABLE_RCT2=OFF -DBUILD_SHARED_LIBS=off -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_i686
|
||||||
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
||||||
after_success:
|
after_success:
|
||||||
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
||||||
|
@ -65,19 +65,19 @@ matrix:
|
||||||
else curl --progress-bar --upload-file openrct2-linux.tar.gz https://transfer.sh/openrct2-linux-i686.tar.gz -o link && cat link;
|
else curl --progress-bar --upload-file openrct2-linux.tar.gz https://transfer.sh/openrct2-linux-i686.tar.gz -o link && cat link;
|
||||||
fi
|
fi
|
||||||
- os: linux
|
- os: linux
|
||||||
env: OPENRCT2_CMAKE_OPTS="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_amd64
|
env: OPENRCT2_CMAKE_OPTS="-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_amd64
|
||||||
- os: linux
|
- os: linux
|
||||||
env: OPENRCT2_CMAKE_OPTS="-DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DFORCE32=on -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=windows
|
env: OPENRCT2_CMAKE_OPTS="-G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DFORCE32=on -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=windows
|
||||||
- os: linux
|
- os: linux
|
||||||
env: TARGET=docker64 OPENRCT2_CMAKE_OPTS="-DDISABLE_TTF=ON -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on"
|
env: TARGET=docker64 OPENRCT2_CMAKE_OPTS="-G Ninja -DDISABLE_TTF=ON -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on"
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
- os: linux
|
- os: linux
|
||||||
env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=docker64
|
env: OPENRCT2_CMAKE_OPTS="-G Ninja -DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=docker64
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
- os: linux
|
- os: linux
|
||||||
env: OPENRCT2_CMAKE_OPTS="-DDISABLE_OPENGL=ON -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=docker64
|
env: OPENRCT2_CMAKE_OPTS="-G Ninja -DDISABLE_OPENGL=ON -DBUILD_SHARED_LIBS=ON -DDISABLE_RCT2_TESTS=on" TARGET=docker64
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
- os: osx
|
- os: osx
|
||||||
|
|
|
@ -27,28 +27,28 @@ pushd build
|
||||||
chmod a+rwx "$(pwd)"
|
chmod a+rwx "$(pwd)"
|
||||||
chmod g+s "$(pwd)"
|
chmod g+s "$(pwd)"
|
||||||
# CMAKE and MAKE opts from environment
|
# CMAKE and MAKE opts from environment
|
||||||
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:64bit-only bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\""
|
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:64bit-only bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT_MAKE_OPTS && ninja test ARGS=\"-V\""
|
||||||
elif [[ $TARGET == "ubuntu_i686" ]]
|
elif [[ $TARGET == "ubuntu_i686" ]]
|
||||||
then
|
then
|
||||||
PARENT=$(readlink -f ../)
|
PARENT=$(readlink -f ../)
|
||||||
chmod a+rwx "$(pwd)"
|
chmod a+rwx "$(pwd)"
|
||||||
chmod g+s "$(pwd)"
|
chmod g+s "$(pwd)"
|
||||||
# CMAKE and MAKE opts from environment
|
# CMAKE and MAKE opts from environment
|
||||||
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_i686 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make all testpaint install $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\" && ( ./testpaint --quiet || if [[ \$? -eq 1 ]] ; then echo Allowing failed tests to pass ; else echo here ; false; fi )"
|
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_i686 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja all testpaint install $OPENRCT_MAKE_OPTS && ninja test ARGS=\"-V\" && ( ./testpaint --quiet || if [[ \$? -eq 1 ]] ; then echo Allowing failed tests to pass ; else echo here ; false; fi )"
|
||||||
elif [[ $TARGET == "ubuntu_amd64" ]]
|
elif [[ $TARGET == "ubuntu_amd64" ]]
|
||||||
then
|
then
|
||||||
PARENT=$(readlink -f ../)
|
PARENT=$(readlink -f ../)
|
||||||
chmod a+rwx "$(pwd)"
|
chmod a+rwx "$(pwd)"
|
||||||
chmod g+s "$(pwd)"
|
chmod g+s "$(pwd)"
|
||||||
# CMAKE and MAKE opts from environment
|
# CMAKE and MAKE opts from environment
|
||||||
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_amd64 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS install && make test ARGS=\"-V\""
|
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_amd64 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT_MAKE_OPTS install && ninja test ARGS=\"-V\""
|
||||||
elif [[ $TARGET == "windows" ]]
|
elif [[ $TARGET == "windows" ]]
|
||||||
then
|
then
|
||||||
PARENT=$(readlink -f ../)
|
PARENT=$(readlink -f ../)
|
||||||
chmod a+rwx "$(pwd)"
|
chmod a+rwx "$(pwd)"
|
||||||
chmod g+s "$(pwd)"
|
chmod g+s "$(pwd)"
|
||||||
# CMAKE and MAKE opts from environment
|
# CMAKE and MAKE opts from environment
|
||||||
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:mingw-arch bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS"
|
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:mingw-arch bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT_MAKE_OPTS"
|
||||||
else
|
else
|
||||||
echo "Unkown target $TARGET"
|
echo "Unkown target $TARGET"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -74,7 +74,7 @@ fi
|
||||||
if [[ -z "$DISABLE_G2_BUILD" ]]; then
|
if [[ -z "$DISABLE_G2_BUILD" ]]; then
|
||||||
echo Building: g2.dat
|
echo Building: g2.dat
|
||||||
pushd build
|
pushd build
|
||||||
make g2
|
ninja g2
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue