CI: add more test cases with cmake presets

This commit is contained in:
Guillaume Meunier
2024-10-12 10:21:24 +02:00
parent 1428d52727
commit 48cef654e3
2 changed files with 172 additions and 28 deletions
+22 -28
View File
@@ -18,6 +18,10 @@ jobs:
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
matrix:
cmake_preset: ['server', 'server-no-systemd', 'server-no-system-boost', 'dashboard']
steps:
- uses: actions/checkout@v4
with:
@@ -25,7 +29,7 @@ jobs:
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev policykit-1
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev policykit-1 libboost-all-dev
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
@@ -40,20 +44,10 @@ jobs:
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DWIVRN_BUILD_SERVER=ON
-DWIVRN_BUILD_DASHBOARD=ON
-DWIVRN_BUILD_CLIENT=OFF
-DWIVRN_BUILD_DISSECTOR=OFF
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DWIVRN_USE_VAAPI=ON
-DWIVRN_USE_X264=ON
-DWIVRN_USE_NVENC=ON
-DWIVRN_USE_SYSTEM_BOOST=OFF
-DWIVRN_USE_PULSEAUDIO=ON
-DWIVRN_USE_PIPEWIRE=ON
-DWIVRN_WERROR=ON
--preset ${{ matrix.cmake_preset }}
- name: Package build dependencies
if: ${{ matrix.buildtype == 'server' }}
# For easier packaging, build dependencies are made available as a separate archive
run: (cd build/_deps/ ; tar --create --xz *-src) > server-build-deps.tar.xz
@@ -62,6 +56,7 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Publish build dependencies
if: ${{ matrix.buildtype == 'server' }}
uses: actions/upload-artifact@v4
with:
name: server-build-deps
@@ -69,7 +64,7 @@ jobs:
- name: Release build dependencies
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') && matrix.buildtype == 'server'
with:
tag_name: ${{ inputs.ref }}
generate_release_notes: true
@@ -114,6 +109,10 @@ jobs:
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
matrix:
cmake_preset: ['client', 'client-no-system-boost', 'client-no-system-freetype']
steps:
- uses: actions/checkout@v4
with:
@@ -128,19 +127,14 @@ jobs:
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev libxcb-glx0-dev gettext libfontconfig-dev
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev libxcb-glx0-dev gettext libfontconfig-dev libboost-all-dev
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DWIVRN_BUILD_SERVER=OFF
-DWIVRN_BUILD_DASHBOARD=OFF
-DWIVRN_BUILD_CLIENT=ON
-DWIVRN_BUILD_DISSECTOR=OFF
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DWIVRN_WERROR=ON
--preset ${{ matrix.cmake_preset }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
@@ -150,6 +144,12 @@ jobs:
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
matrix:
# Ubuntu 24.04 has boost 1.83, the dissector requires 1.84
# cmake_preset: ['dissector', 'dissector-no-system-boost']
cmake_preset: ['dissector-no-system-boost']
steps:
- uses: actions/checkout@v4
with:
@@ -171,13 +171,7 @@ jobs:
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DWIVRN_BUILD_SERVER=OFF
-DWIVRN_BUILD_DASHBOARD=OFF
-DWIVRN_BUILD_CLIENT=OFF
-DWIVRN_BUILD_DISSECTOR=ON
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DWIVRN_USE_SYSTEM_BOOST=OFF
-DWIVRN_WERROR=ON
--preset ${{ matrix.cmake_preset }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+150
View File
@@ -0,0 +1,150 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 25,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"hidden": true,
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
"CMAKE_BUILD_TYPE": "Debug",
"WIVRN_BUILD_CLIENT": "OFF",
"WIVRN_BUILD_SERVER": "OFF",
"WIVRN_BUILD_DASHBOARD": "OFF",
"WIVRN_BUILD_DISSECTOR": "OFF",
"WIVRN_USE_VAAPI": "ON",
"WIVRN_USE_X264": "ON",
"WIVRN_USE_NVENC": "ON",
"WIVRN_USE_SYSTEMD": "ON",
"WIVRN_USE_SYSTEM_BOOST": "ON",
"WIVRN_USE_PULSEAUDIO": "ON",
"WIVRN_USE_PIPEWIRE": "ON",
"WIVRN_WERROR": "ON"
}
},
{
"name": "everything",
"displayName": "Everything",
"inherits": "base",
"binaryDir": "${sourceDir}/build-everything",
"cacheVariables": {
"WIVRN_BUILD_CLIENT": "ON",
"WIVRN_BUILD_SERVER": "ON",
"WIVRN_BUILD_DASHBOARD": "ON",
"WIVRN_BUILD_DISSECTOR": "ON"
}
},
{
"name": "client",
"displayName": "Client only",
"inherits": "base",
"binaryDir": "${sourceDir}/build-client",
"cacheVariables": {
"WIVRN_BUILD_CLIENT": "ON"
}
},
{
"name": "server",
"displayName": "Server only",
"inherits": "base",
"binaryDir": "${sourceDir}/build-server",
"cacheVariables": {
"WIVRN_BUILD_SERVER": "ON"
}
},
{
"name": "dashboard",
"displayName": "Dashboard only",
"inherits": "base",
"binaryDir": "${sourceDir}/build-dashboard",
"cacheVariables": {
"WIVRN_BUILD_DASHBOARD": "ON"
}
},
{
"name": "dissector",
"displayName": "Wireshark dissector only",
"inherits": "base",
"binaryDir": "${sourceDir}/build-dissector",
"cacheVariables": {
"WIVRN_BUILD_DISSECTOR": "ON"
}
},
{
"name": "everything-no-systemd",
"displayName": "Everything (no systemd)",
"inherits": "everything",
"binaryDir": "${sourceDir}/build-no-systemd",
"cacheVariables": {
"WIVRN_USE_SYSTEMD": "OFF"
}
},
{
"name": "everything-no-system-boost",
"displayName": "Everything (no system Boost)",
"inherits": "everything",
"binaryDir": "${sourceDir}/build-no-system-boost",
"cacheVariables": {
"WIVRN_USE_SYSTEM_BOOST": "OFF"
}
},
{
"name": "server-no-systemd",
"displayName": "Server only (no systemd)",
"inherits": "server",
"binaryDir": "${sourceDir}/build-server-no-systemd",
"cacheVariables": {
"WIVRN_USE_SYSTEMD": "OFF"
}
},
{
"name": "server-no-system-boost",
"displayName": "Server only (no system Boost)",
"inherits": "server",
"binaryDir": "${sourceDir}/build-server-no-system-boost",
"cacheVariables": {
"WIVRN_USE_SYSTEM_BOOST": "OFF"
}
},
{
"name": "client-no-system-boost",
"displayName": "Client only (no system Boost)",
"inherits": "client",
"binaryDir": "${sourceDir}/build-client-no-system-boost",
"cacheVariables": {
"WIVRN_USE_SYSTEM_BOOST": "OFF"
}
},
{
"name": "client-no-system-freetype",
"displayName": "Client only (no system freetype/harfbuzz)",
"inherits": "client",
"binaryDir": "${sourceDir}/build-client-no-system-freetype",
"cacheVariables": {
"WIVRN_USE_SYSTEM_FREETYPE": "OFF"
}
},
{
"name": "dissector-no-system-boost",
"displayName": "Dissector only (no system Boost)",
"inherits": "dissector",
"binaryDir": "${sourceDir}/build-dissector-no-system-boost",
"cacheVariables": {
"WIVRN_USE_SYSTEM_BOOST": "OFF"
}
}
],
"buildPresets": [
{
"name": "default",
"displayName": "Build and install",
"configurePreset": "everything",
"targets": "install"
}
]
}