Skip to content

Commit

Permalink
Merge 133bbf0 into d89e9e5
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Dec 20, 2018
2 parents d89e9e5 + 133bbf0 commit d437f7f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Expand Up @@ -143,6 +143,22 @@ matrix:
- ANALYZE=false
- CC=tcc
- PYTHON=python2
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-6.0
- ubuntu-toolchain-r-test
packages:
- clang-6.0
- clang-tidy-6.0
- python3-six
- valgrind
env:
- INSTALL=true
- CC=clang-6.0
- CXX=clang++-6.0
- PYTHON=python3
- os: linux
addons:
apt:
Expand Down
30 changes: 30 additions & 0 deletions tools/travis/travis_linux_script.sh
Expand Up @@ -54,6 +54,36 @@ if ! [ -z ${FUZZER+x} ]; then
exit 0
fi

# INSTALL build test
if ! [ -z ${INSTALL+x} ]; then

# Use make install to deploy files and then test if we can build an example based on the installed files
mkdir -p build
cd build
cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DUA_NAMESPACE_ZERO=FULL -DUA_ENABLE_AMALGAMATION=OFF -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/open62541_install ..
make install
if [ $? -ne 0 ] ; then exit 1 ; fi

cd .. && rm build -rf

# Now create a simple CMake Project which uses the installed file
mkdir compile && cd compile
cat > CMakeLists.txt <<- EOM
cmake_minimum_required(VERSION 2.8)
project(install-test)
find_package(open62541 REQUIRED COMPONENTS FullNamespace)
add_executable(install-test-example ../examples/tutorial_server_firststeps.c)
target_link_libraries(install-test-example open62541)
EOM
cmake -DCMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/open62541_install .
make -j
if [ $? -ne 0 ] ; then exit 1 ; fi
cd ..
rm -rf compile
exit 0
fi

if [ $ANALYZE = "true" ]; then
echo "=== Running static code analysis ===" && echo -en 'travis_fold:start:script.analyze\\r'
if ! case $CC in clang*) false;; esac; then
Expand Down

0 comments on commit d437f7f

Please sign in to comment.