From 286ed8e1916a7c1d04f28a0cdcc023694f42b024 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 8 Mar 2026 04:17:09 +0300 Subject: [PATCH 1/6] Avoid duplicate SDL3 provisioning on Linux CI --- .github/workflows/cmake-multi-platform.yml | 21 ++++++++++++++++----- CMakeLists.txt | 3 ++- src_demo/window_demo.cpp | 4 ++-- src_demo/window_demo.h | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 07a6788..bf3dbce 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false - + matrix: os: [ubuntu-latest, windows-2025] build_type: [Release] @@ -21,21 +21,24 @@ jobs: - os: windows-2025 c_compiler: cl cpp_compiler: cl - + vcpkg_triplet: x64-windows + - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ - + vcpkg_triplet: x64-linux + - os: ubuntu-latest c_compiler: clang cpp_compiler: clang++ + vcpkg_triplet: x64-linux exclude: - os: windows-2025 c_compiler: gcc - + - os: windows-2025 c_compiler: clang - + - os: ubuntu-latest c_compiler: cl @@ -50,6 +53,12 @@ jobs: sudo apt-get update sudo apt-get install -y --no-install-recommends xorg-dev libglu1-mesa-dev + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + + - name: Install SDL3 via vcpkg + run: vcpkg install sdl3:${{ matrix.vcpkg_triplet }} + - name: Set reusable strings id: strings shell: bash @@ -62,6 +71,8 @@ jobs: -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_INSTALLATION_ROOT }}/scripts/buildsystems/vcpkg.cmake + -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} -S ${{ github.workspace }} - name: Build diff --git a/CMakeLists.txt b/CMakeLists.txt index d95b8e6..1fb8a9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,8 @@ option(BUILD_SHARED_LIBS "Build shared libs" ON) # Dependencies # -find_package(SDL3 REQUIRED) +find_package(SDL3 CONFIG REQUIRED) + include(3rdparty/imgui.cmake) include(3rdparty/implot.cmake) diff --git a/src_demo/window_demo.cpp b/src_demo/window_demo.cpp index 62f9c61..c4f1528 100644 --- a/src_demo/window_demo.cpp +++ b/src_demo/window_demo.cpp @@ -15,7 +15,7 @@ // namespace Uni::GUI::Example { - bool WindowDemo::UiUpdate(UiApp& app) { + bool WindowDemo::UiUpdate(UiState& state) { static bool win_about = false; static bool win_demo = false; static bool win_demo_implot = false; @@ -24,7 +24,7 @@ namespace Uni::GUI::Example { ImGui::SetNextWindowSize({800,600}); if (ImGui::Begin("demo")) { - ImGui::Text(std::string(app.GetRenderingApiName()).c_str()); + ImGui::Text("%s", std::string(state.app->GetRenderingApiName()).c_str()); if (ImGui::Button("About")) { diff --git a/src_demo/window_demo.h b/src_demo/window_demo.h index 51aeda5..0aaa117 100644 --- a/src_demo/window_demo.h +++ b/src_demo/window_demo.h @@ -15,7 +15,7 @@ namespace Uni::GUI::Example { class WindowDemo: public Uni::GUI::UiElement { public: explicit WindowDemo() = default; - bool UiUpdate(UiApp&) override; + bool UiUpdate(UiState&) override; }; } From 7cf43c3034f891a629a864adbf1a65cb5046c89a Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 8 Mar 2026 04:27:24 +0300 Subject: [PATCH 2/6] Pin vcpkg baseline for run-vcpkg in CI --- .github/workflows/cmake-multi-platform.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index bf3dbce..b007471 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -22,16 +22,19 @@ jobs: c_compiler: cl cpp_compiler: cl vcpkg_triplet: x64-windows + vcpkg_commit_id: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ vcpkg_triplet: x64-linux + vcpkg_commit_id: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 - os: ubuntu-latest c_compiler: clang cpp_compiler: clang++ vcpkg_triplet: x64-linux + vcpkg_commit_id: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 exclude: - os: windows-2025 c_compiler: gcc @@ -55,6 +58,9 @@ jobs: - name: Setup vcpkg uses: lukka/run-vcpkg@v11 + with: + vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' + vcpkgGitCommitId: '${{ matrix.vcpkg_commit_id }}' - name: Install SDL3 via vcpkg run: vcpkg install sdl3:${{ matrix.vcpkg_triplet }} From 03a2edb918c26292e828674c183cef0885248cda Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 8 Mar 2026 04:31:05 +0300 Subject: [PATCH 3/6] Bump vcpkg baseline commit in CI matrix --- .github/workflows/cmake-multi-platform.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index b007471..e2a86b6 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -22,19 +22,19 @@ jobs: c_compiler: cl cpp_compiler: cl vcpkg_triplet: x64-windows - vcpkg_commit_id: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 + vcpkg_commit_id: 1e199d32ad53aab1defda61ce41c380302e3f95c - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ vcpkg_triplet: x64-linux - vcpkg_commit_id: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 + vcpkg_commit_id: 1e199d32ad53aab1defda61ce41c380302e3f95c - os: ubuntu-latest c_compiler: clang cpp_compiler: clang++ vcpkg_triplet: x64-linux - vcpkg_commit_id: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 + vcpkg_commit_id: 1e199d32ad53aab1defda61ce41c380302e3f95c exclude: - os: windows-2025 c_compiler: gcc From 39b46c0ff1e0b770a3de7e4938d0118f4d99e367 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 8 Mar 2026 04:38:30 +0300 Subject: [PATCH 4/6] Install vcpkg autotools prerequisites on Linux CI --- .github/workflows/cmake-multi-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e2a86b6..6604bb6 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -54,7 +54,7 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends xorg-dev libglu1-mesa-dev + sudo apt-get install -y --no-install-recommends xorg-dev libglu1-mesa-dev autoconf autoconf-archive automake libtool - name: Setup vcpkg uses: lukka/run-vcpkg@v11 From 642b6d99258bee1611c9eb253e300196e31fdff6 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 8 Mar 2026 04:38:34 +0300 Subject: [PATCH 5/6] Fix CI vcpkg toolchain path variable --- .github/workflows/cmake-multi-platform.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6604bb6..2027a10 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -57,6 +57,7 @@ jobs: sudo apt-get install -y --no-install-recommends xorg-dev libglu1-mesa-dev autoconf autoconf-archive automake libtool - name: Setup vcpkg + id: runvcpkg uses: lukka/run-vcpkg@v11 with: vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' @@ -77,7 +78,7 @@ jobs: -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_INSTALLATION_ROOT }}/scripts/buildsystems/vcpkg.cmake + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} -S ${{ github.workspace }} From bb8cc171ffb056e7f0090824918349e2e69fe5aa Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 8 Mar 2026 04:44:36 +0300 Subject: [PATCH 6/6] Expand Linux CI prerequisites for SDL3/vcpkg builds --- .github/workflows/cmake-multi-platform.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2027a10..5b31166 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -54,7 +54,16 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends xorg-dev libglu1-mesa-dev autoconf autoconf-archive automake libtool + sudo apt-get install -y --no-install-recommends \ + autoconf autoconf-archive automake libtool libltdl-dev \ + build-essential git make pkg-config cmake ninja-build \ + gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev \ + libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \ + libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev \ + libxtst-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev \ + libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev \ + libudev-dev libthai-dev libpipewire-0.3-dev libwayland-dev \ + libdecor-0-dev liburing-dev - name: Setup vcpkg id: runvcpkg