forked from MarkCallow/KTX-Software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (111 loc) · 3.76 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# CI build script for Travis.
# See https://docs.travis-ci.com/user/multi-os/ for more info.
os:
- linux
- osx
sudo: required
dist: trusty
osx_image: xcode7.3
language:
- cpp
compiler:
# clang compilation will be tested by xcode.
#- clang
- gcc
# whitelist
branches:
only:
- master
- incoming
- noglcontext
env:
global:
- GIT_LFS_VERSION="1.1.0"
before_install:
- |
case "${TRAVIS_OS_NAME:-linux}" in
linux)
# The already installed GIT LFS is very old - 0.5.0. Need a more recent
# one to work with the GitHub server.
# Current directory is .../build/KhronosGroup/KTX. cd to 'build'.
pushd ../.. &&
wget https://github.com/github/git-lfs/releases/download/v$GIT_LFS_VERSION/git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz &&
tar -zxvf git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz &&
export PATH=`pwd`/git-lfs-1.1.0:$PATH &&
popd &&
git lfs install &&
git lfs pull --include="other_lib/linux"
;;
osx)
brew update > /dev/null &&
brew install git-lfs &&
git lfs install &&
git lfs version
;;
esac
install:
- |
case "${TRAVIS_OS_NAME:-linux}" in
linux)
sudo apt-get -qq update; sudo apt-get -qq install doxygen
;;
osx)
brew install doxygen
;;
esac
- pushd ../..
- git clone https://github.com/msc-/gyp
- cd gyp && sudo ./setup.py install && cd ..
- popd
before_script:
- |
# Pull just the linux or mac/ios files to save time.
case "${TRAVIS_OS_NAME:-linux}" in
linux)
# The "| cat" avoids a Go panic when LFS can't get the "terminal" width.
# See Git LFS issue https://github.com/github/git-lfs/issues/880.
git lfs pull --include=other_lib/linux | cat
;;
osx)
git lfs pull --include=other_lib/mac,other_lib/ios | cat &&
sudo cp -r other_lib/mac/Release/SDL2.framework /Library/Frameworks
;;
esac
script:
- |
case "${TRAVIS_OS_NAME:-linux}" in
linux)
cd build/make/linux &&
make BUILDTYPE=Debug &&
make BUILDTYPE=Release &&
cd ../../cmake/linux/Debug &&
cmake . && make &&
cd ../Release &&
cmake . && make
;;
osx)
# Due to the spaces in the platform names, must use array variables so
# destination args can be expanded to a single word.
OSX_XCODE_OPTIONS=(-alltargets -destination "platform=OS X,arch=x86_64" -destination "platform=OS X,arch=i386")
IOS_XCODE_OPTIONS=(-alltargets -destination "platform=generic/iOS" -destination "platform=iOS Simulator,OS=latest")
XCODE_CODESIGN_ENV='CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO'
# The following and more is needed if you want to actually sign the code.
# See http://stackoverflow.com/questions/27671854/travis-ci-fails-to-build-with-a-code-signing-error.
#KEY_CHAIN=xcode-build.keychain
#security create-keychain -p travis $KEY_CHAIN
# Make the keychain the default so identities are found
#security default-keychain -s $KEY_CHAIN
## Unlock the keychain
#security unlock-keychain -p travis $KEY_CHAIN
## Set keychain locking timeout to 3600 seconds
#security set-keychain-settings -t 3600 -u $KEY_CHAIN
cd build/xcode/mac &&
xcodebuild -project ktxtests.xcodeproj "${OSX_XCODE_OPTIONS[@]}" -configuration Debug $XCODE_CODESIGN_ENV &&
xcodebuild -project ktxtests.xcodeproj "${OSX_XCODE_OPTIONS[@]}" -configuration Release $XCODE_CODESIGN_ENV &&
xcodebuild -project ktxtools.xcodeproj "${OSX_XCODE_OPTIONS[@]}" -configuration Debug $XCODE_CODESIGN_ENV &&
xcodebuild -project ktxtools.xcodeproj "${OSX_XCODE_OPTIONS[@]}" -configuration Release $XCODE_CODESIGN_ENV &&
cd ../ios &&
xcodebuild -project ktxtests.xcodeproj "${IOS_XCODE_OPTIONS[@]}" -configuration Debug $XCODE_CODESIGN_ENV &&
xcodebuild -project ktxtests.xcodeproj "${IOS_XCODE_OPTIONS[@]}" -configuration Release $XCODE_CODESIGN_ENV
;;
esac