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