From 1a7d0e48ae25f3a2f4782e28e95b93667ce913c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 12:51:36 +0100 Subject: [PATCH 01/42] Update linux_build.yaml Debug variables --- .github/workflows/linux_build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 9129d5258a..9ac46e015a 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -27,6 +27,9 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 + - name: Debug + run: | + echo ${GITHUB_WORKSPACE} - name: get QuantLib run: | git submodule update --init From 6ac5ddc9d75f37e67e9eac051dadab101ba7d1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 13:22:24 +0100 Subject: [PATCH 02/42] Update linux_build.yaml Fix indent issue --- .github/workflows/linux_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 9ac46e015a..e7b155cbd5 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Debug - run: | + run: | echo ${GITHUB_WORKSPACE} - name: get QuantLib run: | From cc568c0f2a2b2327c02e50844c53fc2ab0b091d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 13:31:21 +0100 Subject: [PATCH 03/42] Make action more readable. Configure with tests enabled. --- .github/workflows/linux_build.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index e7b155cbd5..d2f465ee8f 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -38,7 +38,20 @@ jobs: sudo apt update sudo apt install -y libboost-all-dev libboost-test-dev ninja-build - name: cmake configure - run : mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=false -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -G "Ninja" .. + run : | + mkdir build + cd build + cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=false \ + -DQL_BUILD_EXAMPLES=false \ + -DQL_BUILD_TEST_SUITE=false \ + -DQL_BUILD_BENCHMARK=false \ + -DQL_ENABLE_SESSIONS=true \ + -DORE_BUILD_DOC=false \ + -DORE_BUILD_EXAMPLES=false \ + -DORE_BUILD_APP=true \ + -DORE_BUILD_TESTS=true \ + -L - name: cmake build run: cd build/; pwd; cmake --build . -j $(nproc) - name: Save executables as artifacts @@ -46,4 +59,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: ore-exe-linux - path: /home/runner/work/Engine/Engine/build/App/ore + path: ${GITHUB_WORKSPACE}/build/App/ore From 995c44c2508f71f8a427cc7da22d23f348c666c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 14:35:10 +0100 Subject: [PATCH 04/42] Save OREData tests as artifacts --- .github/workflows/linux_build.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index d2f465ee8f..b9f4d4d32d 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -54,9 +54,29 @@ jobs: -L - name: cmake build run: cd build/; pwd; cmake --build . -j $(nproc) + - name: Save tests artifacts + uses: actions/upload-artifact@v3 + with: + name: ored-test-suite + path: ${GITHUB_WORKSPACE}/build/OREData/test/ored-test-suite - name: Save executables as artifacts if: startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 with: name: ore-exe-linux path: ${GITHUB_WORKSPACE}/build/App/ore + +# Run tests + tests: + name: testing + runs-on: ubuntu-22.04 + needs: build + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: ored-test-suite + path: ${GITHUB_WORKSPACE}/build/OREData/test/ored-test-suite + - name: run OREData tests + run: | + ${GITHUB_WORKSPACE}/build/OREData/test/ored-test-suite -- --base_data_path=OREData/test From f1c3e20216225f000236038a6a0deef13f10115a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 15:34:17 +0100 Subject: [PATCH 05/42] Debug build output --- .github/workflows/linux_build.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index b9f4d4d32d..0443a79469 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -54,6 +54,11 @@ jobs: -L - name: cmake build run: cd build/; pwd; cmake --build . -j $(nproc) + - name: Debug + run: | + ls ${GITHUB_WORKSPACE}/build + ls ${GITHUB_WORKSPACE}/build/OREData + ls ${GITHUB_WORKSPACE}/build/OREData/test - name: Save tests artifacts uses: actions/upload-artifact@v3 with: From 19ebcb3172001f87b79184e031973a9eda7bf66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 16:34:28 +0100 Subject: [PATCH 06/42] Switch workspace variable --- .github/workflows/linux_build.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 0443a79469..f6e0c0a863 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -56,20 +56,18 @@ jobs: run: cd build/; pwd; cmake --build . -j $(nproc) - name: Debug run: | - ls ${GITHUB_WORKSPACE}/build - ls ${GITHUB_WORKSPACE}/build/OREData - ls ${GITHUB_WORKSPACE}/build/OREData/test + ls ${{ github.workspace }} - name: Save tests artifacts uses: actions/upload-artifact@v3 with: name: ored-test-suite - path: ${GITHUB_WORKSPACE}/build/OREData/test/ored-test-suite + path: ${{ github.workspace }}/build/OREData/test/ored-test-suite - name: Save executables as artifacts if: startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 with: name: ore-exe-linux - path: ${GITHUB_WORKSPACE}/build/App/ore + path: ${{ github.workspace }}/build/App/ore # Run tests tests: @@ -81,7 +79,7 @@ jobs: uses: actions/download-artifact@v4 with: name: ored-test-suite - path: ${GITHUB_WORKSPACE}/build/OREData/test/ored-test-suite + path: ${{ github.workspace }}/build/OREData/test/ored-test-suite - name: run OREData tests run: | - ${GITHUB_WORKSPACE}/build/OREData/test/ored-test-suite -- --base_data_path=OREData/test + ${{ github.workspace }}/build/OREData/test/ored-test-suite -- --base_data_path=OREData/test From 090287ffc913e59c281427f4a300f80d9d016118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 17:43:07 +0100 Subject: [PATCH 07/42] Testing compatible version for download artifact --- .github/workflows/linux_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index f6e0c0a863..bf489eaf51 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -76,7 +76,7 @@ jobs: needs: build steps: - name: Download Artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: ored-test-suite path: ${{ github.workspace }}/build/OREData/test/ored-test-suite From ebc56f1d7ed3d4053f4a6cf1f24deb1ce9882119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Mon, 11 Mar 2024 18:25:06 +0100 Subject: [PATCH 08/42] Uploading the remaining test artifacts --- .github/workflows/linux_build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index bf489eaf51..3a4a6531fd 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -61,7 +61,10 @@ jobs: uses: actions/upload-artifact@v3 with: name: ored-test-suite - path: ${{ github.workspace }}/build/OREData/test/ored-test-suite + path: | + ${{ github.workspace }}/build/OREData/test/ored-test-suite + ${{ github.workspace }}/build/OREAnalytics/test/orea-test-suite + ${{ github.workspace }}/build/QuantExt/test/quantext-test-suite - name: Save executables as artifacts if: startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 From 289ba965decd00f500116415eb851a9f77ad6919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 08:36:20 +0100 Subject: [PATCH 09/42] Debug testing section --- .github/workflows/linux_build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 3a4a6531fd..8d61866e45 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -83,6 +83,9 @@ jobs: with: name: ored-test-suite path: ${{ github.workspace }}/build/OREData/test/ored-test-suite + - name: Debug + run: | + ls -ltrha ${{ github.workspace }}/build/OREData/test/ored-test-suite - name: run OREData tests run: | ${{ github.workspace }}/build/OREData/test/ored-test-suite -- --base_data_path=OREData/test From 21a9ef69c5108e4ad71a85356f4fd6e7f1ded275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 10:00:34 +0100 Subject: [PATCH 10/42] Rename upload name --- .github/workflows/linux_build.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 8d61866e45..457de06d76 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -60,7 +60,7 @@ jobs: - name: Save tests artifacts uses: actions/upload-artifact@v3 with: - name: ored-test-suite + name: test-suites path: | ${{ github.workspace }}/build/OREData/test/ored-test-suite ${{ github.workspace }}/build/OREAnalytics/test/orea-test-suite @@ -78,14 +78,15 @@ jobs: runs-on: ubuntu-22.04 needs: build steps: + - uses: actions/checkout@v4 - name: Download Artifact uses: actions/download-artifact@v3 with: - name: ored-test-suite - path: ${{ github.workspace }}/build/OREData/test/ored-test-suite + name: test-suites + path: ${{ github.workspace }}/test-suites - name: Debug run: | - ls -ltrha ${{ github.workspace }}/build/OREData/test/ored-test-suite + ls -ltrha ${{ github.workspace }}/test-suites - name: run OREData tests run: | - ${{ github.workspace }}/build/OREData/test/ored-test-suite -- --base_data_path=OREData/test + ${{ github.workspace }}/test-suites/ored-test-suite -- --base_data_path=Engine/OREData/test From 86a0c5d4c68aa16bda5051eafe9088946ce42934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 10:58:42 +0100 Subject: [PATCH 11/42] Fix suite path --- .github/workflows/linux_build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 457de06d76..9b5a1cdb2c 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -87,6 +87,8 @@ jobs: - name: Debug run: | ls -ltrha ${{ github.workspace }}/test-suites + ls -ltrha ${{ github.workspace }}/test-suites/OREData + ls -ltrha ${{ github.workspace }}/test-suites/OREData/test - name: run OREData tests run: | - ${{ github.workspace }}/test-suites/ored-test-suite -- --base_data_path=Engine/OREData/test + ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=Engine/OREData/test From 44cbfd936761779310ebf328a82ccb9dcdb50d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 12:04:13 +0100 Subject: [PATCH 12/42] Try fix permission denied --- .github/workflows/linux_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 9b5a1cdb2c..7b4cfd8a84 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -89,6 +89,7 @@ jobs: ls -ltrha ${{ github.workspace }}/test-suites ls -ltrha ${{ github.workspace }}/test-suites/OREData ls -ltrha ${{ github.workspace }}/test-suites/OREData/test + chmod +x ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite - name: run OREData tests run: | ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=Engine/OREData/test From 65be4f7fb284c0cdda78c95d8afa288475fd6f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 5 Dec 2023 09:50:18 +0100 Subject: [PATCH 13/42] Update commonSettings.cmake Link boost static for Linux also when static libs enabled. --- cmake/commonSettings.cmake | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index be4a4a2b05..21724c2fdc 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -137,9 +137,29 @@ else() set(BUILD_SHARED_LIBS ON) endif() - # link against dynamic boost libraries - add_definitions(-DBOOST_ALL_DYN_LINK) - add_definitions(-DBOOST_TEST_DYN_LINK) + # link against static boost libraries + if(NOT DEFINED Boost_USE_STATIC_LIBS) + if(BUILD_SHARED_LIBS) + set(Boost_USE_STATIC_LIBS 0) + else() + set(Boost_USE_STATIC_LIBS 1) + endif() + endif() + + # Boost static runtime ON for MSVC + if(NOT DEFINED Boost_USE_STATIC_RUNTIME) + if(BUILD_SHARED_LIBS) + set(Boost_USE_STATIC_RUNTIME 0) + else() + set(Boost_USE_STATIC_RUNTIME 1) + endif() + endif() + + if(NOT Boost_USE_STATIC_LIBS) + # link against dynamic boost libraries + add_definitions(-DBOOST_ALL_DYN_LINK) + add_definitions(-DBOOST_TEST_DYN_LINK) + endif() # avoid a crash in valgrind that sometimes occurs if this flag is not defined add_definitions(-DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) From 8a60ac78858a4478be4fe7c4764bda1b596daeec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 5 Dec 2023 11:48:12 +0100 Subject: [PATCH 14/42] Use boost release --- cmake/commonSettings.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index 21724c2fdc..a5258ee9de 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -140,21 +140,25 @@ else() # link against static boost libraries if(NOT DEFINED Boost_USE_STATIC_LIBS) if(BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS 0) + set(Boost_USE_STATIC_LIBS OFF) else() - set(Boost_USE_STATIC_LIBS 1) + set(Boost_USE_STATIC_LIBS ON) endif() endif() # Boost static runtime ON for MSVC if(NOT DEFINED Boost_USE_STATIC_RUNTIME) if(BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_RUNTIME 0) + set(Boost_USE_STATIC_RUNTIME OFF) else() - set(Boost_USE_STATIC_RUNTIME 1) + set(Boost_USE_STATIC_RUNTIME ON) endif() endif() + # Use Boost Release + set(Boost_USE_DEBUG_LIBS OFF) + set(Boost_USE_RELEASE_LIBS ON) + if(NOT Boost_USE_STATIC_LIBS) # link against dynamic boost libraries add_definitions(-DBOOST_ALL_DYN_LINK) From b94d897d0694828fe734b21e950f7113dc18fc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 5 Dec 2023 11:54:27 +0100 Subject: [PATCH 15/42] Update commonSettings.cmake No system boost finder --- cmake/commonSettings.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index a5258ee9de..240f58687e 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -158,6 +158,7 @@ else() # Use Boost Release set(Boost_USE_DEBUG_LIBS OFF) set(Boost_USE_RELEASE_LIBS ON) + set(Boost_NO_BOOST_CMAKE ON) if(NOT Boost_USE_STATIC_LIBS) # link against dynamic boost libraries From 2d8da8afcc10d581e157f06e670e5ff0fd4676fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 5 Dec 2023 13:55:23 +0100 Subject: [PATCH 16/42] Update commonSettings.cmkae Check build type for boost. Add version check for boost CMake finder issue. --- cmake/commonSettings.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index 240f58687e..a76597a4cc 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -156,9 +156,17 @@ else() endif() # Use Boost Release - set(Boost_USE_DEBUG_LIBS OFF) - set(Boost_USE_RELEASE_LIBS ON) - set(Boost_NO_BOOST_CMAKE ON) + if(CMAKE_BUILD_TYPE MATCHES Release) + set(Boost_USE_DEBUG_LIBS OFF) + set(Boost_USE_RELEASE_LIBS ON) + elseif(CMAKE_BUILD_TYPE MATCHES Debug) + set(Boost_USE_DEBUG_LIBS ON) + set(Boost_USE_RELEASE_LIBS OFF) + endif() + # Issue with Boost CMake finder introduced in version 1.70 + if(Boost_VERSION VERSION_GREATER_EQUAL "1.70.0") + set(Boost_NO_BOOST_CMAKE ON) + endif() if(NOT Boost_USE_STATIC_LIBS) # link against dynamic boost libraries From 5e88f4316f63306c3437f791205843588f3ebec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 5 Dec 2023 14:01:10 +0100 Subject: [PATCH 17/42] Update commonSettings.cmake Update comments. --- cmake/commonSettings.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index a76597a4cc..25d2eb9500 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -146,7 +146,7 @@ else() endif() endif() - # Boost static runtime ON for MSVC + # Boost static runtime if(NOT DEFINED Boost_USE_STATIC_RUNTIME) if(BUILD_SHARED_LIBS) set(Boost_USE_STATIC_RUNTIME OFF) @@ -155,7 +155,7 @@ else() endif() endif() - # Use Boost Release + # Use Boost Release/Debug if(CMAKE_BUILD_TYPE MATCHES Release) set(Boost_USE_DEBUG_LIBS OFF) set(Boost_USE_RELEASE_LIBS ON) From ad3abf1f31414777e9615cb13d0d5ff45983a575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 5 Dec 2023 15:14:32 +0100 Subject: [PATCH 18/42] Update commonSettings.cmake No boost version specified at module read time. --- cmake/commonSettings.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index 25d2eb9500..3bc8a9a927 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -164,9 +164,7 @@ else() set(Boost_USE_RELEASE_LIBS OFF) endif() # Issue with Boost CMake finder introduced in version 1.70 - if(Boost_VERSION VERSION_GREATER_EQUAL "1.70.0") - set(Boost_NO_BOOST_CMAKE ON) - endif() + set(Boost_NO_BOOST_CMAKE ON) if(NOT Boost_USE_STATIC_LIBS) # link against dynamic boost libraries From d1b2a2374ad200a430f936e2adf60bf80160c070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 2 Jan 2024 12:19:43 +0100 Subject: [PATCH 19/42] Update commonSettings.cmake Unify boost setting for MSVC and all other compilers. --- cmake/commonSettings.cmake | 93 +++++++++++++++----------------------- 1 file changed, 36 insertions(+), 57 deletions(-) diff --git a/cmake/commonSettings.cmake b/cmake/commonSettings.cmake index 3bc8a9a927..1b5dac8f73 100644 --- a/cmake/commonSettings.cmake +++ b/cmake/commonSettings.cmake @@ -69,30 +69,6 @@ if(MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>$<$:DLL>") - # link against static boost libraries - if(NOT DEFINED Boost_USE_STATIC_LIBS) - if(BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS 0) - else() - set(Boost_USE_STATIC_LIBS 1) - endif() - endif() - - # Boost static runtime ON for MSVC - if(NOT DEFINED Boost_USE_STATIC_RUNTIME) - if(BUILD_SHARED_LIBS OR(MSVC AND MSVC_LINK_DYNAMIC_RUNTIME)) - set(Boost_USE_STATIC_RUNTIME 0) - else() - set(Boost_USE_STATIC_RUNTIME 1) - endif() - endif() - - - - IF(NOT Boost_USE_STATIC_LIBS) - add_definitions(-DBOOST_ALL_DYN_LINK) - add_definitions(-DBOOST_TEST_DYN_LINK) - endif() add_compile_options(/external:env:BOOST) add_compile_options(/external:W0) add_compile_definitions(_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING) @@ -137,41 +113,9 @@ else() set(BUILD_SHARED_LIBS ON) endif() - # link against static boost libraries - if(NOT DEFINED Boost_USE_STATIC_LIBS) - if(BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS OFF) - else() - set(Boost_USE_STATIC_LIBS ON) - endif() - endif() - - # Boost static runtime - if(NOT DEFINED Boost_USE_STATIC_RUNTIME) - if(BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_RUNTIME OFF) - else() - set(Boost_USE_STATIC_RUNTIME ON) - endif() - endif() - - # Use Boost Release/Debug - if(CMAKE_BUILD_TYPE MATCHES Release) - set(Boost_USE_DEBUG_LIBS OFF) - set(Boost_USE_RELEASE_LIBS ON) - elseif(CMAKE_BUILD_TYPE MATCHES Debug) - set(Boost_USE_DEBUG_LIBS ON) - set(Boost_USE_RELEASE_LIBS OFF) - endif() # Issue with Boost CMake finder introduced in version 1.70 set(Boost_NO_BOOST_CMAKE ON) - if(NOT Boost_USE_STATIC_LIBS) - # link against dynamic boost libraries - add_definitions(-DBOOST_ALL_DYN_LINK) - add_definitions(-DBOOST_TEST_DYN_LINK) - endif() - # avoid a crash in valgrind that sometimes occurs if this flag is not defined add_definitions(-DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) @@ -227,9 +171,44 @@ else() # if QuantLib is build separately include_directories("${CMAKE_CURRENT_LIST_DIR}/../QuantLib/build") - endif() +# Boost # +# link against static boost libraries +if(NOT DEFINED Boost_USE_STATIC_LIBS) + if(BUILD_SHARED_LIBS) + set(Boost_USE_STATIC_LIBS OFF) + else() + set(Boost_USE_STATIC_LIBS ON) + endif() +endif() + +# Boost static runtime. ON for MSVC +if(NOT DEFINED Boost_USE_STATIC_RUNTIME) + if(BUILD_SHARED_LIBS OR(MSVC AND MSVC_LINK_DYNAMIC_RUNTIME)) + set(Boost_USE_STATIC_RUNTIME OFF) + else() + set(Boost_USE_STATIC_RUNTIME ON) + endif() +endif() + +if(NOT Boost_USE_STATIC_LIBS) + # link against dynamic boost libraries + add_definitions(-DBOOST_ALL_DYN_LINK) + add_definitions(-DBOOST_TEST_DYN_LINK) +endif() + +# Use Boost Release/Debug +if(CMAKE_BUILD_TYPE MATCHES Release) + set(Boost_USE_DEBUG_LIBS OFF) + set(Boost_USE_RELEASE_LIBS ON) +elseif(CMAKE_BUILD_TYPE MATCHES Debug) + set(Boost_USE_DEBUG_LIBS ON) + set(Boost_USE_RELEASE_LIBS OFF) +endif() + +# Boost end # + # workaround when building with boost 1.81, see https://github.com/boostorg/phoenix/issues/111 add_definitions(-DBOOST_PHOENIX_STL_TUPLE_H_) From 234a6d93861d3889ea699763c8d44dd67881f36e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 13:24:38 +0100 Subject: [PATCH 20/42] Must link boost statically --- .github/workflows/linux_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 7b4cfd8a84..59acc2b3b8 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -51,6 +51,7 @@ jobs: -DORE_BUILD_EXAMPLES=false \ -DORE_BUILD_APP=true \ -DORE_BUILD_TESTS=true \ + -DBUILD_SHARED_LIBS=false \ -L - name: cmake build run: cd build/; pwd; cmake --build . -j $(nproc) From 0f11396dd11841228327a8eb281c9b5d479af0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 14:24:09 +0100 Subject: [PATCH 21/42] Change base data path --- .github/workflows/linux_build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 59acc2b3b8..eac30a9043 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -93,4 +93,6 @@ jobs: chmod +x ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite - name: run OREData tests run: | - ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=Engine/OREData/test + ls -ltrha + pwd + ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=./Engine/OREData/test From f0bb8fd927de536c573ffcc0a076c4d125b28086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 14:49:28 +0100 Subject: [PATCH 22/42] Test check path --- .github/workflows/linux_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index eac30a9043..e70cd78f17 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -95,4 +95,5 @@ jobs: run: | ls -ltrha pwd + ls -ltrha ./Engine/OREData/test ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=./Engine/OREData/test From ab597e77a5e8f1cc4074472846c75eb26fdcf94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 14:51:08 +0100 Subject: [PATCH 23/42] Improve readability --- .github/workflows/linux_build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index e70cd78f17..3af144d55f 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -54,7 +54,9 @@ jobs: -DBUILD_SHARED_LIBS=false \ -L - name: cmake build - run: cd build/; pwd; cmake --build . -j $(nproc) + run: | + cd build + cmake --build . -j $(nproc) - name: Debug run: | ls ${{ github.workspace }} From 43b40070fabe3303fde3ff9a295f817deee7eada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 15:03:28 +0100 Subject: [PATCH 24/42] Update to v4 --- .github/workflows/linux_build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 3af144d55f..bea39c385f 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -61,7 +61,7 @@ jobs: run: | ls ${{ github.workspace }} - name: Save tests artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-suites path: | @@ -83,7 +83,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: test-suites path: ${{ github.workspace }}/test-suites From 8823a13d30c8306f60b75027ca7d6db808bf4a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 15:25:50 +0100 Subject: [PATCH 25/42] Correcting base data path --- .github/workflows/linux_build.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index bea39c385f..3c82022984 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -86,16 +86,16 @@ jobs: uses: actions/download-artifact@v4 with: name: test-suites - path: ${{ github.workspace }}/test-suites + path: ${{ github.workspace }}/test-suites - name: Debug run: | - ls -ltrha ${{ github.workspace }}/test-suites - ls -ltrha ${{ github.workspace }}/test-suites/OREData - ls -ltrha ${{ github.workspace }}/test-suites/OREData/test - chmod +x ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite + pwd + ls -ltrha ./OREData/test + ls -ltrha ./OREAnalytics/test + ls -ltrha ./QuantExt/test - name: run OREData tests run: | - ls -ltrha pwd - ls -ltrha ./Engine/OREData/test - ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=./Engine/OREData/test + ls -ltrha ./OREData/test + chmod +x ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite + ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=./OREData/test From ce58d00269f11611d9d50fd0041026f521227c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 16:28:31 +0100 Subject: [PATCH 26/42] Cleanup and use relative path instead --- .github/workflows/linux_build.yaml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 3c82022984..fc4c309f02 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -27,9 +27,6 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Debug - run: | - echo ${GITHUB_WORKSPACE} - name: get QuantLib run: | git submodule update --init @@ -86,16 +83,8 @@ jobs: uses: actions/download-artifact@v4 with: name: test-suites - path: ${{ github.workspace }}/test-suites - - name: Debug - run: | - pwd - ls -ltrha ./OREData/test - ls -ltrha ./OREAnalytics/test - ls -ltrha ./QuantExt/test + path: ${{ github.workspace }}/test-suites - name: run OREData tests run: | - pwd - ls -ltrha ./OREData/test - chmod +x ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite - ${{ github.workspace }}/test-suites/OREData/test/ored-test-suite -- --base_data_path=./OREData/test + chmod +x ./test-suites/OREData/test/ored-test-suite + ./test-suites/OREData/test/ored-test-suite -- --base_data_path=./OREData/test From adc494230c4eddffe8d6f6c7fa6881ad4bdfd6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 16:40:06 +0100 Subject: [PATCH 27/42] Fix review comment, cleanup --- .github/workflows/linux_build.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index fc4c309f02..9ffe113229 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -54,9 +54,6 @@ jobs: run: | cd build cmake --build . -j $(nproc) - - name: Debug - run: | - ls ${{ github.workspace }} - name: Save tests artifacts uses: actions/upload-artifact@v4 with: From a2a5389ab6bd65e0b39be7923a6ba4e22b60e74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Tue, 12 Mar 2024 17:26:04 +0100 Subject: [PATCH 28/42] Add remaining test suites --- .github/workflows/linux_build.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 9ffe113229..121a6a704f 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -81,7 +81,15 @@ jobs: with: name: test-suites path: ${{ github.workspace }}/test-suites + - name: run QuantExt tests + run: | + chmod +x ./test-suites/QuantExt/test/quantext-test-suite + ./test-suites/QuantExt/test/quantext-test-suite - name: run OREData tests run: | chmod +x ./test-suites/OREData/test/ored-test-suite ./test-suites/OREData/test/ored-test-suite -- --base_data_path=./OREData/test + - name: run OREAnalytics tests + run: | + chmod +x ./test-suites/OREAnalytics/test/orea-test-suite + ./test-suites/OREAnalytics/test/orea-test-suite From 578ad5f5b54fec1c880d80f739dad1a047987f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 09:05:40 +0100 Subject: [PATCH 29/42] Remove duplicate configuration --- .github/workflows/linux_build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linux_build.yaml b/.github/workflows/linux_build.yaml index 121a6a704f..f3103506de 100644 --- a/.github/workflows/linux_build.yaml +++ b/.github/workflows/linux_build.yaml @@ -48,7 +48,6 @@ jobs: -DORE_BUILD_EXAMPLES=false \ -DORE_BUILD_APP=true \ -DORE_BUILD_TESTS=true \ - -DBUILD_SHARED_LIBS=false \ -L - name: cmake build run: | From 00afae1960b0c2b9282e19bb0a80eed9e6bde9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 09:06:10 +0100 Subject: [PATCH 30/42] Make windows workflow more readable --- .github/workflows/build_windows.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 9b8bb323d8..8e6f8ed345 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -53,7 +53,18 @@ jobs: mkdir build cd build call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 - cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release \ + -DQL_BUILD_EXAMPLES=false \ + -DQL_BUILD_TEST_SUITE=false \ + -DQL_BUILD_BENCHMARK=false \ + -DQL_ENABLE_SESSIONS=true \ + -DORE_BUILD_DOC=false \ + -DORE_BUILD_EXAMPLES=false \ + -DORE_BUILD_APP=true \ + -DORE_BUILD_TESTS=true \ + -DBOOST_INCLUDEDIR=C:\local\boost \ + -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 \ + -L cmake --build . -j 2 --verbose - name: Save executables as artifacts #if: startsWith(github.ref, 'refs/tags/v') From e65ca7da5856b9a2086c347c2d511b83ae7f8112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 09:08:11 +0100 Subject: [PATCH 31/42] Separate windows workflow into configure and build --- .github/workflows/build_windows.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 8e6f8ed345..2778bc598f 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -45,7 +45,7 @@ jobs: (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost" choco install -y ninja - - name: cmake configure and build + - name: cmake configure env: BOOST_ROOT: C:\local\boost shell: cmd @@ -65,6 +65,9 @@ jobs: -DBOOST_INCLUDEDIR=C:\local\boost \ -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 \ -L + - name: cmake build + run: | + cd build cmake --build . -j 2 --verbose - name: Save executables as artifacts #if: startsWith(github.ref, 'refs/tags/v') From a5fe0b4abdbddbea391d5411221eba859cc6523c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 09:26:16 +0100 Subject: [PATCH 32/42] Fix powershell multiline --- .github/workflows/build_windows.yaml | 35 +++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 2778bc598f..0e10f99cca 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -53,22 +53,35 @@ jobs: mkdir build cd build call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 - cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release \ - -DQL_BUILD_EXAMPLES=false \ - -DQL_BUILD_TEST_SUITE=false \ - -DQL_BUILD_BENCHMARK=false \ - -DQL_ENABLE_SESSIONS=true \ - -DORE_BUILD_DOC=false \ - -DORE_BUILD_EXAMPLES=false \ - -DORE_BUILD_APP=true \ - -DORE_BUILD_TESTS=true \ - -DBOOST_INCLUDEDIR=C:\local\boost \ - -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 \ + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release ` + -DQL_BUILD_EXAMPLES=false ` + -DQL_BUILD_TEST_SUITE=false ` + -DQL_BUILD_BENCHMARK=false ` + -DQL_ENABLE_SESSIONS=true ` + -DORE_BUILD_DOC=false ` + -DORE_BUILD_EXAMPLES=false ` + -DORE_BUILD_APP=true ` + -DORE_BUILD_TESTS=true ` + -DBOOST_INCLUDEDIR=C:\local\boost ` + -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 ` -L - name: cmake build run: | cd build cmake --build . -j 2 --verbose + - name: Debug + run: | + pwd + ls -ltrha ./build + echo ${{ github.workspace }} + - name: Save tests artifacts + uses: actions/upload-artifact@v4 + with: + name: test-suites + path: | + ${{ github.workspace }}/build/OREData/test/ored-test-suite + ${{ github.workspace }}/build/OREAnalytics/test/orea-test-suite + ${{ github.workspace }}/build/QuantExt/test/quantext-test-suite - name: Save executables as artifacts #if: startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 From b17edbc47efb5c672888b985714f7a20ca38778d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 09:35:57 +0100 Subject: [PATCH 33/42] Cannot use multiline in cmd --- .github/workflows/build_windows.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 0e10f99cca..4b71600fa4 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -53,18 +53,7 @@ jobs: mkdir build cd build call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 - cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release ` - -DQL_BUILD_EXAMPLES=false ` - -DQL_BUILD_TEST_SUITE=false ` - -DQL_BUILD_BENCHMARK=false ` - -DQL_ENABLE_SESSIONS=true ` - -DORE_BUILD_DOC=false ` - -DORE_BUILD_EXAMPLES=false ` - -DORE_BUILD_APP=true ` - -DORE_BUILD_TESTS=true ` - -DBOOST_INCLUDEDIR=C:\local\boost ` - -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 ` - -L + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DORE_BUILD_EXAMPLES=false -DORE_BUILD_APP=true -DORE_BUILD_TESTS=true -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L - name: cmake build run: | cd build From ca6a1548a9dde1c1c8ef4746d674b8401b26257a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 10:16:30 +0100 Subject: [PATCH 34/42] Need sdk loaded --- .github/workflows/build_windows.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 4b71600fa4..906de93353 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -45,7 +45,7 @@ jobs: (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost" choco install -y ninja - - name: cmake configure + - name: cmake configure and build env: BOOST_ROOT: C:\local\boost shell: cmd @@ -54,9 +54,6 @@ jobs: cd build call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DORE_BUILD_EXAMPLES=false -DORE_BUILD_APP=true -DORE_BUILD_TESTS=true -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L - - name: cmake build - run: | - cd build cmake --build . -j 2 --verbose - name: Debug run: | From 26efdd17fc6284b25e3d1f41d47b28c8e852fe68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 10:39:42 +0100 Subject: [PATCH 35/42] Use 4 cores in windows --- .github/workflows/build_windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 906de93353..0bb6024f36 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -54,7 +54,7 @@ jobs: cd build call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DORE_BUILD_EXAMPLES=false -DORE_BUILD_APP=true -DORE_BUILD_TESTS=true -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L - cmake --build . -j 2 --verbose + cmake --build . -j 4 --verbose - name: Debug run: | pwd From 230bf3d931500ec4705ee3bf4f70b009d72eb1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 11:45:33 +0100 Subject: [PATCH 36/42] Fix powershell command --- .github/workflows/build_windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 0bb6024f36..5169890150 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -58,7 +58,7 @@ jobs: - name: Debug run: | pwd - ls -ltrha ./build + ls ./build echo ${{ github.workspace }} - name: Save tests artifacts uses: actions/upload-artifact@v4 From 580c30be54220aa822b1e1023c57c3fc039368ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 11:53:24 +0100 Subject: [PATCH 37/42] Run tests --- .github/workflows/build_windows.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 5169890150..a5707a0910 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -73,4 +73,25 @@ jobs: uses: actions/upload-artifact@v3 with: name: ore-windows-${{ matrix.arch }} - path: D:\a\Engine\Engine\build\App\ore.exe \ No newline at end of file + path: D:\a\Engine\Engine\build\App\ore.exe + + tests: + name: testing + runs-on: windows-2022 + needs: build + steps: + - uses: actions/checkout@v4 + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: test-suites + path: ${{ github.workspace }}/test-suites + - name: run QuantExt tests + run: | + .\test-suites\QuantExt\test\quantext-test-suite + - name: run OREData tests + run: | + .\test-suites\OREData\test\ored-test-suite -- --base_data_path=.\OREData\test + - name: run OREAnalytics tests + run: | + .\test-suites\OREAnalytics\test\orea-test-suite From e7a66744e04cbbcf8533996d1e86cff9be3aa2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 13:03:11 +0100 Subject: [PATCH 38/42] Fix upload path --- .github/workflows/build_windows.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index a5707a0910..e038150a11 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -58,16 +58,16 @@ jobs: - name: Debug run: | pwd - ls ./build + ls .\build\OREData\test echo ${{ github.workspace }} - name: Save tests artifacts uses: actions/upload-artifact@v4 with: name: test-suites path: | - ${{ github.workspace }}/build/OREData/test/ored-test-suite - ${{ github.workspace }}/build/OREAnalytics/test/orea-test-suite - ${{ github.workspace }}/build/QuantExt/test/quantext-test-suite + ${{ github.workspace }}\build\OREData\test\ored-test-suite + ${{ github.workspace }}\build\OREAnalytics\test\orea-test-suite + ${{ github.workspace }}\build\QuantExt\test\quantext-test-suite - name: Save executables as artifacts #if: startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 From deaabff893dfca8c7f731d88638c751d0e6802b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 13:47:51 +0100 Subject: [PATCH 39/42] Fix path mistake for download artifact --- .github/workflows/build_windows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index e038150a11..34d6dda3d1 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -73,7 +73,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: ore-windows-${{ matrix.arch }} - path: D:\a\Engine\Engine\build\App\ore.exe + path: ${{ github.workspace }}\build\App\ore.exe tests: name: testing @@ -85,7 +85,7 @@ jobs: uses: actions/download-artifact@v4 with: name: test-suites - path: ${{ github.workspace }}/test-suites + path: ${{ github.workspace }}\test-suites - name: run QuantExt tests run: | .\test-suites\QuantExt\test\quantext-test-suite From f52e1efbccdfd00d39501f9ff053247aadea6717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 14:17:20 +0100 Subject: [PATCH 40/42] Need .exe file ending on windows --- .github/workflows/build_windows.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 34d6dda3d1..2afe9bc183 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -65,9 +65,9 @@ jobs: with: name: test-suites path: | - ${{ github.workspace }}\build\OREData\test\ored-test-suite - ${{ github.workspace }}\build\OREAnalytics\test\orea-test-suite - ${{ github.workspace }}\build\QuantExt\test\quantext-test-suite + ${{ github.workspace }}\build\OREData\test\ored-test-suite.exe + ${{ github.workspace }}\build\OREAnalytics\test\orea-test-suite.exe + ${{ github.workspace }}\build\QuantExt\test\quantext-test-suite.exe - name: Save executables as artifacts #if: startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 @@ -88,10 +88,10 @@ jobs: path: ${{ github.workspace }}\test-suites - name: run QuantExt tests run: | - .\test-suites\QuantExt\test\quantext-test-suite + .\test-suites\QuantExt\test\quantext-test-suite.exe - name: run OREData tests run: | - .\test-suites\OREData\test\ored-test-suite -- --base_data_path=.\OREData\test + .\test-suites\OREData\test\ored-test-suite.exe -- --base_data_path=.\OREData\test - name: run OREAnalytics tests run: | - .\test-suites\OREAnalytics\test\orea-test-suite + .\test-suites\OREAnalytics\test\orea-test-suite.exe From 82709916ac79e24520f3a4bffbe8003c640d9984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Wed, 13 Mar 2024 15:39:14 +0100 Subject: [PATCH 41/42] Only run tests for x64 and upload test artifacts --- .github/workflows/build_windows.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 2afe9bc183..b455b2051d 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -62,6 +62,7 @@ jobs: echo ${{ github.workspace }} - name: Save tests artifacts uses: actions/upload-artifact@v4 + if: ${{ matrix.arch == 'AMD64' }} with: name: test-suites path: | From 017d1c291fcc5b52eb7ce0f72360551b2a69e5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Sat, 16 Mar 2024 20:15:06 +0100 Subject: [PATCH 42/42] Cleanup debug --- .github/workflows/build_windows.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index b455b2051d..fbdd364700 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -55,11 +55,6 @@ jobs: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DORE_BUILD_EXAMPLES=false -DORE_BUILD_APP=true -DORE_BUILD_TESTS=true -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L cmake --build . -j 4 --verbose - - name: Debug - run: | - pwd - ls .\build\OREData\test - echo ${{ github.workspace }} - name: Save tests artifacts uses: actions/upload-artifact@v4 if: ${{ matrix.arch == 'AMD64' }}