-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
102 lines (94 loc) · 2.83 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
language: cpp
matrix:
include:
- os: osx
osx_image: xcode11
compiler: clang
env: CONFIG=Debug
- os: osx
osx_image: xcode11
compiler: clang
env: CONFIG=Release
- os: linux
dist: bionic
compiler: gcc
env:
- CONFIG=Debug
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: "ppa:beineri/opt-qt-5.12.3-bionic"
packages:
- build-essential
- qt512-meta-full
- libgl1-mesa-dev
- os: linux
dist: bionic
compiler: gcc
env:
- CONFIG=Release
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: "ppa:beineri/opt-qt-5.12.3-bionic"
packages:
- build-essential
- qt512-meta-full
- libgl1-mesa-dev
install:
# - set
- cmake --version
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
alias python=python3
sudo pip install conan
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install conan
brew install qt5
brew link --force qt5
fi
- conan --version
- conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
- conan remote add owl https://api.bintray.com/conan/zethon/owl
script:
- JOBS=2
- mkdir build
- cd build
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
source /opt/qt512/bin/qt512-env.sh;
fi
- conan install .. --build missing -s compiler.cppstd=17 -s build_type=${CONFIG}
- cmake .. -DCMAKE_BUILD_TYPE=${CONFIG} -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 -DBUILD_GUI=ON -DBUILD_CONSOLE=ON -DBUILD_TEST=ON
- cmake --build . --config "${CONFIG}"
- ctest -VV -C ${CONFIG} --schedule-random --output-on-failure
after_success:
# build release packages on every branch
- |
if [ "$CONFIG" == "Release" ]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cpack -G DEB --config Owl.CPackConfig.cmake
cpack -G DEB --config OwlConsole.CPackConfig.cmake
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cpack -G Bundle --config Owl.CPackConfig.cmake
cpack -G Bundle --config OwlConsole.CPackConfig.cmake
fi
fi
# only deploy master branch packages
# For now, disable deployment of artifacts for Ubuntu.
# See: https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci
- |
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$CONFIG" == "Release" ]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
find . -maxdepth 1 -name "*.dmg" -exec curl -T "{}" ftp://ftp.owlclient.com/public_html/artifacts/build/ --user "${SFTP_USER}:${SFTP_PASSWORD}" --ftp-create-dirs --insecure \;
fi
fi
notifactions:
email:
recipients:
on_success: never
on_failure: always