-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.yml
95 lines (82 loc) · 2.49 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
sudo: required
language: c++
dist: bionic
addons:
apt:
packages:
- libxinerama-dev
- libxcursor-dev
- xorg-dev
- libglew-dev
os:
- linux
# - windows
compiler:
- gcc
# - clang
env:
# - TARGET_CPU=amd64 BUILD_CONFIGURATION=Debug
- TARGET_CPU=amd64 BUILD_CONFIGURATION=Release
# - TARGET_CPU=x86 BUILD_CONFIGURATION=Debug
# - TARGET_CPU=x86 BUILD_CONFIGURATION=Release
jobs:
include:
#Compile for desktop app
- name: "Desktop app"
install:
- if [ "$CXX" = "g++" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export CXX="g++-9" CC="gcc-9";
else
export CXX="g++-10" CC="gcc-10";
fi;
fi
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -q update
- sudo apt-get -y install gcc-10
- sudo apt-get -y install g++-10
- gcc-10 -v
- g++-10 -v
script:
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION -DTARGET_CPU=$TARGET_CPU
- cmake --build . --target AWebWoWViewerCpp
#Compile for emscripten
- name: "Emscripten version"
install:
- sudo mkdir /opt/cmake
- CMAKE_INSTALLER=install-cmake.sh
- curl -sSL https://cmake.org/files/v3.18/cmake-3.18.2-Linux-x86_64.sh -o ${CMAKE_INSTALLER}
- chmod +x ${CMAKE_INSTALLER}
- sudo ./${CMAKE_INSTALLER} --prefix=/opt/cmake --skip-license
- /opt/cmake/bin/cmake --version
- git clone https://github.com/emscripten-core/emsdk.git
- cd emsdk
- git pull
- ./emsdk install latest
- ./emsdk activate latest
- source ./emsdk_env.sh
- cd ..
# # Download and install latest cmake
# - |
# if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
# CMAKE_URL="http://www.cmake.org/files/v3.18/cmake-3.18.2-Linux-x86_64.tar.gz"
# mkdir -p ${DEPS_DIR}/cmake
# travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}/cmake
# export PATH=${DEPS_DIR}/cmake/bin:${PATH}
# fi
script:
- mkdir build
- cd build
- emcmake /opt/cmake/bin/cmake ../emscripten_port -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION
- emmake make project
before_script:
- sudo rm /usr/bin/python
- sudo cp /usr/bin/python3 /usr/bin/python
git:
submodules: true
branches:
only:
- master