From 37a92f6ae19afe9029cba513893795c803a48b40 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Tue, 4 Nov 2025 12:40:37 +0100 Subject: [PATCH 1/4] Add missing include in Playlist.cpp --- src/playlist/Playlist.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/playlist/Playlist.cpp b/src/playlist/Playlist.cpp index 5096a989a..6c609eddd 100644 --- a/src/playlist/Playlist.cpp +++ b/src/playlist/Playlist.cpp @@ -1,6 +1,7 @@ #include "Playlist.hpp" #include +#include // Fall back to boost if compiler doesn't support C++17 #include PROJECTM_FILESYSTEM_INCLUDE From 8df329f8c2403d46d01b9ad7f8e9a4d49f96c946 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Tue, 4 Nov 2025 13:42:44 +0100 Subject: [PATCH 2/4] Use Boost's own CMake configuration file instead of CMake's module Otherwise, breaks builds with newer Boost versions. Also set policy CMP0167 to NEW and forcing CMake to use the Config package and not the built-in module. Will now require Boost 1.70, but this should be available everywhere. --- cmake/FilesystemSupport.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/FilesystemSupport.cmake b/cmake/FilesystemSupport.cmake index d3914f75e..0bba31a78 100644 --- a/cmake/FilesystemSupport.cmake +++ b/cmake/FilesystemSupport.cmake @@ -22,7 +22,12 @@ if(NOT ENABLE_BOOST_FILESYSTEM AND STD_FILESYSTEM_EXISTS) set(PROJECTM_FILESYSTEM_INCLUDE ) set(PROJECTM_FILESYSTEM_USE_BOOST FALSE) else() - find_package(Boost REQUIRED COMPONENTS Filesystem) + # Requires Boost 1.70 or higher (which was released back in 2019) + if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) + endif() + + find_package(Boost CONFIG NO_MODULE REQUIRED COMPONENTS Filesystem) set(PROJECTM_FILESYSTEM_NAMESPACE boost) set(PROJECTM_FILESYSTEM_INCLUDE ) From 537add365f0bf6e0ceb263d03a03a7717fa0e7db Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Tue, 4 Nov 2025 13:51:29 +0100 Subject: [PATCH 3/4] Silence CMake warning if projectM-Eval is not found externally. Also output additional information in both cases (found/not found). --- CMakeLists.txt | 7 ++++++- vendor/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebb4bc1e1..f4c624e54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,12 @@ if(ENABLE_SYSTEM_GLM) endif() if(ENABLE_SYSTEM_PROJECTM_EVAL) - find_package(projectM-Eval) + find_package(projectM-Eval QUIET) + if(NOT TARGET projectM::Eval) + message(STATUS "projectM-Eval could not be found externally. Using sources from vendor dir (if present).") + else() + message(STATUS "Found external projectM-Eval: Version ${projectM-Eval_VERSION}") + endif() endif() if(NOT BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 6b3ac3e3e..74d7a6f75 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -3,6 +3,6 @@ if(NOT ENABLE_SYSTEM_GLM) endif() add_subdirectory(hlslparser) if(NOT TARGET projectM::Eval) -add_subdirectory(projectm-eval) + add_subdirectory(projectm-eval) endif() add_subdirectory(SOIL2) From ebb8b3318bd41a4ef05c6d94c364a405165a3fe4 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Tue, 4 Nov 2025 12:02:57 +0100 Subject: [PATCH 4/4] Add workflow configurations to test boost-filesystem and more platforms/archs --- .github/workflows/build_android.yml | 73 +++++++-------- .github/workflows/build_emscripten.yml | 31 +++++-- .github/workflows/build_linux.yml | 92 +++++++++---------- .github/workflows/build_osx.yml | 89 ++++++++++--------- .github/workflows/build_windows.yml | 118 +++++++++++++++++-------- 5 files changed, 226 insertions(+), 177 deletions(-) diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index 9092d0825..cf828730e 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -1,20 +1,27 @@ -name: Android (arm64-v8a, API level 33) +name: Android on: push: - branches: + branches: - "*" tags: - "*" - + pull_request: - branches: + branches: - "*" jobs: build-shared: - name: Shared Library - runs-on: ubuntu-latest + name: "Libs: ${{ matrix.libs }}, ABI: ${{ matrix.abi }}, Platform: ${{ matrix.platform-version }}, Build OS: ${{ matrix.runs-on }}" + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + libs: ['shared', 'static'] + abi: ['arm64-v8a', 'armeabi-v7a', 'x86_64'] + platform-version: ['33'] + runs-on: ['ubuntu-24.04'] steps: - uses: actions/checkout@v4 @@ -27,41 +34,23 @@ jobs: sudo apt-get install -y ninja-build - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DANDROID_PLATFORM=33 -DANDROID_ABI=arm64-v8a -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=NO -DENABLE_SDL_UI=OFF - - - name: Build Debug - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel - - - name: Build Release - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel - - - name: Install run: | - cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install - cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: projectm-android-shared-latest - path: install/* - - build-static: - name: Static Library - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Install Packages - run: | - sudo apt-get update - sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev libgtest-dev libgmock-dev ninja-build - - - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DANDROID_PLATFORM=33 -DANDROID_ABI=arm64-v8a -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=NO -DENABLE_SDL_UI=OFF + if [ "${{ matrix.libs }}" == "shared" ]; then + shared_libs=ON + else + shared_libs=OFF + fi + cmake -G "Ninja Multi-Config" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/cmake-build" \ + -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + -DANDROID_PLATFORM="${{ matrix.platform-version }}" \ + -DANDROID_ABI="${{ matrix.abi }}" \ + -DCMAKE_VERBOSE_MAKEFILE=YES \ + -DBUILD_SHARED_LIBS="${shared_libs}" \ + -DBUILD_TESTING=NO \ + -DENABLE_SDL_UI=OFF - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -77,5 +66,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: projectm-android-static-latest - path: install/* + name: projectm-android-${{ matrix.libs }}-${{ matrix.abi }}-api${{ matrix.platform-version }} + path: install/* diff --git a/.github/workflows/build_emscripten.yml b/.github/workflows/build_emscripten.yml index 505aa1bfc..41d76356d 100644 --- a/.github/workflows/build_emscripten.yml +++ b/.github/workflows/build_emscripten.yml @@ -2,19 +2,27 @@ name: Emscripten on: push: - branches: + branches: - "*" tags: - "*" - + pull_request: - branches: + branches: - "*" jobs: build: - name: Static Library - runs-on: ubuntu-latest + name: "Libs: ${{ matrix.libs }}, FS Lib: ${{ matrix.fslib }}, SDK: ${{ matrix.emsdk-version }}, Arch: WASM, Build OS: ${{ matrix.runs-on }}" + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + include: + - libs: static + fslib: stl + emsdk-version: 3.1.53 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -25,7 +33,7 @@ jobs: uses: mymindstorm/setup-emsdk@v14 with: # Make sure to set a version number! - version: 3.1.53 + version: ${{ matrix.emsdk-version }} # This is the name of the cache folder. # The cache folder will be placed in the build directory, # so make sure it doesn't conflict with anything! @@ -45,7 +53,14 @@ jobs: cd ${{ github.workspace }}/build-gtest && ./setup.sh && ./build-emscripten.sh - name: Configure Build - run: emcmake cmake -G "Unix Makefiles" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES -DGTest_DIR="${{ github.workspace }}/build-gtest/dist/emscripten/lib/lib/cmake/GTest" + run: | + emcmake cmake -G "Unix Makefiles" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/cmake-build" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + -DCMAKE_VERBOSE_MAKEFILE=YES \ + -DBUILD_TESTING=YES \ + -DGTest_DIR="${{ github.workspace }}/build-gtest/dist/emscripten/lib/lib/cmake/GTest" - name: Build Debug run: emmake cmake --build "${{ github.workspace }}/cmake-build" --parallel @@ -65,5 +80,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: projectm-emscripten-static-latest + name: projectm-emscripten-${{ matrix.libs }}-emsdk-${{ matrix.emsdk-version }} path: install/* \ No newline at end of file diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 4dac1296b..ec6fcbdf3 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -1,20 +1,26 @@ -name: Ubuntu Linux (x86_64) +name: Linux on: push: - branches: + branches: - "*" tags: - "*" - + pull_request: - branches: + branches: - "*" jobs: build-shared: - name: Shared Library - runs-on: ubuntu-latest + name: "Libs: ${{ matrix.libs }}, FS Lib: ${{ matrix.fslib }}, Build OS: ${{ matrix.runs-on }}" + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + libs: ['shared', 'static'] + fslib: ['stl', 'boost'] + runs-on: ['ubuntu-24.04', 'ubuntu-22.04'] steps: - uses: actions/checkout@v4 @@ -24,47 +30,41 @@ jobs: - name: Install Packages run: | sudo apt-get update - sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev libgtest-dev libgmock-dev ninja-build - - - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES - - - name: Build Debug - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel - - - name: Run Unit Tests - run: ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug" - - - name: Build Release - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel - - - name: Install + sudo apt-get install --yes --no-install-recommends \ + libgl1-mesa-dev \ + mesa-common-dev \ + libsdl2-dev \ + libglm-dev \ + libgtest-dev \ + libgmock-dev \ + ninja-build + + - name: Install boost-filesystem-dev + if: "${{ contains(matrix.fslib, 'boost') }}" run: | - cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install - cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: projectm-linux-shared-latest - path: install/* - - build-static: - name: Static Library - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Install Packages - run: | - sudo apt-get update - sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev libgtest-dev libgmock-dev ninja-build + sudo apt-get install --yes --no-install-recommends \ + libboost-filesystem-dev - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES + run: | + if [ "${{ matrix.libs }}" == "shared" ]; then + shared_libs=ON + else + shared_libs=OFF + fi + if [ "${{ matrix.fslib }}" == "boost" ]; then + use_boost=ON + else + use_boost=OFF + fi + cmake -G "Ninja Multi-Config" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/cmake-build" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + -DCMAKE_VERBOSE_MAKEFILE=YES \ + -DBUILD_SHARED_LIBS="${shared_libs}" \ + -DENABLE_BOOST_FILESYSTEM="${use_boost}" \ + -DBUILD_TESTING=YES - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -83,5 +83,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: projectm-linux-static-latest - path: install/* + name: projectm-linux-${{ matrix.libs }}-${{ matrix.fslib }}-${{ matrix.runs-on }} + path: install/* diff --git a/.github/workflows/build_osx.yml b/.github/workflows/build_osx.yml index f6abe3e8f..4247426f4 100644 --- a/.github/workflows/build_osx.yml +++ b/.github/workflows/build_osx.yml @@ -1,66 +1,71 @@ -name: macOS (x86_64) +name: macOS on: push: - branches: + branches: - "*" tags: - "*" - + pull_request: - branches: + branches: - "*" jobs: build-shared: - name: Shared Library - runs-on: macos-latest + name: "Libs: ${{ matrix.libs }}, FS Lib: ${{ matrix.fslib }}, Arch: ${{ matrix.arch }}, Build OS: ${{ matrix.runs-on }}" + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + libs: ['shared', 'static'] + fslib: ['stl', 'boost'] + arch: ['arm64', 'x86_64'] + runs-on: ['macos-15', 'macos-15-intel'] + exclude: + - arch: arm64 + runs-on: macos-15-intel + - arch: x86_64 + runs-on: macos-15 + ### BROKEN: Homebrew's Boost build for arm64 does not properly populate the include dir of the Boost CMake targets. + - arch: arm64 + runs-on: macos-15 + fslib: boost steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Install Packages run: brew install sdl2 ninja googletest - - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES - - - name: Build Debug - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel - - - name: Run Unit Tests - run: ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug" - - - name: Build Release - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel - - - name: Install + - name: Install boost-filesystem-dev + if: "${{ contains(matrix.fslib, 'boost') }}" run: | - cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install - cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: projectm-osx-shared-latest - path: install/* + brew install boost - build-static: - name: Static Library - runs-on: macos-latest - - steps: - uses: actions/checkout@v4 with: submodules: 'recursive' - - name: Install Packages - run: brew install sdl2 ninja googletest - - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES + run: | + if [ "${{ matrix.libs }}" == "shared" ]; then + shared_libs=ON + else + shared_libs=OFF + fi + if [ "${{ matrix.fslib }}" == "boost" ]; then + use_boost=ON + else + use_boost=OFF + fi + cmake -G "Ninja Multi-Config" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/cmake-build" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + -DCMAKE_VERBOSE_MAKEFILE=YES \ + -DBUILD_SHARED_LIBS="${shared_libs}" \ + -DENABLE_BOOST_FILESYSTEM="${use_boost}" \ + -DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}" \ + -DBUILD_TESTING=YES - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -79,5 +84,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: projectm-osx-static-latest - path: install/* + name: projectm-osx-${{ matrix.libs }}-${{ matrix.fslib }}-${{ matrix.arch }}-${{ matrix.runs-on }} + path: install/* diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 9bdc4301e..1a0f352bf 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -1,60 +1,100 @@ -name: Windows (x64) +name: Windows on: push: - branches: + branches: - "*" tags: - "*" - + pull_request: - branches: + branches: - "*" jobs: build-shared: - name: Shared Library - runs-on: windows-latest + name: "Libs: ${{ matrix.libs }}, FS Lib: ${{ matrix.fslib }}, Arch: ${{ matrix.arch }}, Build OS: ${{ matrix.runs-on }}" + runs-on: ${{ matrix.runs-on }} + env: + USERNAME: projectM-visualizer + VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg + FEED_URL: https://nuget.pkg.github.com/projectM-visualizer/index.json + VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/projectM-visualizer/index.json,readwrite" + strategy: + fail-fast: false + matrix: + libs: ['shared', 'static'] + fslib: ['stl', 'boost'] + arch: ['X64', 'Win32'] + runs-on: ['windows-2025', 'windows-2022'] steps: - - uses: actions/checkout@v4 + - name: Checkout vcpkg + uses: actions/checkout@v4 with: - submodules: 'recursive' - - - name: Configure Build (MD) - run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>DLL" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES - - - name: Build Debug - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel + repository: microsoft/vcpkg + path: vcpkg + submodules: recursive - - name: Run Unit Tests - run: ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug" - - - name: Build Release - run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel + - name: Bootstrap vcpkg + shell: pwsh + run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat - - name: Install + - name: Add NuGet sources + shell: pwsh run: | - cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target INSTALL - cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target INSTALL - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: projectm-windows-shared-latest - path: install/* - - build-static: - name: Static Library - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 + .$(${{ env.VCPKG_EXE }} fetch nuget) ` + sources add ` + -Source "${{ env.FEED_URL }}" ` + -StorePasswordInClearText ` + -Name GitHubPackages ` + -UserName "${{ env.USERNAME }}" ` + -Password "${{ secrets.VCPKG_PACKAGES_TOKEN }}" + .$(${{ env.VCPKG_EXE }} fetch nuget) ` + setapikey "${{ secrets.VCPKG_PACKAGES_TOKEN }}" ` + -Source "${{ env.FEED_URL }}" + + - name: Checkout libprojectM + uses: actions/checkout@v4 with: submodules: 'recursive' - - name: Configure Build (MD) - run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES + - name: Configure Build + run: | + if("${{ matrix.libs }}" -eq "shared") { + $shared_libs = "ON" + } else { + $shared_libs = "ON" + } + if("${{ matrix.fslib }}" -eq "boost") { + $use_boost = "ON" + } else { + $use_boost = "ON" + } + if("${{ matrix.arch }}" -eq "X64") { + $triplet = "x64-windows" + } else { + $triplet = "x86-windows" + } + if("${{ matrix.libs }}" -eq "shared") { + $runtime = "DLL" + } else { + $runtime = "" + $triplet = $triplet + "-static" + } + + cmake -G "Visual Studio 17 2022" ` + -A "${{ matrix.arch }}" ` + -S "${{ github.workspace }}" ` + -B "${{ github.workspace }}/cmake-build" ` + -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ` + -DVCPKG_TARGET_TRIPLET="$($triplet)" ` + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" ` + -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>$($runtime)" ` + -DCMAKE_VERBOSE_MAKEFILE=YES ` + -DBUILD_SHARED_LIBS="$($shared_libs)" ` + -DENABLE_BOOST_FILESYSTEM="$($use_boost)" ` + -DBUILD_TESTING=YES - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -73,5 +113,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: projectm-windows-static-latest - path: install/* + name: projectm-windows-${{ matrix.libs }}-${{ matrix.fslib }}-${{ matrix.arch }}-${{ matrix.runs-on }} + path: install/*