Quellcode durchsuchen

clean up the build scripts

Julius Pfrommer vor 9 Jahren
Ursprung
Commit
7082b3f879

+ 0 - 20
tools/.checkPorts.sh

@@ -1,20 +0,0 @@
-#!/bin/bash
-
-#
-# This script checks whether all patches from /ports dir are applicable
-#
-
-PATCHES=ports/*
-
-for p in $PATCHES
-do
-	git apply --check $p
-	if [[ "$?" == 0 ]] 
-	then
-		echo $p is applicable
-	else
-		echo failed to apply $p
-		exit 1
-	fi
-	
-done

+ 0 - 54
tools/.deployGH_release.sh

@@ -1,54 +0,0 @@
-#!/bin/bash
-
-#
-# This script is run by travis-ci and pushes generated
-# Doxygen docs and single-source distributions to open62541-www
-#
-TAGSTOSAVE=50
-
-#current tag info
-TAG="$(git rev-parse --short=10 HEAD)"
-BRANCH="$(git log --pretty=format:"%d" --date=iso --abbrev=10 --all -1)"
-DATE="$(git log --pretty=format:"%ad" --date=iso --abbrev=10 --all -1)"
-COMMENT="$(git log --pretty=format:"%s" --date=iso --abbrev=10 --all -1)"
-
-git clone --depth=5 -b gh-pages https://$GITAUTH@github.com/open62541/open62541-www
-cd open62541-www
-#hanndle releases
-cd releases
-if [ ! -e "$TAG.zip" ]; then
-#add the first line
-echo "<tr><td><a href='./$TAG.zip'>$TAG</a></td><td>$BRANCH</td><td>$DATE</td><td>$COMMENT</td></tr>" | cat - rawtable.txt > temp && mv temp rawtable.txt
-
-#keep top lines only
-head "-$TAGSTOSAVE" rawtable.txt > temp && mv temp rawtable.txt
-
-#compose the index file
-cat head.txt rawtable.txt foot.txt > index.html
-
-#create a zip for single-file release and copy the files
-cp ../../open62541.c .
-cp ../../open62541.h .
-zip -r "$TAG.zip" open62541.c open62541.h
-rm open62541.c
-rm open62541.h
-git add "$TAG.zip"
-
-echo "$TAG.zip" | cat - raw.txt > temp && mv temp raw.txt
-
-LINETOSTART=$((TAGSTOSAVE+1))
-#remove obsolete zips
-tail -n +"$LINETOSTART" raw.txt | xargs git rm
-
-#remove obsolete zips from list
-head "-$TAGSTOSAVE" raw.txt > temp && mv temp raw.txt
-fi
-cd ..
-
-git config --global user.email "open62541-travis-ci@users.noreply.github.com"
-git config --global user.name "Open62541 travis-ci"
-git config --global push.default simple
-git commit -am "added release files and updated releases webpage by travis-ci [ci skip]"
-git push https://$GITAUTH@github.com/open62541/open62541-www
-cd ..
-rm -rf open62541-www

+ 1 - 2
tools/travis_linux_before_install.sh

@@ -4,7 +4,7 @@ sudo apt-get update
 sudo apt-get install binutils-mingw-w64-i686 gcc-mingw-w64-i686 mingw-w64
 sudo add-apt-repository ppa:kalakris/cmake -y
 sudo apt-get update -qq
-sudo apt-get install -qq --no-install-recommends build-essential cmake python-lxml gcc-multilib graphviz doxygen wget zip
+sudo apt-get install -qq --no-install-recommends build-essential cmake python-lxml gcc-multilib wget zip
 sudo apt-get install libsubunit-dev #for check_0.10.0
 wget http://ftp.de.debian.org/debian/pool/main/c/check/check_0.10.0-3_amd64.deb
 sudo dpkg -i check_0.10.0-3_amd64.deb
@@ -14,5 +14,4 @@ sudo dpkg -i liburcu2_0.8.5-1ubuntu1_amd64.deb
 sudo dpkg -i liburcu-dev_0.8.5-1ubuntu1_amd64.deb
 sudo pip install cpp-coveralls
 sudo pip install sphinx
-sudo pip install breathe
 sudo pip install sphinx_rtd_theme

+ 29 - 26
tools/travis_linux_script.sh

@@ -1,68 +1,71 @@
 #!/bin/bash
 set -ev
-echo "Checking the applicability of patches"
-# ./tools/.checkPorts.sh
+
 echo "Documentation and certificate build"
 mkdir -p build
 cd build
 cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=ON -DGENERATE_SELFSIGNED=ON ..
 make doc
 make selfsigned
-cp -r doc ..
-cp server_cert.der ..
-echo "Testing builds"
-cd .. && rm build -rf && mkdir -p build && cd build
+cp -r doc ../../
+cp server_cert.der ../../
+cd .. && rm build -rf 
+
 echo "Cross compile release build for MinGW 32 bit"
+mkdir -p build && cd build
 cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
 make
-cp ../README.md .
-cp ../LICENSE .
-cp ../AUTHORS .
-cp -r ../doc .
-cp ../server_cert.der .
-zip -r open62541-win32.zip doc server_cert.der LICENSE AUTHORS README.md server_static.exe server.exe client.exe client_static.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
+zip -r open62541-win32.zip ../../doc ../../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static.exe server.exe client.exe client_static.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
 cp open62541-win32.zip ..
-cd .. && rm build -rf && mkdir -p build && cd build
+cd .. && rm build -rf 
+
 echo "Cross compile release build for MinGW 64 bit"
+mkdir -p build && cd build
 cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
 make
-cp ../README.md .
-cp ../LICENSE .
-cp ../AUTHORS .
-cp -r ../doc .
-cp ../server_cert.der .
-zip -r open62541-win64.zip doc server_cert.der LICENSE AUTHORS README.md server_static.exe server.exe client.exe client_static.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
+zip -r open62541-win64.zip ../../doc ../../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static.exe server.exe client.exe client_static.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
 cp open62541-win64.zip ..
-cd .. && rm build -rf && mkdir -p build && cd build
+cd .. && rm build -rf 
+
 echo "Cross compile release build for 32-bit linux"
+mkdir -p build && cd build
 cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-m32.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
 make
-tar -pczf open62541-linux32.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so open62541.h open62541.c
+tar -pczf open62541-linux32.tar.gz ../../doc ../../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so open62541.h open62541.c
 cp open62541-linux32.tar.gz ..
-cd .. && rm build -rf && mkdir -p build && cd build
+cd .. && rm build -rf 
+
 echo "Compile release build for 64-bit linux"
+mkdir -p build && cd build
 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_AMALGAMATION=ON -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
 make
-tar -pczf open62541-linux64.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so open62541.h open62541.c
+tar -pczf open62541-linux64.tar.gz ../../doc ../../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so open62541.h open62541.c
 cp open62541-linux64.tar.gz ..
 cp open62541.h .. #copy single file-release
 cp open62541.c .. #copy single file-release
+cd .. && rm build -rf 
+
 echo "Upgrade to gcc 4.8"
 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 sudo apt-get update -qq
 sudo apt-get install -qq gcc-4.8 g++-4.8 valgrind
 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
 sudo update-alternatives --config gcc
+
 echo "Building the C++ example"
+mkdir -p build && cd build
 gcc -std=c99 -c open62541.c
 g++-4.8 ../examples/server.cpp -I./ open62541.o -o cpp-server
-cd .. && rm build -rf && mkdir -p build && cd build
+cd .. && rm build -rf 
+
 echo "Compile multithreaded version"
+mkdir -p build && cd build
 cmake -DENABLE_MULTITHREADING=ON -DBUILD_EXAMPLESERVER=ON ..
 make
+cd .. && rm build -rf 
 
-cd .. && rm build -rf && mkdir -p build && cd build
 echo "Debug build and unit tests (64 bit)"
+mkdir -p build && cd build
 cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEMO_NODESET=ON -DBUILD_UNIT_TESTS=ON -DBUILD_EXAMPLESERVER=ON -DENABLE_COVERAGE=ON ..
 make && make test ARGS="-V"
 echo "Run valgrind to see if the server leaks memory (just starting up and closing..)"
@@ -70,4 +73,4 @@ if [[ ! ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "clang") ]]; then
   (valgrind --error-exitcode=3 ./server & export pid=$!; sleep 2; kill -INT $pid; wait $pid);
   (coveralls --gcov /usr/bin/gcov-4.8 -E '.*\.h' -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -r ../ ; exit 0);
 fi
-cd ..
+cd .. && rm build -rf

+ 1 - 3
tools/travis_osx_before_install.sh

@@ -4,11 +4,9 @@ brew install cmake
 brew install check
 brew install libxml2
 brew install userspace-rcu
-brew install graphviz
-brew install doxygen
-brew install swig
 brew install --HEAD valgrind
 
 sudo pip install lxml
 sudo pip install sphinx
 sudo pip install breathe
+sudo pip install sphinx_rtd_theme

+ 10 - 14
tools/travis_osx_script.sh

@@ -1,30 +1,26 @@
 #!/bin/bash
 set -ev
-echo "Documentation and certificate build"
-mkdir -p build
-cd build
-cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=ON -DGENERATE_SELFSIGNED=ON ..
-make doc
-make selfsigned
-cp -r doc ..
-cp server_cert.der ..
-echo "Testing builds"
-cd .. && rm -rf build && mkdir -p build && cd build
+
 echo "Compile release build for OS X"
-cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_AMALGAMATION=ON -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
+mkdir -p build && cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_AMALGAMATION=ON -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON -DBUILD_DOCUMENTATION=ON -DGENERATE_SELFSIGNED=ON ..
 make
 tar -pczf open62541-osx.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.dylib open62541.h open62541.c
 cp open62541-osx.tar.gz ..
 cp open62541.h .. #copy single file-release
 cp open62541.c .. #copy single file-release
-cd .. && rm -rf build && mkdir -p build && cd build
+cd .. && rm -rf build
+
 echo "Compile multithreaded version"
+mkdir -p build && cd build
 cmake -DENABLE_MULTITHREADING=ON -DBUILD_EXAMPLESERVER=ON ..
 make
-cd .. && rm -rf build && mkdir -p build && cd build
+cd .. && rm -rf build
+
 echo "Debug build and unit tests (64 bit)"
+mkdir -p build && cd build
 cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEMO_NODESET=ON -DBUILD_UNIT_TESTS=ON -DBUILD_EXAMPLESERVER=ON -DENABLE_COVERAGE=ON ..
 make && make test
 echo "Run valgrind to see if the server leaks memory (just starting up and closing..)"
 (valgrind --error-exitcode=3 ./server & export pid=$!; sleep 2; kill -INT $pid; wait $pid);
-cd ..
+cd .. && rm -rf build

+ 0 - 0
tools/.coverity.sh


+ 2 - 9
tools/.deployGH_doc.sh

@@ -1,21 +1,14 @@
 #!/bin/bash
 
-#
-# This script is run by travis-ci and pushes generated docs and single-source
-# distributions to open62541-www
-#
-
 git clone --depth=5 -b gh-pages https://$GITAUTH@github.com/open62541/open62541-www
 cd open62541-www
 
 git rm -r -f ./doc/current/*
-cp -r ../doc/* ./doc/current/
+cp -r ../../doc/* ./doc/current/
 git add -A ./doc/current
 git config --global user.email "open62541-travis-ci@users.noreply.github.com"
 git config --global user.name "Open62541 travis-ci"
 git config --global push.default simple
 git commit -am "updated generated documentation on webpage by travis-ci [ci skip]"
 git push https://$GITAUTH@github.com/open62541/open62541-www
-
-cd ..
-rm -rf open62541-www
+cd .. && rm -rf open62541-www

+ 49 - 0
tools/travis_push_release.sh

@@ -0,0 +1,49 @@
+#!/bin/bash
+
+TAGSTOSAVE=50
+TAG="$(git rev-parse --short=10 HEAD)"
+BRANCH="$(git log --pretty=format:"%d" --date=iso --abbrev=10 --all -1)"
+DATE="$(git log --pretty=format:"%ad" --date=iso --abbrev=10 --all -1)"
+COMMENT="$(git log --pretty=format:"%s" --date=iso --abbrev=10 --all -1)"
+
+git clone --depth=5 -b gh-pages https://$GITAUTH@github.com/open62541/open62541-www
+cd open62541-www
+
+#hanndle releases
+cd releases
+if [ ! -e "$TAG.zip" ]; then
+    #add the first line
+    echo "<tr><td><a href='./$TAG.zip'>$TAG</a></td><td>$BRANCH</td><td>$DATE</td><td>$COMMENT</td></tr>" | cat - rawtable.txt > temp && mv temp rawtable.txt
+
+    #keep top lines only
+    head "-$TAGSTOSAVE" rawtable.txt > temp && mv temp rawtable.txt
+
+    #compose the index file
+    cat head.txt rawtable.txt foot.txt > index.html
+
+    #create a zip for single-file release and copy the files
+    cp ../../open62541.c .
+    cp ../../open62541.h .
+    zip -r "$TAG.zip" open62541.c open62541.h
+    rm open62541.c
+    rm open62541.h
+    git add "$TAG.zip"
+
+    echo "$TAG.zip" | cat - raw.txt > temp && mv temp raw.txt
+
+    LINETOSTART=$((TAGSTOSAVE+1))
+    #remove obsolete zips
+    tail -n +"$LINETOSTART" raw.txt | xargs git rm
+
+    #remove obsolete zips from list
+    head "-$TAGSTOSAVE" raw.txt > temp && mv temp raw.txt
+fi
+cd ..
+
+git config --global user.email "open62541-travis-ci@users.noreply.github.com"
+git config --global user.name "Open62541 travis-ci"
+git config --global push.default simple
+git commit -am "added release files and updated releases webpage by travis-ci [ci skip]"
+git push https://$GITAUTH@github.com/open62541/open62541-www
+cd ..
+rm -rf open62541-www