-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
35 lines (32 loc) · 1.01 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
# Test configuration for Travis CI. See <https://travis-ci.org/>.
language: cpp
compiler:
- gcc
- clang
install:
- sudo apt-get install -y cppcheck valgrind g++-multilib
- wget --no-check-certificate http://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz
- tar -xzf cmake-3.1.3-Linux-x86_64.tar.gz
- export CXXFLAGS="-Wall -Wextra -Werror -Wno-long-long -pedantic -O2"
- export PATH=$PWD/cmake-3.1.3-Linux-x86_64/bin:$PATH
script:
# Static code analysis
- cppcheck . --error-exitcode=1 --quiet --force -icmake-3.1.3-Linux-x86_64
# Test x64 CPU
- mkdir build
- cd build
- cmake ..
- make VERBOSE=1
- ctest
- cd test
- valgrind --error-exitcode=1 ./test1 30000
# Test x86 CPU (32-bit)
- cd ../..
- rm -rf build
- mkdir build
- cd build
- export CXXFLAGS="-m32 -g -O3 -Wall -pedantic -Wextra -Werror -Wno-unused-parameter -Wno-long-long"
- export CFLAGS="-m32 -g -O3 -Wall -pedantic -Wextra -Werror -Wno-unused-parameter -Wno-long-long"
- cmake ..
- make VERBOSE=1
- ctest