-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
78 lines (67 loc) · 1.68 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
sudo: required
services:
- docker
osx_image: xcode10.1
language: cpp
compiler: gcc
cache:
directories:
- ${HOME}/.ccache
- ${HOME}/vcpkg
- ${HOME}/Library/Caches/Homebrew
addons:
homebrew:
packages:
- cmake
- ccache
- gcc@7
install:
- |
if [ $TRAVIS_OS_NAME == osx ]; then
export CXX=g++-7;
export CC=gcc-7;
VCPKG_FOUND=`find ${HOME}/vcpkg | wc -l`
if [ ${VCPKG_FOUND} -lt 2 ]; then
echo "vcpkg not found, installing...";
cd ${HOME};
git clone https://github.com/cpp-ipfs/vcpkg.git;
cd ${HOME}/vcpkg;
./bootstrap-vcpkg.sh;
./vcpkg integrate install;
./vcpkg install gtest cryptopp ms-gsl varint;
fi;
echo "Using existing vcpkg installation at ${HOME}/vcpkg";
cd ${HOME}/vcpkg;
git pull origin master;
./vcpkg upgrade;
fi
script:
- |
if [ $TRAVIS_OS_NAME == osx ]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH";
env;
cd ${HOME};
mkdir build;
cd build;
export TOOLCHAIN_FILE=${HOME}/vcpkg/scripts/buildsystems/vcpkg.cmake;
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} ${TRAVIS_BUILD_DIR}
make;
make test;
fi
- |
if [ $TRAVIS_OS_NAME == linux ]; then
env;
mv -v ${PWD} ${HOME}/src;
docker run -v ${HOME}/src:/root/src \
-e TRAVIS_JOB_ID="${TRAVIS_JOB_ID}" \
-e TRAVIS_BRANCH="${TRAVIS_BRANCH}" \
--privileged -it cppipfs/cpp-multihash;
fi
branches:
only:
- master
notification:
email: true
os:
- linux
- osx