forked from fnc12/sqlite_orm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
114 lines (104 loc) · 2.69 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
# Defaults
os: linux
dist: xenial
matrix:
include:
- name: "GCC-9"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- ninja-build
env:
- CC: gcc-9
- CXX: g++-9
- name: "GCC-7"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- ninja-build
env:
- CC: gcc-7
- CXX: g++-7
- name: "LLVM/Clang (Travis default)"
language: cpp
compiler: clang
addons:
apt:
packages:
- ninja-build
env:
- SQLITE_ORM_OMITS_CODECVT: ON
- name: AppleClang-10.0.1
os: osx
osx_image: xcode10.2
language: cpp
env:
- SQLITE_ORM_OMITS_CODECVT: ON
addons:
homebrew:
packages:
- catch2
- ninja
update: true
- name: "LLVM/Clang (latest)"
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- llvm
- catch2
- ninja
update: true
env:
- CPPFLAGS: "-I/usr/local/opt/llvm/include"
- LDFLAGS: "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
- CPATH: /usr/local/opt/llvm/include
- LIBRARY_PATH: /usr/local/opt/llvm/lib
- LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
- CC: /usr/local/opt/llvm/bin/clang
- CXX: /usr/local/opt/llvm/bin/clang++
- SQLITE_ORM_OMITS_CODECVT: ON
- name: "GCC-6"
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- gcc@6
- catch2
- ninja
update: true
env:
- CC: gcc-6
- CXX: g++-6
before_install:
- |
if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" # Use coreutils from homebrew.
fi
install:
- |
# Catch2 test framework
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
git clone --depth=1 --quiet https://github.com/catchorg/Catch2.git
cd Catch2
cmake -Bbuild -H. -DBUILD_TESTING=OFF
sudo env "PATH=$PATH" cmake --build ./build --target install
fi
# scripts to run before build
before_script:
- if [[ "$CXX" == *"clang"* ]]; then clang --version ; fi
- cd ${TRAVIS_BUILD_DIR}
- mkdir compile && cd compile
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DSQLITE_ORM_OMITS_CODECVT="${SQLITE_ORM_OMITS_CODECVT:OFF}" ..
# build examples, and run tests (ie make & make test)
script:
- cmake --build . --config Debug -- -k 10
- ctest --verbose --output-on-failure -C Debug -j $(nproc)