forked from ctabin/libzippp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (74 loc) · 3.04 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
os: linux
dist: trusty
language: cpp
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- liblzma-dev
- libbz2-dev
- libssl-dev
- valgrind
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" BUILD_TYPE=Debug LIBZIPPP_BUILD_SHARED_LIBS=OFF
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" BUILD_TYPE=Release LIBZIPPP_BUILD_SHARED_LIBS=OFF
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" BUILD_TYPE=Debug LIBZIPPP_BUILD_SHARED_LIBS=ON
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" BUILD_TYPE=Release LIBZIPPP_BUILD_SHARED_LIBS=ON
jobs:
include:
- env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
install:
- make libraries
script:
- make
- make tests
before_install:
- eval "${MATRIX_EVAL}"
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2-Linux-x86_64.tar.gz
- tar -xvf cmake-3.18.2-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.18.2-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
- THIRD_PARTY=$HOME/third_party
- THIRD_PARTY_PREFIX=$THIRD_PARTY/install
- |
mkdir -p $THIRD_PARTY/zlib && cd $THIRD_PARTY/zlib
travis_retry wget -O zlib.tar.gz "https://github.com/madler/zlib/archive/v1.2.11.tar.gz"
tar xzf zlib.tar.gz --strip-components=1
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${THIRD_PARTY_PREFIX}
make -j3 install
- |
mkdir -p $THIRD_PARTY/libzip && cd $THIRD_PARTY/libzip
travis_retry wget -O libzip.tar.gz "https://github.com/nih-at/libzip/archive/v1.8.0.tar.gz"
tar xzf libzip.tar.gz --strip-components=1
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${THIRD_PARTY_PREFIX} -DCMAKE_INSTALL_PREFIX=${THIRD_PARTY_PREFIX} -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF
make -j3 install
- cd $TRAVIS_BUILD_DIR # Reset CWD
script:
- mkdir build && cd build
- cmake .. -DCMAKE_PREFIX_PATH=${THIRD_PARTY_PREFIX} -DCMAKE_INSTALL_PREFIX=$HOME/libzippp -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$LIBZIPPP_BUILD_SHARED_LIBS
- make -j3 install
- make test
- rm -r *
- cmake ../tests/exampleProject -DCMAKE_PREFIX_PATH="${THIRD_PARTY_PREFIX};$HOME/libzippp" -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$THIRD_PARTY_PREFIX/lib" # For shared libs
- make -j3
- make test
- rm -r *
- |
cmake .. -DCMAKE_PREFIX_PATH=${THIRD_PARTY_PREFIX} -DCMAKE_INSTALL_PREFIX=$HOME/libzippp-enc -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$LIBZIPPP_BUILD_SHARED_LIBS -DLIBZIPPP_ENABLE_ENCRYPTION=ON
- make -j3 install
- make test
- rm -r *
- cmake ../tests/exampleProject -DCMAKE_PREFIX_PATH="${THIRD_PARTY_PREFIX};$HOME/libzippp-enc" -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$THIRD_PARTY_PREFIX/lib" # For shared libs
- make -j3
- make test