-
Notifications
You must be signed in to change notification settings - Fork 42
/
.travis.yml
60 lines (49 loc) · 1.53 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
# from <https://github.com/taocpp/PEGTL/blob/master/.travis.yml>
language: cpp
os: linux
dist: bionic
env:
- CXX_COMPILER=g++-5
- CXX_COMPILER=g++-6
- CXX_COMPILER=g++-7
- CXX_COMPILER=g++-8
- CXX_COMPILER=clang++-5.0
- CXX_COMPILER=clang++-6.0
- CXX_COMPILER=clang++-7
- CXX_COMPILER=clang++-8
addons:
apt:
packages:
- python3-pip
sources:
- ubuntu-toolchain-r-test
update: false
before_install:
- if [[ "${CXX_COMPILER}" =~ "clang++" ]]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-$(lsb_release -c | awk '{printf $2}')-${CXX_COMPILER##*-} main" -y; fi
- sudo apt-get update
- sudo apt-get install "${CXX_COMPILER}" cmake pkg-config $(if [[ "${CXX_COMPILER}" =~ "clang++-" ]]; then echo llvm; fi) -y
before_script:
- export CXX="${CXX_COMPILER}"
- export GTEST_COLOR=1
- cd ..
# get googletest
- git clone https://github.com/google/googletest.git
- cd googletest
- mkdir build
- cd build
- export GTEST_ROOT=$HOME/.local/googletest
- cmake .. -DCMAKE_INSTALL_PREFIX=$GTEST_ROOT -DCMAKE_CXX_FLAGS="-std=c++11"
- make -j 2
- make install
- cd ../..
# get newer CMake
- pip3 install --user cmake
- export CMAKE_ROOT=$(dirname $(dirname $(dirname $(pip3 show cmake | grep "Location:" | awk '{print $2}'))))/bin/cmake
- export PATH=$(dirname ${CMAKE_ROOT}):$PATH
- cd Encryptions
script:
- mkdir build
- cd build
- cmake ..
- make
- ctest -V