Skip to content

Commit 36b5ea2

Browse files
committed
Merge pull request cpputest#760 from basvodde/master
Added additional stuff to the build matrix
2 parents be5612b + 0fa1a5f commit 36b5ea2

File tree

2 files changed

+73
-52
lines changed

2 files changed

+73
-52
lines changed

.travis.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,48 @@ compiler:
88
rvm:
99
- 1.9.3
1010
env:
11-
- BUILDTOOL=autotools
12-
- BUILDTOOL=autotools_old_compilers
13-
- BUILDTOOL=cmake
14-
- BUILDTOOL=cmake-coverage
15-
- BUILDTOOL=make-dos
11+
- BUILD=autotools
12+
- BUILD=cmake
13+
- BUILD=autotools_gtest
14+
- BUILD=cmake_gtest
15+
- BUILD=test_report
16+
- BUILD=autotools_old_compilers
17+
- BUILD=cmake-coverage
18+
- BUILD=make-dos
1619
matrix:
1720
exclude:
18-
- env: BUILDTOOL=cmake-coverage
19-
- env: BUILDTOOL=autotools_old_compilers
20-
- env: BUILDTOOL=make-dos
21+
- env: BUILD=cmake-coverage
22+
- env: BUILD=autotools_old_compilers
23+
- env: BUILD=make-dos
24+
- env: BUILD=test_report
2125
- compiler: wcl
2226
include:
23-
- env: BUILDTOOL=cmake-coverage
27+
- env: BUILD=cmake-coverage
2428
compiler: gcc
25-
- env: BUILDTOOL=make-dos
29+
- env: BUILD=test_report
30+
compiler: gcc
31+
- env: BUILD=make-dos
2632
compiler: wcl
2733
global:
2834
- secure: |-
2935
P05xUfJVw5YM4hF7hzQLjyMzDD4Q1/fyWP9Uk5aK5VrSWNY99EuxldXI5QK/
3036
vA1NkcW49tQW1wQvBlRtdlLNOmUfDP/oiJFXPwNn4dqwOIOEet2P7JO/5hnH
3137
MNHlZmGu2WpoZREhOFBfsIhK0IP8mloqLDq2XemBdga/LWygrLU=
3238
- secure: Y/8iNkf6uEbE3qltnM+7mGlCvFWzyttwwRGgVGw1m9xOiUJcobvOImQRU8XZ91dgO+Fz0A3mljqs1sK1OPjpXmFGE1jP/NlotMw0WlDOuSIDjQ4ubwdTNGAwNY53R9ygbIjEmqxHAJm9mOZqxW2hNaoI7TcX6oX248/hLibyx8M=
39+
addons:
40+
apt:
41+
packages:
42+
# - dosbox -y
43+
- valgrind
3344
before_install:
34-
- sudo pip install cpp-coveralls
35-
- sudo apt-get install dosbox -y
45+
# - sudo pip install cpp-coveralls
46+
- sudo apt-get install dosbox -y
3647
install:
37-
- gem install travis_github_deployer
38-
- sudo apt-get update --fix-missing
39-
- sudo apt-get install valgrind
48+
- gem install travis_github_deployer
49+
- sudo apt-get update --fix-missing
50+
# - sudo apt-get install valgrind
4051
before_script:
41-
- wget ftp://ftp.openwatcom.org/pub/open-watcom-c-linux-1.9 -O /tmp/watcom.zip
42-
- mkdir -p watcom && unzip -a -d watcom /tmp/watcom.zip && sudo chmod -R 755 watcom/binl
43-
- export PATH=$PATH:$PWD/watcom/binl/
44-
- wcl --version
45-
- export CPPUTEST_BUILD_DIR=$TRAVIS_BUILD_DIR/cpputest_build
46-
- mkdir -p $CPPUTEST_BUILD_DIR && cd $CPPUTEST_BUILD_DIR
52+
- export CPPUTEST_BUILD_DIR=$TRAVIS_BUILD_DIR/cpputest_build
53+
- mkdir -p $CPPUTEST_BUILD_DIR && cd $CPPUTEST_BUILD_DIR
4754
script:
4855
- "../scripts/travis_ci_build.sh"

scripts/travis_ci_build.sh

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
#!/bin/bash
22
# Script run in the travis CI
3-
set -e
3+
set -ex
44

