🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
3.4 KiB

  1. name: Build (Sony Playstation Vita)
  2. on: [push, pull_request]
  3. defaults:
  4. run:
  5. shell: sh
  6. jobs:
  7. vita:
  8. name: ${{ matrix.platform.name }}
  9. runs-on: ubuntu-latest
  10. container:
  11. image: vitasdk/vitasdk:latest
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. platform:
  16. - { name: GLES (pib), os: windows-latest, pib: true }
  17. - { name: GLES (PVR_PSP2 + gl4es4vita), os: windows-latest, pvr: true }
  18. steps:
  19. - uses: actions/checkout@v3
  20. - name: Install build requirements
  21. run: |
  22. apk update
  23. apk add cmake ninja pkgconf bash
  24. - name: Configure PVR_PSP2 (GLES)
  25. if: ${{ !!matrix.platform.pvr }}
  26. run: |
  27. pvr_psp2_version=3.9
  28. # Configure PVR_PSP2 headers
  29. wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
  30. unzip /tmp/v$pvr_psp2_version.zip -d/tmp
  31. cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* ${VITASDK}/arm-vita-eabi/include
  32. rm /tmp/v$pvr_psp2_version.zip
  33. # Configure PVR_PSP2 stub libraries
  34. wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
  35. unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
  36. find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} ${VITASDK}/arm-vita-eabi/lib \;
  37. rm /tmp/vitasdk_stubs.zip
  38. rm -rf /tmp/pvr_psp2_stubs
  39. - name: Configure gl4es4vita (OpenGL)
  40. if: ${{ !!matrix.platform.pvr }}
  41. run: |
  42. gl4es4vita_version=1.1.4
  43. # Configure gl4es4vita headers
  44. wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
  45. unzip -o /tmp/include.zip -d${VITASDK}/arm-vita-eabi/include
  46. rm /tmp/include.zip
  47. # Configure gl4es4vita stub libraries
  48. wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
  49. unzip /tmp/vitasdk_stubs.zip -d${VITASDK}/arm-vita-eabi/lib
  50. - name: Configure CMake
  51. run: |
  52. cmake -S . -B build -G Ninja \
  53. -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
  54. -DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \
  55. -DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \
  56. -DSDL_WERROR=ON \
  57. -DSDL_TESTS=ON \
  58. -DSDL_INSTALL_TESTS=ON \
  59. -DCMAKE_BUILD_TYPE=Release \
  60. -DCMAKE_INSTALL_PREFIX=prefix
  61. - name: Build
  62. run: cmake --build build --verbose
  63. - name: Install CMake
  64. run: |
  65. echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
  66. cmake --install build/
  67. ( cd prefix; find ) | LC_ALL=C sort -u
  68. - name: Verify CMake configuration files
  69. run: |
  70. cmake -S cmake/test -B cmake_config_build -G Ninja \
  71. -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
  72. -DTEST_SHARED=FALSE \
  73. -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
  74. -DCMAKE_BUILD_TYPE=Release
  75. cmake --build cmake_config_build --verbose
  76. - name: Verify sdl2-config
  77. run: |
  78. export CC=arm-vita-eabi-gcc
  79. export PATH=${{ env.SDL2_DIR }}/bin:$PATH
  80. cmake/test/test_sdlconfig.sh
  81. - name: Verify sdl2.pc
  82. run: |
  83. export CC=arm-vita-eabi-gcc
  84. export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
  85. cmake/test/test_pkgconfig.sh