haiku.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: Build (Haiku @QEMU)
  2. on:
  3. # push: # Disabled ci on push because of long build times
  4. pull_request:
  5. paths:
  6. - '**/haiku/*'
  7. - '.github/workflows/haiku.yml'
  8. workflow_dispatch:
  9. jobs:
  10. haiku:
  11. runs-on: ubuntu-latest
  12. name: Haiku
  13. container: docker.io/hectorm/qemu-haiku:latest
  14. steps:
  15. - name: Wait until the VM is ready
  16. run: |
  17. container-init & timeout 600 vmshell exit 0
  18. - name: Setup Haiku dependencies
  19. run: |
  20. vmshell pkgman install -y cmd:cmake cmd:gcc cmd:ld cmd:ninja cmd:pkg_config haiku_devel devel:libgl devel:libglu
  21. - name: Restart VM
  22. run: |
  23. sv force-restart qemu || true
  24. timeout 600 vmshell exit 0
  25. - uses: actions/checkout@v3
  26. - name: Copy project to VM
  27. run: |
  28. vmshell mkdir ./src/
  29. tar -cf - ./ | vmshell tar -xf - -C ./src/
  30. - name: Configure (CMake)
  31. run: |
  32. vmshell cmake -S src -B build -GNinja \
  33. -Wdeprecated -Wdev -Werror \
  34. -DSDL_TESTS=ON \
  35. -DSDL_WERROR=ON \
  36. -DSDL_INSTALL_TESTS=ON \
  37. -DSDL_VENDOR_INFO=Github_Workflow \
  38. -DCMAKE_INSTALL_PREFIX=cmake_prefix \
  39. -DCMAKE_BUILD_TYPE=Release \
  40. -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
  41. -DSDL_TESTS_TIMEOUT_MULTIPLIER=10
  42. - name: Build (CMake)
  43. run: |
  44. vmshell cmake --build ./build/ --config Release --verbose --parallel
  45. - name: Run build-time tests (CMake)
  46. run: |
  47. vmshell ctest -VV --test-dir build/
  48. - name: Install (CMake)
  49. run: |
  50. vmshell cmake --install ./build/ --config Release
  51. - name: Package (CPack)
  52. run: |
  53. vmshell cmake --build build/ --config Release --target package
  54. - name: Verify CMake configuration files
  55. run: |
  56. vmshell cmake -S ./src/cmake/test -B cmake_config_build -G Ninja \
  57. -DCMAKE_BUILD_TYPE=Release \
  58. -DCMAKE_PREFIX_PATH=\$PWD/cmake_prefix
  59. vmshell cmake --build ./cmake_config_build --verbose
  60. - name: Verify sdl3.pc
  61. run: |
  62. vmshell CC=c++ PKG_CONFIG_PATH=\$PWD/cmake_prefix/lib/pkgconfig src/cmake/test/test_pkgconfig.sh
  63. - name: Copy package from VM
  64. run: |
  65. vmshell tar -cf - build/dist/ | tar -xf - -C ./
  66. - uses: actions/upload-artifact@v3
  67. with:
  68. if-no-files-found: error
  69. name: SDL-haiku
  70. path: build/dist/SDL3*