From a9534579c65e5a3ff8a98e5f7df3c8d7f377ad0d Mon Sep 17 00:00:00 2001 From: MoAlyousef Date: Mon, 14 Sep 2020 20:25:38 +0300 Subject: [PATCH 1/4] make testing optional --- .github/workflows/main.yml | 8 ++++---- CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2ac316..fce262e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,9 +32,9 @@ jobs: run: | mkdir build && cd build if [[ "${{ matrix.compiler }}" == "g++-8" && "${{ matrix.standard }}" == "17" ]] ; then - cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=ON + cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=ON else - cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} + cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} fi - name: Build run: | @@ -70,7 +70,7 @@ jobs: - name: Configure run: | mkdir build && cd build - cmake .. -DCMAKE_CXX_COMPILER=clang++-${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} + cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=clang++-${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} - name: Build run: | cd build && cmake --build . @@ -94,7 +94,7 @@ jobs: run: | mkdir build cd build - cmake ../ -G "NMake Makefiles" -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DBoost_ADDITIONAL_VERSIONS=1.72.0 -DBoost_USE_MULTITHREADED=ON -DBoost_ARCHITECTURE=-x64 -DBoost_NO_BOOST_CMAKE=ON -DBOOST_ROOT=%BOOST_ROOT_1_72_0% + cmake ../ -G "NMake Makefiles" -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DBoost_ADDITIONAL_VERSIONS=1.72.0 -DBoost_USE_MULTITHREADED=ON -DBoost_ARCHITECTURE=-x64 -DBoost_NO_BOOST_CMAKE=ON -DBOOST_ROOT=%BOOST_ROOT_1_72_0% - name: Build working-directory: ./build run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 340ae4b..69616d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ enable_testing() project(toml11 VERSION 3.5.0) -option(toml11_BUILD_TEST "Build toml tests" ON) +option(toml11_BUILD_TEST "Build toml tests" OFF) option(toml11_TEST_WITH_ASAN "use LLVM address sanitizer" OFF) option(toml11_TEST_WITH_UBSAN "use LLVM undefined behavior sanitizer" OFF) From d599edd1d424a58b4e603d5a398cb2f754ffdba6 Mon Sep 17 00:00:00 2001 From: MoAlyousef Date: Mon, 14 Sep 2020 20:34:19 +0300 Subject: [PATCH 2/4] make testing optional --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dc05b74..ce291a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -332,6 +332,6 @@ script: - cd build - echo "COMPILER = ${COMPILER}" - echo "CXX_STANDARD = ${CXX_STANDARD}" -- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_CXX_STANDARD=$CXX_STANDARD -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=${REQUIRE_FILESYSTEM_LIBRARY} -DTOML11_USE_UNRELEASED_TOML_FEATURES=${TOML_HEAD} -Dtoml11_TEST_WITH_ASAN=${WITH_ASAN} -Dtoml11_TEST_WITH_UBSAN=${WITH_UBSAN} .. +- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_CXX_STANDARD=$CXX_STANDARD -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=${REQUIRE_FILESYSTEM_LIBRARY} -Dtoml11_BUILD_TEST=ON -DTOML11_USE_UNRELEASED_TOML_FEATURES=${TOML_HEAD} -Dtoml11_TEST_WITH_ASAN=${WITH_ASAN} -Dtoml11_TEST_WITH_UBSAN=${WITH_UBSAN} .. - make - ctest --output-on-failure From 00bec8ae4526fefe50dbeb73c33ddd2cbe1923ea Mon Sep 17 00:00:00 2001 From: MoAlyousef Date: Mon, 14 Sep 2020 22:05:15 +0300 Subject: [PATCH 3/4] update Running Tests heading --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a44687..38e0ab8 100644 --- a/README.md +++ b/README.md @@ -1798,7 +1798,7 @@ for automating test set fetching!). ```sh $ mkdir build $ cd build -$ cmake .. +$ cmake .. -Dtoml11_BUILD_TEST=ON $ make $ make test ``` From 38e113d2dc898ead67b2135cd9affdab87fbf2df Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Tue, 15 Sep 2020 22:40:24 +0900 Subject: [PATCH 4/4] ci: set BUILD_TEST=ON on appveyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a0504ac..9fc6a73 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,7 @@ build_script: - cd C:\toml11 - mkdir build - cd build - - cmake -G"%generator%" -DBOOST_ROOT=C:/Libraries/boost_1_69_0 .. + - cmake -G"%generator%" -DBOOST_ROOT=C:/Libraries/boost_1_69_0 -Dtoml11_BUILD_TEST=ON .. - cmake --build . --config "%configuration%" - file --mime-encoding tests/toml/tests/hard_example_unicode.toml