From 9597c482facce811f1f96eee346c12e8f41b2abd Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 2 Dec 2022 20:07:36 +0100
Subject: [PATCH] ci: add haiku to ci matrix
---
.github/workflows/haiku.yml | 54 +++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100644 .github/workflows/haiku.yml
diff --git a/.github/workflows/haiku.yml b/.github/workflows/haiku.yml
new file mode 100644
index 000000000000..8ca3036753ae
--- /dev/null
+++ b/.github/workflows/haiku.yml
@@ -0,0 +1,54 @@
+name: Build (Haiku @QEMU)
+
+on:
+ # push: # Disabled ci on push because of long build times
+ pull_request:
+ paths:
+ - '**/haiku/*'
+ - '.github/workflows/haiku.yml'
+ workflow_dispatch:
+
+jobs:
+ haiku:
+ runs-on: ubuntu-latest
+ name: Haiku
+ container: docker.io/hectorm/qemu-haiku:latest
+ steps:
+ - name: Wait until the VM is ready
+ run: |
+ container-init & timeout 600 vmshell exit 0
+ - name: Setup Haiku dependencies
+ run: vmshell pkgman install -y cmd:cmake cmd:gcc cmd:ld cmd:ninja cmd:pkg_config haiku_devel devel:libgl devel:libglu
+ - uses: actions/checkout@v3
+ - name: Copy project to VM
+ run: |
+ vmshell mkdir ./src/
+ tar -cf - ./ | vmshell tar -xf - -C ./src/
+ - name: Configure (CMake)
+ run: vmshell cmake -S src -B build -GNinja \
+ -DSDL_TESTS=ON \
+ -DSDL_WERROR=ON \
+ -DSDL_INSTALL_TESTS=ON \
+ -DSDL_VENDOR_INFO=Github_Workflow \
+ -DCMAKE_INSTALL_PREFIX=cmake_prefix \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
+ -DSDL_TESTS_TIMEOUT_MULTIPLIER=10
+ - name: Build (CMake)
+ run: |
+ vmshell cmake --build ./build/ --config Release --verbose --parallel
+ - name: Run build-time tests (CMake)
+ run: |
+ vmshell ctest -VV --test-dir build/
+ - name: Install (CMake)
+ run: |
+ vmshell cmake --install ./build/ --config Release
+ - name: Verify CMake configuration files
+ run: |
+ vmshell cmake -S ./src/cmake/test -B cmake_config_build -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_PREFIX_PATH=\$PWD/cmake_prefix
+ vmshell cmake --build ./cmake_config_build --verbose
+ - name: Verify sdl3.pc
+ run: |
+ vmshell CC=c++ PKG_CONFIG_PATH=\$PWD/cmake_prefix/lib/pkgconfig src/cmake/test/test_pkgconfig.sh