From eca531e8d3382440c5e351c18600dece52588a03 Mon Sep 17 00:00:00 2001 From: magiblot Date: Sun, 1 Oct 2023 16:53:10 +0200 Subject: [PATCH] Github Actions: add libraries built with /MTd to MSVC artifacts --- .github/workflows/cmake.yml | 36 ++++++++++++++++++++++++------------ source/CMakeLists.txt | 2 +- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 96b2fc68..8673c517 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -78,25 +78,31 @@ jobs: shell: bash run: cmake . -A Win32 -DTV_USE_STATIC_RTL=ON - - name: Build + - name: Build (Release) (library, apps) + shell: bash + run: cmake --build . --config Release -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc) + + - name: Build (RelWithDebInfo) (library) shell: bash - run: cmake --build . --config $BUILD_TYPE -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc) + run: cmake --build . --config RelWithDebInfo --target tvision -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc) - name: Upload Examples uses: actions/upload-artifact@v3 with: name: examples-x86 path: | - ${{env.BUILD_TYPE}}/tvdemo.exe - ${{env.BUILD_TYPE}}/tvedit.exe - ${{env.BUILD_TYPE}}/tvhc.exe + Release/tvdemo.exe + Release/tvedit.exe + Release/tvhc.exe - name: Upload Library uses: actions/upload-artifact@v3 with: name: library-x86 path: | - ${{env.BUILD_TYPE}}/tvision.lib + Release/tvision.lib + RelWithDebInfo/tvision-relwithdebinfo.lib + RelWithDebInfo/tvision-relwithdebinfo.pdb build-windows-msvc64: name: Windows (MSVC) (x64) @@ -108,25 +114,31 @@ jobs: shell: bash run: cmake . -A x64 -DTV_USE_STATIC_RTL=ON - - name: Build + - name: Build (Release) (library, apps) + shell: bash + run: cmake --build . --config Release -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc) + + - name: Build (RelWithDebInfo) (library) shell: bash - run: cmake --build . --config $BUILD_TYPE -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc) + run: cmake --build . --config RelWithDebInfo --target tvision -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc) - name: Upload Examples uses: actions/upload-artifact@v3 with: name: examples-x64 path: | - ${{env.BUILD_TYPE}}/tvdemo.exe - ${{env.BUILD_TYPE}}/tvedit.exe - ${{env.BUILD_TYPE}}/tvhc.exe + Release/tvdemo.exe + Release/tvedit.exe + Release/tvhc.exe - name: Upload Library uses: actions/upload-artifact@v3 with: name: library-x64 path: | - ${{env.BUILD_TYPE}}/tvision.lib + Release/tvision.lib + RelWithDebInfo/tvision-relwithdebinfo.lib + RelWithDebInfo/tvision-relwithdebinfo.pdb build-windows-mingw: name: Windows (MinGW) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 23529276..cee6f760 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -54,7 +54,7 @@ endforeach() if (TV_USE_STATIC_RTL) # Implies MSVC target_compile_options(${PROJECT_NAME} PUBLIC - /MT$<$:d> + /MT$<$,$>:d> ) endif()