5-
if [ "x$BUILDTOOL" = "xautotools" ]; then
5+
if [ "x$BUILD" = "xautotools" ]; then
66
autoreconf -i ..
77
../configure
88
echo "CONFIGURATION DONE. Compiling now."
99
make check_all
1010

11-
# Special check for all the gtest versions.
12-
make check_gtest
13-
14-
# One more normal build for generating test reports
15-
../configure
16-
make check
17-
./CppUTestTests -ojunit
18-
./CppUTestExtTests -ojunit
19-
cp ../scripts/generate_junit_report_ant.xml .
20-
ant -f generate_junit_report_ant.xml
21-
2211
make dist
2312
make dist-zip
2413

@@ -28,17 +17,26 @@ if [ "x$BUILDTOOL" = "xautotools" ]; then
2817
fi;
2918
fi
3019

31-
if [ "x$BUILDTOOL" = "xcmake" ]; then
20+
if [ "x$BUILD" = "xcmake" ]; then
3221
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
33-
make || exit 1
34-
ctest -V || exit 1
22+
make
23+
ctest -V
3524

3625
if [ "x$CXX" != "xg++" ]; then
3726
cmake .. -DC++11=ON -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
38-
make || exit 1
39-
ctest -V || exit 1
27+
make
28+
ctest -V
4029
fi
30+
fi
31+
32+
if [ "x$BUILD" = "xautotools_gtest" ]; then
33+
autoreconf -i ..
34+
../configure
4135

36+
make check_gtest
37+
fi
38+
39+
if [ "x$BUILD" = "xcmake_gtest" ]; then
4240
wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip
4341
unzip gmock-1.6.0.zip -d $TRAVIS_BUILD_DIR
4442
cd $TRAVIS_BUILD_DIR/gmock-1.6.0
@@ -47,24 +45,40 @@ if [ "x$BUILDTOOL" = "xcmake" ]; then
4745

4846
export GMOCK_HOME=$TRAVIS_BUILD_DIR/gmock-1.6.0
4947
export GTEST_HOME=$TRAVIS_BUILD_DIR/gmock-1.6.0/gtest
50-
cmake .. -DGMOCK=ON || exit 1
51-
make || exit 1
52-
ctest -V || exit 1
48+
cmake .. -DGMOCK=ON
49+
make
50+
ctest -V
5351
fi
5452

55-
if [ "x$BUILDTOOL" = "xcmake-coverage" ]; then
56-
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=ON
57-
make || exit 1
58-
ctest || exit 1
53+
if [ "x$BUILD" = "xtest_report" ]; then
54+
autoreconf -i ..
55+
../configure
56+
make check
57+
./CppUTestTests -ojunit
58+
./CppUTestExtTests -ojunit
59+
cp ../scripts/generate_junit_report_ant.xml .
60+
ant -f generate_junit_report_ant.xml
61+
fi
62+
63+
if [ "x$BUILD" = "xcmake-coverage" ]; then
64+
pip install cpp-coveralls --user `whoami`
65+
66+
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=ON
67+
make
68+
ctest
5969

60-
coveralls -b . -r .. -i "src" -i "include" --gcov-options="-bc" || true
70+
coveralls -b . -r .. -i "src" -i "include" --gcov-options="-bc" || true
6171
fi
6272

63-
if [ "x$BUILDTOOL" = "xmake-dos" ]; then
64-
export CC=wcl
65-
export CXX=wcl
66-
# $(CC) --version
67-
make -f ../platforms/Dos/Makefile || exit 1
73+
if [ "x$BUILD" = "xmake-dos" ]; then
74+
wget ftp://ftp.openwatcom.org/pub/open-watcom-c-linux-1.9 -O /tmp/watcom.zip
75+
mkdir -p watcom && unzip -a -d watcom /tmp/watcom.zip && sudo chmod -R 755 watcom/binl
76+
export PATH=$PATH:$PWD/watcom/binl/
77+
wcl --version
78+
export CC=wcl
79+
export CXX=wcl
80+
# $(CC) --version
81+
make -f ../platforms/Dos/Makefile || exit 1
6882
echo "" > exit # has to be there so dosbox will do 'exit' correctly
6983
echo "\n" > ./ALLTESTS.LOG
7084
dosbox -conf ../platforms/Dos/dosbox-0.74.conf exit \

0 commit comments

Comments
 (0)