haiku.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. - uses: actions/checkout@v3
  22. - name: Copy project to VM
  23. run: |
  24. vmshell mkdir ./src/
  25. tar -cf - ./ | vmshell tar -xf - -C ./src/
  26. - name: Configure (CMake)
  27. run: |
  28. vmshell cmake -S src -B build -GNinja \
  29. -Wdeprecated -Wdev -Werror \
  30. -DSDL_TESTS=ON \
  31. -DSDL_WERROR=ON \
  32. -DSDL_INSTALL_TESTS=ON \
  33. -DSDL_VENDOR_INFO=Github_Workflow \
  34. -DCMAKE_INSTALL_PREFIX=cmake_prefix \
  35. -DCMAKE_BUILD_TYPE=Release \
  36. -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
  37. -DSDL_TESTS_TIMEOUT_MULTIPLIER=10
  38. - name: Build (CMake)
  39. run: |
  40. vmshell cmake --build ./build/ --config Release --verbose --parallel
  41. - name: Run build-time tests (CMake)
  42. run: |
  43. vmshell ctest -VV --test-dir build/
  44. - name: Install (CMake)
  45. run: |
  46. vmshell cmake --install ./build/ --config Release
  47. - name: Package (CPack)
  48. run: |
  49. vmshell cmake --build build/ --config Release --target package
  50. - name: Verify CMake configuration files
  51. run: |
  52. vmshell cmake -S ./src/cmake/test -B cmake_config_build -G Ninja \
  53. -DCMAKE_BUILD_TYPE=Release \
  54. -DCMAKE_PREFIX_PATH=\$PWD/cmake_prefix
  55. vmshell cmake --build ./cmake_config_build --verbose
  56. - name: Verify sdl3.pc
  57. run: |
  58. vmshell CC=c++ PKG_CONFIG_PATH=\$PWD/cmake_prefix/lib/pkgconfig src/cmake/test/test_pkgconfig.sh
  59. - name: Copy package from VM
  60. run: |
  61. vmshell tar -cf - build/dist/ | tar -xf - -C ./
  62. - uses: actions/upload-artifact@v3
  63. with:
  64. if-no-files-found: error
  65. name: SDL-haiku
  66. path: build/dist/SDL3*