psp.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Build (Sony Playstation Portable)
  2. on: [push, pull_request]
  3. concurrency:
  4. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
  5. cancel-in-progress: true
  6. jobs:
  7. psp:
  8. runs-on: ubuntu-latest
  9. container: pspdev/pspdev:latest
  10. steps:
  11. - uses: actions/checkout@v4
  12. - name: Setup dependencies
  13. run: |
  14. apk update
  15. apk add cmake gmp mpc1 mpfr4 make pkgconf
  16. - name: Patch the pspdev toolchain to use -isystem instead of -I
  17. run: |
  18. # https://github.com/pspdev/pspsdk/issues/123
  19. sed -E s/-I/-isystem/g -i $PSPDEV/psp/share/pspdev.cmake
  20. - name: Configure (CMake)
  21. run: |
  22. cmake -S . -B build \
  23. -Wdeprecated -Wdev -Werror \
  24. -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
  25. -DSDL_WERROR=ON \
  26. -DSDL_TESTS=ON \
  27. -DSDL_INSTALL_TESTS=ON \
  28. -DCMAKE_BUILD_TYPE=Release \
  29. -DCMAKE_INSTALL_PREFIX=prefix
  30. - name: Build (CMake)
  31. run: cmake --build build --config Release --verbose
  32. - name: Install (CMake)
  33. run: |
  34. echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
  35. cmake --install build --config Release
  36. ( cd prefix; find ) | LC_ALL=C sort -u
  37. - name: Package (CPack)
  38. run: |
  39. cmake --build build/ --config Release --target package
  40. - name: Verify CMake configuration files
  41. run: |
  42. cmake -S cmake/test -B cmake_config_build \
  43. -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
  44. -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
  45. -DTEST_SHARED=FALSE \
  46. -DCMAKE_BUILD_TYPE=Release
  47. cmake --build cmake_config_build --verbose
  48. - name: Verify sdl3.pc
  49. run: |
  50. export CC=psp-gcc
  51. export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
  52. export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
  53. cmake/test/test_pkgconfig.sh
  54. - uses: actions/upload-artifact@v4
  55. with:
  56. if-no-files-found: error
  57. name: SDL-psp
  58. path: build/dist/SDL3*