forked from robotology/ycm-cmake-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
137 lines (113 loc) · 3.99 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
sudo: required
language: generic
dist: bionic
os:
- linux
- osx
env:
global:
- CTEST_OUTPUT_ON_FAILURE=1
- TRAVIS_BUILD_TYPE=Release
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- TRAVIS_TEST_TARGET="test"
- TRAVIS_INSTALL_TARGET="install"
branches:
except:
- gh-pages
- appveyor
before_script:
- if [ "${TRAVIS_CMAKE_GENERATOR}" = "Xcode" ]; then export TRAVIS_TEST_TARGET="RUN_TESTS"; fi
- cmake -H. -Bbuild -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=$(pwd)/../install -DYCM_MAINTAINER_MODE=ON
script:
- cmake --build build --config ${TRAVIS_BUILD_TYPE}
- cmake --build build --config ${TRAVIS_BUILD_TYPE} --target ${TRAVIS_TEST_TARGET}
- cmake --build build --config ${TRAVIS_BUILD_TYPE} --target ${TRAVIS_INSTALL_TARGET}
.cmake_template_definition: &cmake_template
os: linux
dist: bionic
language: generic
services:
- docker
before_install:
- docker pull drdanz/cmake:cmake-${TRAVIS_CMAKE_VERSION}
- >-
docker run -it -d \
-v $TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR \
-v $HOME/.ccache:$HOME/.ccache \
-w $TRAVIS_BUILD_DIR \
-e CTEST_OUTPUT_ON_FAILURE \
--name ycm-builder \
drdanz/cmake:cmake-${TRAVIS_CMAKE_VERSION}
- docker exec -it ycm-builder cmake --version
install: skip
before_script:
- docker exec -it ycm-builder cmake -H. -Bbuild -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=$(pwd)/../install -DYCM_MAINTAINER_MODE=ON
script:
- docker exec -it ycm-builder cmake --build build --config ${TRAVIS_BUILD_TYPE}
- docker exec -it ycm-builder cmake --build build --config ${TRAVIS_BUILD_TYPE} --target ${TRAVIS_TEST_TARGET}
- docker exec -it ycm-builder cmake --build build --config ${TRAVIS_BUILD_TYPE} --target ${TRAVIS_INSTALL_TARGET}
after_success: skip
matrix:
include:
- os: osx
env: TRAVIS_CMAKE_GENERATOR="Xcode"
- name: "Configure using CMake 3.16 (Unix Makefiles)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.16"
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- name: "Configure using CMake 3.16 (Ninja)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.16"
- TRAVIS_CMAKE_GENERATOR="Ninja"
- name: "Configure using CMake 3.17 (Unix Makefiles)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.17"
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- name: "Configure using CMake 3.17 (Ninja)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.17"
- TRAVIS_CMAKE_GENERATOR="Ninja"
- name: "Configure using CMake 3.18 (Unix Makefiles)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.18"
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- name: "Configure using CMake 3.18 (Ninja)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.18"
- TRAVIS_CMAKE_GENERATOR="Ninja"
- name: "Configure using CMake 3.19 (Unix Makefiles)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.19"
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- name: "Configure using CMake 3.19 (Ninja)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.19"
- TRAVIS_CMAKE_GENERATOR="Ninja"
- name: "Configure using CMake 3.20 (Unix Makefiles)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.20"
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- name: "Configure using CMake 3.20 (Ninja)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.20"
- TRAVIS_CMAKE_GENERATOR="Ninja"
- name: "Configure using CMake 3.21 (Unix Makefiles)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.21"
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- name: "Configure using CMake 3.21 (Ninja)"
<<: *cmake_template
env:
- TRAVIS_CMAKE_VERSION="3.21"
- TRAVIS_CMAKE_GENERATOR="Ninja"