forked from DiligentGraphics/DiligentEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (90 loc) · 2.42 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
sudo: required
language: cpp
notifications:
email:
on_success: never
on_failure: always
env:
global:
- CMAKE_VERSION=3.13.2
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
tar -xzf cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
export PATH=$PWD/cmake-${CMAKE_VERSION}-Darwin-x86_64/CMake.app/Contents/bin:$PATH
cmake --version
fi
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Link gcc-7 and g++-7 to their standard commands
sudo ln -s /usr/bin/gcc-7 /usr/local/bin/gcc
sudo ln -s /usr/bin/g++-7 /usr/local/bin/g++
# Export CC and CXX to tell cmake which compiler to use
export CC=/usr/bin/gcc-7
export CXX=/usr/bin/g++-7
# Check versions of gcc, g++ and cmake
gcc -v
g++ -v
# Download a recent cmake
mkdir $HOME/usr
export PATH="$HOME/usr/bin:$PATH"
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh
chmod +x cmake-${CMAKE_VERSION}-Linux-x86_64.sh
./cmake-${CMAKE_VERSION}-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license
cmake --version
fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- cmake
matrix:
include:
- os: linux
compiler: gcc
env: CONFIG=Debug
- os: linux
compiler: gcc
env: CONFIG=Release
- os: osx
compiler: clang
env:
- CONFIG=Release
- IOS=false
- os: osx
compiler: clang
env:
- CONFIG=Debug
- IOS=false
- os: osx
compiler: clang
env:
- CONFIG=Release
- IOS=true
- os: osx
compiler: clang
env:
- CONFIG=Debug
- IOS=true
script:
# Run cmake
- mkdir cmk_build
- cd cmk_build
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
cmake .. -G "Unix Makefiles" -DENABLE_TESTS=TRUE -DCMAKE_BUILD_TYPE=${CONFIG}
cmake --build .
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$IOS" = "true" ]; then
cmake .. -DCMAKE_TOOLCHAIN_FILE=../DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR64 -DENABLE_TESTS=TRUE -G "Xcode"
else
cmake .. -DENABLE_TESTS=TRUE -G "Xcode"
fi
cmake --build . --config ${CONFIG}
fi