2021-12-07 02:00:01 -07:00
|
|
|
name: Build (Sony Playstation Portable)
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
2022-12-04 10:06:06 -07:00
|
|
|
concurrency:
|
2022-12-04 10:50:06 -07:00
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
2022-12-04 10:06:06 -07:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-12-07 02:00:01 -07:00
|
|
|
jobs:
|
|
|
|
psp:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: pspdev/pspdev:latest
|
|
|
|
steps:
|
2022-10-12 16:51:59 -06:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-07 02:00:01 -07:00
|
|
|
- name: Setup dependencies
|
|
|
|
run: |
|
2023-01-23 12:18:48 -07:00
|
|
|
apk update
|
2022-06-16 08:38:58 -06:00
|
|
|
apk add cmake gmp mpc1 mpfr4 make pkgconf
|
2023-03-29 15:49:01 -06:00
|
|
|
- name: Patch the pspdev toolchain to use -isystem instead of -I
|
|
|
|
run: |
|
|
|
|
# https://github.com/pspdev/pspsdk/issues/123
|
|
|
|
sed -E s/-I/-isystem/g -i $PSPDEV/psp/share/pspdev.cmake
|
2023-01-28 22:12:40 -07:00
|
|
|
- name: Configure (CMake)
|
2022-06-03 11:24:20 -06:00
|
|
|
run: |
|
|
|
|
cmake -S . -B build \
|
2023-01-23 21:30:24 -07:00
|
|
|
-Wdeprecated -Wdev -Werror \
|
2022-06-03 11:24:20 -06:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
2022-10-10 20:04:15 -06:00
|
|
|
-DSDL_WERROR=ON \
|
2022-06-03 11:24:20 -06:00
|
|
|
-DSDL_TESTS=ON \
|
2022-05-08 10:08:41 -06:00
|
|
|
-DSDL_INSTALL_TESTS=ON \
|
2022-06-03 11:24:20 -06:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=prefix
|
2023-01-28 22:12:40 -07:00
|
|
|
- name: Build (CMake)
|
2022-11-30 15:38:25 -07:00
|
|
|
run: cmake --build build --config Release --verbose
|
2023-01-28 22:12:40 -07:00
|
|
|
- name: Install (CMake)
|
2022-06-03 11:24:20 -06:00
|
|
|
run: |
|
2022-11-21 22:36:19 -07:00
|
|
|
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
2022-06-03 11:24:20 -06:00
|
|
|
cmake --install build --config Release
|
|
|
|
( cd prefix; find ) | LC_ALL=C sort -u
|
2023-01-28 22:12:40 -07:00
|
|
|
- name: Package (CPack)
|
|
|
|
run: |
|
|
|
|
cmake --build build/ --config Release --target package
|
2022-06-03 11:24:20 -06:00
|
|
|
- name: Verify CMake configuration files
|
|
|
|
run: |
|
|
|
|
cmake -S cmake/test -B cmake_config_build \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
2022-11-21 22:36:19 -07:00
|
|
|
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
2022-06-03 11:24:20 -06:00
|
|
|
-DTEST_SHARED=FALSE \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
|
|
cmake --build cmake_config_build --verbose
|
2022-11-21 22:36:19 -07:00
|
|
|
- name: Verify sdl3.pc
|
2022-06-16 08:38:58 -06:00
|
|
|
run: |
|
|
|
|
export CC=psp-gcc
|
2023-01-15 09:39:07 -07:00
|
|
|
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
2022-11-21 22:36:19 -07:00
|
|
|
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
2022-06-16 08:38:58 -06:00
|
|
|
cmake/test/test_pkgconfig.sh
|
2023-01-28 22:12:40 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
if-no-files-found: error
|
|
|
|
name: SDL-psp
|
|
|
|
path: build/dist/SDL3*
|