🛠️🐜 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.

73 lines
2.4 KiB

  1. name: Build (Sony Playstation 2)
  2. on: [push, pull_request]
  3. jobs:
  4. ps2:
  5. runs-on: ubuntu-latest
  6. container: ps2dev/ps2dev:latest
  7. steps:
  8. - uses: actions/checkout@v3
  9. - name: Setup dependencies
  10. run: |
  11. apk update
  12. apk add cmake gmp mpc1 mpfr4 ninja pkgconf make git
  13. # To be removed once ps2_drivers is part of PS2DEV
  14. - name: Install ps2_drivers lib
  15. run: |
  16. git clone https://github.com/fjtrujy/ps2_drivers.git
  17. cd ps2_drivers
  18. make -j $(getconf _NPROCESSORS_ONLN) clean
  19. make -j $(getconf _NPROCESSORS_ONLN)
  20. make -j $(getconf _NPROCESSORS_ONLN) install
  21. - name: Configure (CMake)
  22. run: |
  23. cmake -S . -B build -G Ninja \
  24. -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
  25. -DSDL_WERROR=ON \
  26. -DSDL_TESTS=ON \
  27. -DCMAKE_INSTALL_PREFIX=cmake_prefix \
  28. -DCMAKE_BUILD_TYPE=Release
  29. - name: Build
  30. run: cmake --build build --config Release --verbose --parallel
  31. - name: Install (CMake)
  32. run: |
  33. set -eu
  34. cmake --install build/ --config Release
  35. echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
  36. ( cd cmake_prefix; find ) | LC_ALL=C sort -u
  37. - name: Verify CMake configuration files
  38. run: |
  39. cmake -S cmake/test -B cmake_config_build -G Ninja \
  40. -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
  41. -DTEST_SHARED=FALSE \
  42. -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
  43. -DCMAKE_BUILD_TYPE=Release
  44. cmake --build cmake_config_build --verbose
  45. - name: Verify sdl2-config
  46. run: |
  47. export CC=mips64r5900el-ps2-elf-gcc
  48. export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
  49. export PATH=${{ env.SDL2_DIR }}/bin:$PATH
  50. cmake/test/test_sdlconfig.sh
  51. - name: Verify sdl2.pc
  52. run: |
  53. export CC=mips64r5900el-ps2-elf-gcc
  54. export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
  55. export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
  56. cmake/test/test_pkgconfig.sh
  57. - name: Get short SHA
  58. id: slug
  59. run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
  60. - name: Upload artifacts
  61. if: ${{ success() }}
  62. uses: actions/upload-artifact@v3
  63. with:
  64. name: tests-${{ steps.slug.outputs.sha8 }}
  65. path: |
  66. build/test