From a21aa74a93fa3030ce5937911cd930630f8d5276 Mon Sep 17 00:00:00 2001 From: Riccardo Ressi Date: Sun, 7 Jul 2019 08:24:13 +0200 Subject: [PATCH 1/3] Build libdash on Travis This is a first attempt to have Travis building libdash at each commit --- .gitignore | 3 ++ .travis.yml | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index c59b67d1..996fa0c0 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,6 @@ .metadata build + +.idea +cmake-build-* diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..10aaf60f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,88 @@ +language: c++ + +env: + global: + - LD_LIBRARY_PATH=/usr/local/lib + +#addons: +# apt: +# sources: &common_sources +# - ubuntu-toolchain-r-test +# packages: &common_packages +# - build-essential +# - clang++ +# - cmake +# - g++ + +matrix: + include: + - os: linux + compiler: gcc + dist: bionic + env: + - BUILD_TYPE=Debug + - os: linux + compiler: gcc + dist: xenial + env: + - BUILD_TYPE=Debug + - os: linux + compiler: gcc + dist: trusty + env: + - BUILD_TYPE=Debug + + - os: linux + compiler: clang + dist: bionic + env: + - BUILD_TYPE=Debug + - os: linux + compiler: clang + dist: xenial + env: + - BUILD_TYPE=Debug + - os: linux + compiler: clang + dist: trusty + env: + - BUILD_TYPE=Debug + + - os: linux + compiler: gcc + dist: bionic + env: + - BUILD_TYPE=Release + - os: linux + compiler: gcc + dist: xenial + env: + - BUILD_TYPE=Release + - os: linux + compiler: gcc + dist: trusty + env: + - BUILD_TYPE=Release + + - os: linux + compiler: clang + dist: bionic + env: + - BUILD_TYPE=Release + - os: linux + compiler: clang + dist: xenial + env: + - BUILD_TYPE=Release + - os: linux + compiler: clang + dist: trusty + env: + - BUILD_TYPE=Release + +script: + - | + mkdir -p libdash/cmake-build-release + cd libdash/cmake-build-release + cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. + make From 4bdde87b7e14f77dfc586397c470ae097f7835bf Mon Sep 17 00:00:00 2001 From: Riccardo Ressi Date: Sun, 7 Jul 2019 08:46:13 +0200 Subject: [PATCH 2/3] Travis support: execute tests --- .travis.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10aaf60f..66379437 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,9 @@ language: c++ -env: - global: - - LD_LIBRARY_PATH=/usr/local/lib - -#addons: -# apt: -# sources: &common_sources -# - ubuntu-toolchain-r-test -# packages: &common_packages -# - build-essential -# - clang++ -# - cmake -# - g++ - matrix: include: + + # UBUNTU - DEBUG - GCC - os: linux compiler: gcc dist: bionic @@ -32,6 +20,7 @@ matrix: env: - BUILD_TYPE=Debug + # UBUNTU - DEBUG - CLANG - os: linux compiler: clang dist: bionic @@ -48,6 +37,7 @@ matrix: env: - BUILD_TYPE=Debug + # UBUNTU - RELEASE - GCC - os: linux compiler: gcc dist: bionic @@ -64,6 +54,7 @@ matrix: env: - BUILD_TYPE=Release + # UBUNTU - RELEASE - CLANG - os: linux compiler: clang dist: bionic @@ -82,7 +73,11 @@ matrix: script: - | - mkdir -p libdash/cmake-build-release - cd libdash/cmake-build-release + mkdir -p libdash/cmake-build-${BUILD_TYPE} + cd libdash/cmake-build-${BUILD_TYPE} cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. + make + + export LD_LIBRARY_PATH=$(realpath ./bin) + ./bin/libdash_networkpart_test From 46dcaa0e7f03c52f28b6a570f315b3ab75b9697e Mon Sep 17 00:00:00 2001 From: Riccardo Ressi Date: Sun, 7 Jul 2019 09:01:44 +0200 Subject: [PATCH 3/3] Make libdash_networkpart_test scriptable --- .travis.yml | 4 +++- libdash/libdash_networkpart_test/libdash_networkpart_test.cpp | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66379437..b68ccd23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,11 +73,13 @@ matrix: script: - | + set -us + mkdir -p libdash/cmake-build-${BUILD_TYPE} cd libdash/cmake-build-${BUILD_TYPE} cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. make - export LD_LIBRARY_PATH=$(realpath ./bin) + export LD_LIBRARY_PATH=$(pwd)/bin ./bin/libdash_networkpart_test diff --git a/libdash/libdash_networkpart_test/libdash_networkpart_test.cpp b/libdash/libdash_networkpart_test/libdash_networkpart_test.cpp index c537b3d4..a55b73f2 100644 --- a/libdash/libdash_networkpart_test/libdash_networkpart_test.cpp +++ b/libdash/libdash_networkpart_test/libdash_networkpart_test.cpp @@ -91,6 +91,4 @@ int main() std::cout << "finished!" << std::endl << std::endl; delete(peristenthttpconnection); - - getchar(); }