forked from eclipse-paho/paho.mqtt.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_build.sh
executable file
·32 lines (22 loc) · 947 Bytes
/
travis_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
#!/bin/bash
set -ex
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ "$COMPILER" == "" ]; then
COMPILER=g++;
fi
echo "Travis build dir: $TRAVIS_BUILD_DIR, pwd: $PWD"
rm -rf build/
cmake -Bbuild -H. -DCMAKE_CXX_COMPILER=$COMPILER -DPAHO_BUILD_SAMPLES=ON -DPAHO_BUILD_STATIC=ON -DPAHO_BUILD_DOCUMENTATION=OFF -DPAHO_BUILD_TESTS=ON -DPAHO_WITH_SSL=OFF
sudo env "PATH=$PATH" cmake --build build/ --target install
# Run the unit tests
./build/test/unit/unit_tests # --success
./build/test/cppunit/paho-mqttpp-test
#ctest -VV --timeout 600
#cpack --verbose
rm -rf build/
cmake -Bbuild -H. -DCMAKE_CXX_COMPILER=$COMPILER -DPAHO_BUILD_SAMPLES=ON -DPAHO_BUILD_STATIC=ON -DPAHO_BUILD_DOCUMENTATION=OFF -DPAHO_BUILD_TESTS=ON -DPAHO_WITH_SSL=ON
sudo env "PATH=$PATH" cmake --build build/ --target install
# Run the unit tests
./build/test/unit/unit_tests # --success
./build/test/cppunit/paho-mqttpp-test
fi