TravisCI: Add osx builds
This commit is contained in:
parent
0bacda3269
commit
4dce6a59aa
16
.travis.yml
16
.travis.yml
@ -1,10 +1,19 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
- clang
|
- clang
|
||||||
- gcc
|
- gcc
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
exclude:
|
||||||
|
- os: osx
|
||||||
|
compiler: gcc
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
@ -13,6 +22,13 @@ addons:
|
|||||||
- g++-4.8
|
- g++-4.8
|
||||||
- gdb
|
- gdb
|
||||||
|
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||||
|
brew update;
|
||||||
|
brew install gdb;
|
||||||
|
fi
|
||||||
|
|
||||||
script: ./CIbuild.sh
|
script: ./CIbuild.sh
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
14
CIbuild.sh
14
CIbuild.sh
@ -14,17 +14,25 @@ fi
|
|||||||
cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1;
|
cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1;
|
||||||
|
|
||||||
echo "Building..."
|
echo "Building..."
|
||||||
make -j 2;
|
cmake --build . -- -j 2;
|
||||||
make -j 2 test ARGS="-V";
|
ctest -j 2 -V;
|
||||||
|
|
||||||
# Create .gdbinit in home directory. Switches off the confirmation on quit
|
# Create .gdbinit in home directory. Switches off the confirmation on quit
|
||||||
echo -e "define hook-quit\n\tset confirm off\nend\n" > ~/.gdbinit
|
echo -e "define hook-quit\n\tset confirm off\nend\n" > ~/.gdbinit
|
||||||
|
|
||||||
echo "Testing..."
|
echo "Testing..."
|
||||||
|
|
||||||
|
# OSX builds need sudo because gdb isn't signed
|
||||||
|
if [ "$TRAVIS_OS_NAME" = osx ]; then
|
||||||
|
GDB_COMMAND="sudo gdb"
|
||||||
|
else
|
||||||
|
GDB_COMMAND="gdb"
|
||||||
|
fi
|
||||||
|
|
||||||
cd Server/;
|
cd Server/;
|
||||||
touch apiCheckFailed.flag
|
touch apiCheckFailed.flag
|
||||||
if [ "$TRAVIS_CUBERITE_BUILD_TYPE" != "COVERAGE" ]; then
|
if [ "$TRAVIS_CUBERITE_BUILD_TYPE" != "COVERAGE" ]; then
|
||||||
gdb -return-child-result -ex run -ex "bt" -ex "info threads" -ex "thread apply all bt" -ex "quit" --args $CUBERITE_PATH << EOF
|
${GDB_COMMAND} -return-child-result -ex run -ex "bt" -ex "info threads" -ex "thread apply all bt" -ex "quit" --args $CUBERITE_PATH << EOF
|
||||||
load APIDump
|
load APIDump
|
||||||
apicheck
|
apicheck
|
||||||
restart
|
restart
|
||||||
|
Loading…
Reference in New Issue
Block a user