forked from apitrace/apitrace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (81 loc) · 3.02 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
branches:
except:
- /^appveyor.*$/
sudo: required
language: generic
env:
global:
- MAKEFLAGS=-j2
matrix:
include:
- os: linux
dist: bionic
env:
- LABEL="ubuntu64"
- APT_PACKAGES="gcc g++ libdwarf-dev libprocps-dev qtbase5-dev qtdeclarative5-dev"
- CMAKE_OPTIONS="-DPython3_EXECUTABLE=/usr/bin/python3 -DENABLE_GUI=1"
- os: linux
dist: bionic
env:
- LABEL="ubuntu32"
- APT_PACKAGES="linux-libc-dev gcc-multilib gcc-multilib g++-multilib"
- CMAKE_OPTIONS="-DPython3_EXECUTABLE=/usr/bin/python3 -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib32 -DENABLE_GUI=0"
- os: linux
dist: bionic
env:
- LABEL="ubuntu64-clang"
- APT_PACKAGES="build-essential clang libc++-dev libc++abi-dev libdwarf-dev libprocps-dev qtbase5-dev qtdeclarative5-dev"
- CMAKE_OPTIONS="-DPython3_EXECUTABLE=/usr/bin/python3 -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DENABLE_GUI=1"
- os: linux
dist: bionic
env:
- LABEL="mingw32"
- APT_PACKAGES="g++-mingw-w64-i686"
- MINGW_PREFIX=i686-w64-mingw32
- CMAKE_OPTIONS="-DPython3_EXECUTABLE=/usr/bin/python3 -DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake -Cdxsdk-master/Cache-mingw32.cmake -DENABLE_GUI=0"
- os: linux
dist: bionic
services:
- docker
env:
- LABEL="centos6"
- DOCKER_IMAGE=jrfonseca/centos6
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_STATIC_LIBGCC=ON -DENABLE_STATIC_LIBSTDCXX=ON -DENABLE_STATIC_EXE=ON -DENABLE_GUI=OFF"
- os: osx
osx_image: xcode11.2
env:
- LABEL="mac64"
- CMAKE_OPTIONS="-DENABLE_GUI=1"
before_install:
- |
if [ "$APT_PACKAGES" ]
then
sudo apt-get update -qq
sudo apt-get install -qq -y $APT_PACKAGES
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install qt5; export CMAKE_PREFIX_PATH=$(brew --prefix qt5); fi
- cmake --version
- |
if [ "$MINGW_PREFIX" ]
then
echo "set (CMAKE_SYSTEM_NAME Windows)" >> Toolchain.cmake
echo "set (CMAKE_C_COMPILER $MINGW_PREFIX-gcc)" >> Toolchain.cmake
echo "set (CMAKE_CXX_COMPILER $MINGW_PREFIX-g++)" >> Toolchain.cmake
echo "set (CMAKE_RC_COMPILER $MINGW_PREFIX-windres)" >> Toolchain.cmake
echo "set (CMAKE_FIND_ROOT_PATH /usr/$MINGW_PREFIX)" >> Toolchain.cmake
echo "set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> Toolchain.cmake
echo "set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> Toolchain.cmake
echo "set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> Toolchain.cmake
wget -q -O - https://github.com/apitrace/dxsdk/archive/master.tar.gz | tar -xz
fi
- |
if [ "$DOCKER_IMAGE" ]
then
docker pull "$DOCKER_IMAGE"
export DOCKER_RUN="docker run -v $PWD:$PWD -u $UID $DOCKER_IMAGE"
fi
script:
- $DOCKER_RUN cmake -H$PWD -B$PWD/build $CMAKE_OPTIONS
- $DOCKER_RUN cmake --build $PWD/build --use-stderr -- -k
- $DOCKER_RUN cmake --build $PWD/build --use-stderr --target check -- -k
- $DOCKER_RUN cmake --build $PWD/build --use-stderr --target package -- -k