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