1
0
Fork 0

Travis CI: add clang and osx

Extend builds to clang and osx platforms.

And check bench numbers.

No functional change.
pull/446/head
Marco Costalba 2015-10-06 11:59:06 +02:00
parent 436c303731
commit 5f4d9309c8
2 changed files with 36 additions and 10 deletions

View File

@ -1,14 +1,32 @@
language: cpp
compiler: g++
sudo: required
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.8']
env:
- COMPILER=g++-4.8
- COMP=gcc
install:
- sudo apt-get install -qq g++-4.8
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages: ['clang-3.7']
env:
- COMPILER=clang++-3.7
- COMP=clang
- os: osx
compiler: clang
env:
- COMPILER=clang++ V='Apple LLVM 6.0' # Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
- COMP=clang
branches:
only:
@ -18,5 +36,8 @@ before_script:
- cd src
script:
- make clean && make build ARCH=x86-64 COMP=gcc && ./stockfish bench 2>&1 >/dev/null | grep 'Nodes searched'
- make clean && make build ARCH=x86-32 COMP=gcc && ./stockfish bench 2>&1 >/dev/null | grep 'Nodes searched'
- make clean && make build ARCH=x86-64 && ./stockfish bench 2>&1 >/dev/null | grep 'Nodes searched' | tee bench1
- make clean && make build ARCH=x86-32 && ./stockfish bench 2>&1 >/dev/null | grep 'Nodes searched' | tee bench2
- echo "Checking for same bench numbers..."
- diff bench1 bench2 > result
- test ! -s result

View File

@ -197,6 +197,11 @@ ifeq ($(UNAME),Darwin)
LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9
endif
### Travis CI script uses COMPILER to overwrite CXX
ifdef COMPILER
CXX=$(COMPILER)
endif
### On mingw use Windows threads, otherwise POSIX
ifneq ($(comp),mingw)
# On Android Bionic's C library comes with its own pthread implementation bundled in