-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
79 lines (72 loc) · 2.44 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
language: cpp
git:
depth: false
cache:
directories:
- "$HOME/vcpkg"
- "$HOME/Downloads"
matrix:
include:
- os: linux
sudo: true
env:
- VCPKG_TRIPLET="x64-linux"
- MATRIX_EVAL="export CC=gcc-8 && export CXX=g++-8"
- VCPKG_BOOT_EVAL="./bootstrap-vcpkg.sh -disableMetrics"
- SYSTEM_TRIPLET="linux"
- PREFERRED_ARCHIVE_EXTENSION="tar.gz"
- LIBOFFKV_CMAKE_FLAGS=""
- BADGE=linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- cmake
- os: osx
osx_image: xcode10.2
env:
- MATRIX_EVAL="brew install gcc@7"
- OSX_ENABLE_GCC="CC=gcc-7 && CXX=g++-7"
- OSX_ENABLE_CLANG="CC=clang && CXX=clang++"
- VCPKG_BOOT_EVAL="./bootstrap-vcpkg.sh -disableMetrics"
- SYSTEM_TRIPLET="darwin"
- PREFERRED_ARCHIVE_EXTENSION="zip"
- LIBOFFKV_CMAKE_FLAGS=""
- BADGE=osx
sudo: true
# - os: windows
# env:
# - VCPKG_TRIPLET=x64-windows
# - VCPKG_BOOT_EVAL="./bootstrap-vcpkg.bat"
# - SYSTEM_TRIPLET=windows
# - PREFERRED_ARCHIVE_EXTENSION=zip
before_install:
- eval "$MATRIX_EVAL"
- eval "$OSX_ENABLE_GCC"
before_script:
- set +x
- curl -sL https://github.com/offscale/kv-travis-scripts/archive/master.zip | jar xv
- mv kv-travis-scripts-master "$HOME/scripts"
- pushd "$HOME/scripts"
- chmod +x *.bash
- ./prepare_vcpkg.bash "$HOME/vcpkg/" "$VCPKG_BOOT_EVAL"
- ./bootstrap_etcd.bash "$SYSTEM_TRIPLET" "$PREFERRED_ARCHIVE_EXTENSION"
- ./bootstrap_consul.bash "$SYSTEM_TRIPLET"
- ./bootstrap_zk.bash
- pushd "$HOME/vcpkg"
- travis_wait 30 ./vcpkg upgrade --no-dry-run
- eval "$OSX_ENABLE_CLANG"
- travis_wait 25 ./vcpkg install gtest || "$HOME/scripts/export_vcpkg_logs.bash"
- travis_wait 34 ./vcpkg install ppconsul || "$HOME/scripts/export_vcpkg_logs.bash"
- travis_wait 25 ./vcpkg install zkpp || "$HOME/scripts/export_vcpkg_logs.bash"
- travis_wait 35 ./vcpkg install offscale-libetcd-cpp || "$HOME/scripts/export_vcpkg_logs.bash"
- rm -rf buildtrees
script:
- mkdir "$TRAVIS_BUILD_DIR/cmake-build-debug" && pushd "$_"
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake" -DBUILD_TESTS=ON "${LIBOFFKV_CMAKE_FLAGS}" ..
- cmake --build .
- ctest --verbose
after_failure:
- "$HOME/scripts/send_status_message.bash"