From 63f73ee2ad037bf0d03aea4d489fdd9e85a21ff1 Mon Sep 17 00:00:00 2001 From: yuangongji <82787816@qq.com> Date: Thu, 14 Nov 2019 18:34:56 +0800 Subject: [PATCH] CI: integrate testing for components export --- .travis.yml | 18 +++++++++++++++--- appveyor.yml | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cb07751..96825bd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,6 +42,11 @@ matrix: # coveralls - os: linux env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=debug" COVERALLS=yes + # test-export + - os: linux + env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON" TEST_EXPORT=STATIC + - os: linux + env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON" TEST_EXPORT=SHARED # for openssl1.1 - os: linux dist: bionic @@ -124,9 +129,16 @@ script: mkdir build && cd build && - cmake .. $EVENT_CMAKE_OPTIONS && - travis_wait $TIMEOUT - cmake --build . --target verify; + cmake .. $EVENT_CMAKE_OPTIONS; + if [ "$TEST_EXPORT" == "STATIC" ]; then + cmake --build .; + sudo python3 ../test-export/test-export.py static; + elif [ "$TEST_EXPORT" == "SHARED" ]; then + cmake --build .; + sudo python3 ../test-export/test-export.py shared; + else + travis_wait $TIMEOUT cmake --build . --target verify; + fi fi - if [ "$TOOL" == "doxygen" ]; then eval "$(ssh-agent -s)"; diff --git a/appveyor.yml b/appveyor.yml index ec08a1ce..a2687237 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,6 +23,7 @@ environment: global: APPVEYOR_SAVE_CACHE_ON_ERROR: true OPENSSL_ROOT: C:/OpenSSL-Win64 + PYTHON3: C:/Python37-x64/python.exe MPATH: C:/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin;C:/msys64/usr/bin EVENT_TESTS_PARALLEL: 20 EVENT_BUILD_PARALLEL: 10 @@ -66,6 +67,14 @@ environment: - EVENT_BUILD_METHOD: "cmake" EVENT_CMAKE_OPTIONS: "" APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019" + - EVENT_BUILD_METHOD: "cmake" + EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON" + APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017" + TEST_EXPORT: "SHARED" + - EVENT_BUILD_METHOD: "cmake" + EVENT_CMAKE_OPTIONS: "-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON" + APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017" + TEST_EXPORT: "STATIC" matrix: exclude: @@ -123,7 +132,13 @@ build_script: if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } cmake --build . -j $env:EVENT_BUILD_PARALLEL -- /nologo /verbosity:minimal if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } - ctest --output-on-failure -j $env:EVENT_TESTS_PARALLEL + if ($env:TEST_EXPORT -eq 'STATIC') { + &$env:PYTHON3 ../test-export/test-export.py static + } elseif ($env:TEST_EXPORT -eq 'SHARED') { + &$env:PYTHON3 ../test-export/test-export.py shared + } else { + ctest --output-on-failure -j $env:EVENT_TESTS_PARALLEL + } } cache: -- 2.40.0