forked from jedisct1/libsodium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
22 lines (18 loc) · 952 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
language: c
os:
- linux
- osx
compiler:
- clang
- gcc
before_script:
- if [[ $(cmake --version) =~ ([0-9][.][0-9][.][0-9]) ]] && dpkg --compare-versions ${BASH_REMATCH[1]} lt 3.1.0; then UPGRADE="YES"; else UPGRADE=""; fi
- if [ "$UPGRADE" == "YES" ] && [ "$(uname -m)" == "x86_64" ]; then wget http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz && sudo tar -xf cmake-3.1.0-Linux-x86_64.tar.gz -C /usr --strip-components=1; fi
- if [ "$UPGRADE" == "YES" ] && [ "$(uname -m)" != "x86_64" ]; then wget http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-i386.tar.gz && sudo tar -xf cmake-3.1.0-Linux-i386.tar.gz -C /usr --strip-components=1; fi
- rm -f cmake-3.1.0-Linux-*.tar.gz
script:
- rm -rf CMakeCache.txt
- mkdir -p build/debug build/release
- (cd build/release && cmake -DLIBSODIUM_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release ../..)
- (cd build/release && cmake --build . --config Release)
- (cd build/release && ctest)