Add workflow configurations to test boost-filesystem and more platforms/archs

This commit is contained in:
Kai Blaschke
2025-11-04 12:02:57 +01:00
parent 537add365f
commit ebb8b3318b
5 changed files with 233 additions and 184 deletions

View File

@ -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,7 +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
run: |
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
@ -43,39 +66,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: projectm-android-shared-latest
name: projectm-android-${{ matrix.libs }}-${{ matrix.abi }}-api${{ matrix.platform-version }}
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
- 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-static-latest
path: install/*

View File

@ -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/*

View File

@ -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,10 +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
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: |
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=ON -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
@ -46,42 +83,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: projectm-linux-shared-latest
name: projectm-linux-${{ matrix.libs }}-${{ matrix.fslib }}-${{ matrix.runs-on }}
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_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -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
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-static-latest
path: install/*

View File

@ -1,31 +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:
- name: Install Packages
run: brew install sdl2 ninja googletest
- name: Install boost-filesystem-dev
if: "${{ contains(matrix.fslib, 'boost') }}"
run: |
brew install boost
- 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
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
@ -44,40 +84,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: projectm-osx-shared-latest
name: projectm-osx-${{ matrix.libs }}-${{ matrix.fslib }}-${{ matrix.arch }}-${{ matrix.runs-on }}
path: install/*
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
- 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
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-static-latest
path: install/*

View File

@ -1,28 +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:
repository: microsoft/vcpkg
path: vcpkg
submodules: recursive
- name: Bootstrap vcpkg
shell: pwsh
run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
- name: Add NuGet sources
shell: pwsh
run: |
.$(${{ 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 -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -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$<$<CONFIG:Debug>: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
@ -41,37 +113,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: projectm-windows-shared-latest
name: projectm-windows-${{ matrix.libs }}-${{ matrix.fslib }}-${{ matrix.arch }}-${{ matrix.runs-on }}
path: install/*
build-static:
name: Static Library
runs-on: windows-latest
steps:
- 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$<$<CONFIG:Debug>:Debug>" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -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
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-static-latest
path: install/*