CI: Merge all linux jobs in one matrix

This commit is contained in:
Patrick Nicolas
2025-11-18 12:35:49 +01:00
parent 65894401c1
commit 59cab00c52
+67 -115
View File
@@ -5,26 +5,22 @@ on:
pull_request:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-server:
name: Linux server
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
build-linux:
name: Linux
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
fail-fast: false
matrix:
cmake_preset: ['server', 'server-no-systemd', 'server-no-system-boost']
# dashboard requires a more recent Ubuntu, have it out of this job
cmake_preset: ['client', 'dissector-no-system-boost', 'server', 'server-no-systemd', 'server-no-system-boost']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
@@ -32,25 +28,42 @@ jobs:
key: server-${{matrix.cmake_preset}}
restore-keys: server-
append-timestamp: false
create-symlink: true
- uses: actions/cache@v4
with:
key: cmake-server-${{matrix.cmake_preset}}
key: cmake-linux-${{matrix.cmake_preset}}
path: |
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
restore-keys: cmake-server-
restore-keys: cmake-linux-
- 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 libboost-all-dev librsvg2-bin libssl-dev libnotify-dev librsvg2-dev libarchive-dev
run: |
sudo apt-get update
# Common dependencies
sudo apt-get install libboost-all-dev
if [ "${{matrix.cmake_preset}}" == "client" ] ; then
sudo apt-get install libharfbuzz-dev libfreetype-dev libavcodec-dev libavutil-dev libswscale-dev librsvg2-bin gettext libcurl4-openssl-dev libfontconfig-dev
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.4.2/KTX-Software-4.4.2-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.4.2-Linux-x86_64.deb
npm install --global @gltf-transform/cli@4.1.1
fi
if [[ "${{matrix.cmake_preset}}" == dissector* ]] ; then
sudo apt-get install wireshark-dev
fi
if [[ "${{matrix.cmake_preset}}" == server* ]] ; then
sudo apt-get install libx264-dev libavcodec-dev libavutil-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev nlohmann-json3-dev librsvg2-dev libdrm-dev libglib2.0-dev-bin libpipewire-0.3-dev libpulse-dev libcli11-dev libnotify-dev libarchive-dev libudev-dev
if [[ "${{matrix.cmake_preset}}" != "server-no-systemd" ]] ; then
sudo apt-get install libsystemd-dev
fi
fi
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.3.296.0
vulkan-components: Vulkan-Headers, Glslang, SPIRV-Tools
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Reflect, SPIRV-Tools
vulkan-use-cache: true
- name: Configure CMake
@@ -59,9 +72,11 @@ jobs:
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DFETCHCONTENT_BASE_DIR=${{github.workspace}}/cmake-fetch
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
--preset ${{ matrix.cmake_preset }}
-DWIVRN_USE_SYSTEM_OPENXR=OFF
- name: Package build dependencies
if: ${{ matrix.cmake_preset == 'server' }}
@@ -89,26 +104,52 @@ jobs:
files: server-build-deps.tar.xz
build-dashboard:
name: Linux dashboard
#FIXME: merge with the matrixed build once Ubuntu gets updated
name: Linux Dashboard
runs-on: ubuntu-24.04
container: ubuntu:plucky
if: ${{ vars.APK_ONLY == '' }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
fetch-depth: 0
key: cmake-linux-dashboard
path: |
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
restore-keys: cmake-linux-
- name: Install dependencies
run: >
apt-get update && apt-get install --yes libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-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 qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin libssl-dev libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git qcoro-qt6-dev librsvg2-dev libarchive-dev libglm-dev glslang-tools
# runtime: qml6-module-qtqml-workerscript qml6-module-qtquick-dialogs
run: |
apt-get update
# To be removed when using normal Ubuntu runner
apt-get install --yes sudo jq cmake gcc g++ git pkgconf
# Common dependencies
sudo apt-get install --yes libboost-all-dev
# Dashboard dependencies
sudo apt-get install --yes libkirigami-dev gettext libarchive-dev nlohmann-json3-dev qcoro-qt6-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libvulkan-dev libssl-dev librsvg2-dev extra-cmake-modules libcap-dev
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: server-${{matrix.cmake_preset}}
restore-keys: server-
append-timestamp: false
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DFETCHCONTENT_BASE_DIR=${{github.workspace}}/cmake-fetch
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
--preset dashboard
-DWIVRN_USE_SYSTEM_OPENXR=OFF
- name: Build
# Build your program with the given configuration
@@ -171,95 +212,6 @@ jobs:
- run: nix flake check
- run: nix build --print-build-logs
build-test-client:
name: Linux client
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: client
restore-keys: server-
append-timestamp: false
create-symlink: true
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
vulkan-query-version: 1.3.296.0
vulkan-components: Vulkan-Headers, Glslang, SPIRV-Tools
vulkan-use-cache: true
- 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 libboost-all-dev librsvg2-bin libssl-dev sway grim libcurl4-openssl-dev libharfbuzz-dev libfreetype-dev
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.4.2/KTX-Software-4.4.2-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.4.2-Linux-x86_64.deb
npm install --global @gltf-transform/cli@4.1.1
- name: install server dependencies
run: >
sudo apt-get update && sudo apt-get install libavahi-glib-dev nlohmann-json3-dev xz-utils libpipewire-0.3-dev libcli11-dev libcap-dev pkexec libnotify-dev librsvg2-dev libarchive-dev
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DWIVRN_USE_SYSTEM_OPENXR=OFF
--preset everything
-DWIVRN_USE_PULSEAUDIO=OFF
-DWIVRN_BUILD_DASHBOARD=OFF
-DWIVRN_BUILD_DISSECTOR=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-dissector:
name: Wireshark dissector
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:
fetch-depth: 0
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
vulkan-query-version: 1.3.296.0
vulkan-components: Vulkan-Headers, Glslang, SPIRV-Tools
vulkan-use-cache: true
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libopenxr-dev wireshark wireshark-dev libssl-dev
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
--preset ${{ matrix.cmake_preset }}
-DWIVRN_USE_SYSTEM_OPENXR=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-android:
name: Android
runs-on: ubuntu-24.04
@@ -276,7 +228,7 @@ jobs:
fetch-depth: 0
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.3.296.0
vulkan-components: Glslang, SPIRV-Tools
@@ -494,7 +446,7 @@ jobs:
release:
name: Create release
runs-on: ubuntu-22.04
needs: [build-server, build-android, build-test-client, build-dissector, build-server-flatpak, build-ubuntu, build-dashboard]
needs: [build-linux, build-android, build-server-flatpak, build-ubuntu]
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
@@ -580,7 +532,7 @@ jobs:
sync_fork_downstream:
name: Sync fork downstream
runs-on: ubuntu-24.04
needs: [build-server, build-android]
needs: [build-linux, build-android]
if: ${{ vars.APK_ONLY == '' }} && github.branch == 'master'
steps:
- name: Check for DOWNSTREAM_GITHUB_TOKEN