forked from cpputest/cpputest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_ci_build.sh
executable file
·53 lines (43 loc) · 1.27 KB
/
travis_ci_build.sh
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
#!/bin/bash
# Script run in the travis CI
set -e
if [ "x$BUILDTOOL" = "xautotools" ]; then
autoreconf -i ..
../configure
echo "CONFIGURATION DONE. Compiling now."
make check_all
# Special check for all the gtest versions.
make check_gtest
# One more normal build for generating test reports
../configure
make check
./CppUTestTests -ojunit
./CppUTestExtTests -ojunit
cp ../scripts/generate_junit_report_ant.xml .
ant -f generate_junit_report_ant.xml
make dist
make dist-zip
if [ "x$CXX" = "xg++" ]; then
cd .. && travis_github_deployer -v || exit 1
fi;
fi
if [ "x$BUILDTOOL" = "xcmake" ]; then
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
make || exit 1
ctest -V || exit 1
if [ "x$CXX" != "xg++" ]; then
cmake .. -DC++11=ON -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
make || exit 1
ctest -V || exit 1
fi
wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip
unzip gmock-1.6.0.zip -d $TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR/gmock-1.6.0
./configure && make
cd -
export GMOCK_HOME=$TRAVIS_BUILD_DIR/gmock-1.6.0
export GTEST_HOME=$TRAVIS_BUILD_DIR/gmock-1.6.0/gtest
cmake .. -DGMOCK=ON || exit 1
make || exit 1
ctest -V || exit 1
fi