From 1410aaae2ed2c7c62bd3b8cddbde53092858c514 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 16:02:13 +0000 Subject: [PATCH 1/8] Fix Github Actions CI on Windows (#334) The output was: At D:\a\_temp\384af4b7-bfae-4079-891c-d5392beae9ba.ps1:5 char:10 + cd build && ctest + ~~ The token '&&' is not a valid statement separator in this version. + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : InvalidEndOfLine I've split all 'cd build && ctest' lines, to avoid making future edits error-prone --- .github/workflows/main.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e1855ca3..bf97b3232 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -409,14 +409,16 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DDOCTEST_TEST_MODE=COMPARE cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Release x64 run: | cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DDOCTEST_TEST_MODE=COMPARE cmake --build build - cd build && ctest + cd build + ctest # Valgrind doesn't support the latest macOS versions. # `-DCMAKE_CXX_FLAGS=""` overrides CXXFLAGS (disables sanitizers). @@ -427,7 +429,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="" -DDOCTEST_TEST_MODE=VALGRIND cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Release x64 Valgrind if: runner.os == 'Linux' @@ -435,7 +438,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="" -DDOCTEST_TEST_MODE=VALGRIND cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Debug x64 Thread Sanitizers if: runner.os == 'Linux' || runner.os == 'macOS' @@ -443,7 +447,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="$TSAN_FLAGS" -DDOCTEST_TEST_MODE=COMPARE cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Debug x64 without RTTI if: runner.os == 'Linux' || runner.os == 'macOS' @@ -451,7 +456,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fno-rtti" -DDOCTEST_TEST_MODE=COMPARE cmake --build build - cd build && ctest + cd build + ctest - name: Build x64 Debug without exceptions if: runner.os == 'Linux' || runner.os == 'macOS' @@ -481,7 +487,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DDOCTEST_TEST_MODE=COMPARE cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Release x86 if: (runner.os == 'Windows' && matrix.compiler != 'gcc') || runner.os == 'Linux' @@ -489,7 +496,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DDOCTEST_TEST_MODE=COMPARE cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Debug x86 Valgrind if: runner.os == 'Linux' @@ -497,7 +505,8 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32" -DDOCTEST_TEST_MODE=VALGRIND cmake --build build - cd build && ctest + cd build + ctest - name: Build & Test Release x86 Valgrind if: runner.os == 'Linux' @@ -505,4 +514,5 @@ jobs: cmake -E remove_directory build cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m32" -DDOCTEST_TEST_MODE=VALGRIND cmake --build build - cd build && ctest + cd build + ctest From 0f3502ae16701fbcd5e5116c4097936c5819474b Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 16:23:25 +0000 Subject: [PATCH 2/8] Fix clang Github Actions CI on Windows (#334) The output was: AIn file included from ../examples/all_features/main.cpp:2: In file included from ../scripts/development_only\doctest/doctest.h:5: ../doctest/parts\doctest.cpp:142:10: error: non-portable path to file ''; specified path differs in case from file name on disk [-Werror,-Wnonportable-system-include-path] #include ^~~~~~~~~~~ 1 error generated. ninja: build stopped: subcommand failed. --- doctest/doctest.h | 2 +- doctest/parts/doctest.cpp | 2 +- examples/executable_dll_and_plugin/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doctest/doctest.h b/doctest/doctest.h index 89b26c5bf..765826ffe 100644 --- a/doctest/doctest.h +++ b/doctest/doctest.h @@ -2751,7 +2751,7 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN #ifdef __AFXDLL #include #else -#include +#include #endif #include diff --git a/doctest/parts/doctest.cpp b/doctest/parts/doctest.cpp index 40b3a96ca..9a897e541 100644 --- a/doctest/parts/doctest.cpp +++ b/doctest/parts/doctest.cpp @@ -139,7 +139,7 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN #ifdef __AFXDLL #include #else -#include +#include #endif #include diff --git a/examples/executable_dll_and_plugin/main.cpp b/examples/executable_dll_and_plugin/main.cpp index 09550910a..930efc004 100644 --- a/examples/executable_dll_and_plugin/main.cpp +++ b/examples/executable_dll_and_plugin/main.cpp @@ -24,7 +24,7 @@ TEST_CASE("executable") { #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN -#include +#include DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END #ifdef _MSC_VER #define LoadDynamicLib(lib) LoadLibrary(lib ".dll") From 827b1136370a3a67202951f4a1ac380726d4d938 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 16:42:33 +0000 Subject: [PATCH 3/8] Try to track down available XCode versions (#334) Example output: xcode-select: error: invalid developer directory '/Applications/Xcode_10.2.1.app' --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf97b3232..d9b55cd07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -281,6 +281,7 @@ jobs: echo "::set-env name=CC::gcc-${{ matrix.version }}" echo "::set-env name=CXX::g++-${{ matrix.version }}" else + ls -ls /Applications/ sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app echo "::set-env name=CC::clang" echo "::set-env name=CXX::clang++" From e1b267e108cc4ea86e55e57f3c6f101f7d304021 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 16:55:29 +0000 Subject: [PATCH 4/8] Try fixing pre-xcode-11.0 macOS builds (#334) The output includes: The macOS virtual environment has been updated to Catalina (v10.15). Starting January 15th, jobs that include the line 'runs-on: macOS-10.14' will fail to run and return a failed check suite. Please update your workflow and change the line 'runs-on: macOS-10.14' to 'runs-on: macOS-latest'. --- .github/workflows/main.yml | 60 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9b55cd07..94ea99285 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,16 +46,16 @@ jobs: windows-2019-clang-cl, windows-2019-clang, windows-2019-gcc, - macOS-10.14-xcode-9.4.1, - macOS-10.14-xcode-10.0, - macOS-10.14-xcode-10.1, - macOS-10.14-xcode-10.2, - macOS-10.14-xcode-10.2.1, - macOS-10.14-xcode-10.3, - macOS-10.14-xcode-11.0, - macOS-10.14-gcc-7, - macOS-10.14-gcc-8, - macOS-10.14-gcc-9, + macOS-latest-xcode-9.4.1, + macOS-latest-xcode-10.0, + macOS-latest-xcode-10.1, + macOS-latest-xcode-10.2, + macOS-latest-xcode-10.2.1, + macOS-latest-xcode-10.3, + macOS-latest-xcode-11.0, + macOS-latest-gcc-7, + macOS-latest-gcc-8, + macOS-latest-gcc-9, ] include: @@ -181,53 +181,53 @@ jobs: os: windows-2019 compiler: gcc - - name: macOS-10.14-xcode-9.4.1 - os: macOS-10.14 + - name: macOS-latest-xcode-9.4.1 + os: macOS-latest compiler: xcode version: "9.4.1" - - name: macOS-10.14-xcode-10.0 - os: macOS-10.14 + - name: macOS-latest-xcode-10.0 + os: macOS-latest compiler: xcode version: "10" - - name: macOS-10.14-xcode-10.1 - os: macOS-10.14 + - name: macOS-latest-xcode-10.1 + os: macOS-latest compiler: xcode version: "10.1" - - name: macOS-10.14-Xcode-10.2 - os: macOS-10.14 + - name: macOS-latest-Xcode-10.2 + os: macOS-latest compiler: xcode version: "10.2" - - name: macOS-10.14-xcode-10.2.1 - os: macOS-10.14 + - name: macOS-latest-xcode-10.2.1 + os: macOS-latest compiler: xcode version: "10.2.1" - - name: macOS-10.14-xcode-10.3 - os: macOS-10.14 + - name: macOS-latest-xcode-10.3 + os: macOS-latest compiler: xcode version: "10.3" - - name: macOS-10.14-xcode-11.0 - os: macOS-10.14 + - name: macOS-latest-xcode-11.0 + os: macOS-latest compiler: xcode version: "11" - - name: macOS-10.14-gcc-7 - os: macOS-10.14 + - name: macOS-latest-gcc-7 + os: macOS-latest compiler: gcc version: "7" - - name: macOS-10.14-gcc-8 - os: macOS-10.14 + - name: macOS-latest-gcc-8 + os: macOS-latest compiler: gcc version: "8" - - name: macOS-10.14-gcc-9 - os: macOS-10.14 + - name: macOS-latest-gcc-9 + os: macOS-latest compiler: gcc version: "9" From 81b8a0672f3779712bc468692d6653e7df6ed475 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 17:12:39 +0000 Subject: [PATCH 5/8] Remove pre-xcode-11.0 macOS builds (#334) There are no longer available. See https://github.blog/changelog/2019-11-06-github-actions-macos-virtual-environment-updated-to-catalina/ which points to this: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners Which says that these XCode versions are now available: 11.0, 11.1, 11.2, 11.2.1, 11.3 --- .github/workflows/main.yml | 54 -------------------------------------- 1 file changed, 54 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94ea99285..d51863cf7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,16 +46,7 @@ jobs: windows-2019-clang-cl, windows-2019-clang, windows-2019-gcc, - macOS-latest-xcode-9.4.1, - macOS-latest-xcode-10.0, - macOS-latest-xcode-10.1, - macOS-latest-xcode-10.2, - macOS-latest-xcode-10.2.1, - macOS-latest-xcode-10.3, macOS-latest-xcode-11.0, - macOS-latest-gcc-7, - macOS-latest-gcc-8, - macOS-latest-gcc-9, ] include: @@ -181,56 +172,11 @@ jobs: os: windows-2019 compiler: gcc - - name: macOS-latest-xcode-9.4.1 - os: macOS-latest - compiler: xcode - version: "9.4.1" - - - name: macOS-latest-xcode-10.0 - os: macOS-latest - compiler: xcode - version: "10" - - - name: macOS-latest-xcode-10.1 - os: macOS-latest - compiler: xcode - version: "10.1" - - - name: macOS-latest-Xcode-10.2 - os: macOS-latest - compiler: xcode - version: "10.2" - - - name: macOS-latest-xcode-10.2.1 - os: macOS-latest - compiler: xcode - version: "10.2.1" - - - name: macOS-latest-xcode-10.3 - os: macOS-latest - compiler: xcode - version: "10.3" - - name: macOS-latest-xcode-11.0 os: macOS-latest compiler: xcode version: "11" - - name: macOS-latest-gcc-7 - os: macOS-latest - compiler: gcc - version: "7" - - - name: macOS-latest-gcc-8 - os: macOS-latest - compiler: gcc - version: "8" - - - name: macOS-latest-gcc-9 - os: macOS-latest - compiler: gcc - version: "9" - steps: - uses: actions/checkout@v1 From 3d5dfa92ae490eb54fd0aa165596ff15626afbd0 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 17:18:10 +0000 Subject: [PATCH 6/8] Explicitly request xcode 11.0 and 11.3 (#334) The currently-available versions are as follows, so pick the oldest and the newest of these. 11.0, 11.1, 11.2, 11.2.1, 11.3 --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d51863cf7..f863eb75a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,6 +47,7 @@ jobs: windows-2019-clang, windows-2019-gcc, macOS-latest-xcode-11.0, + macOS-latest-xcode-11.3, ] include: @@ -175,7 +176,12 @@ jobs: - name: macOS-latest-xcode-11.0 os: macOS-latest compiler: xcode - version: "11" + version: "11.0" + + - name: macOS-latest-xcode-11.3 + os: macOS-latest + compiler: xcode + version: "11.3" steps: - uses: actions/checkout@v1 From 9147b2d163463ea6af6276a67bc2dbf4ddb31f53 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 17:23:54 +0000 Subject: [PATCH 7/8] Partially revert previous commit (#334) 11.0 does need to be specified to xcode-select as 11 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f863eb75a..262cb7482 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -176,7 +176,7 @@ jobs: - name: macOS-latest-xcode-11.0 os: macOS-latest compiler: xcode - version: "11.0" + version: "11" - name: macOS-latest-xcode-11.3 os: macOS-latest From bcdd202eb132285a0f836c24677d29ae594554fc Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 7 Feb 2020 18:51:00 +0000 Subject: [PATCH 8/8] Add github Build Badges to README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 1bda22821..0fb80e111 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ Windows + + All + @@ -28,6 +31,9 @@ Windows + + All +