From 8222bfe56d4dabe8d92fc4b25ea1b0163b16f3e1 Mon Sep 17 00:00:00 2001
From: 3gg <3gg@shellblade.net>
Date: Sat, 4 May 2024 16:51:29 -0700
Subject: Initial commit.

---
 .../SDL-2.30.2/.github/workflows/riscos.yml        | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 src/contrib/SDL-2.30.2/.github/workflows/riscos.yml

(limited to 'src/contrib/SDL-2.30.2/.github/workflows/riscos.yml')

diff --git a/src/contrib/SDL-2.30.2/.github/workflows/riscos.yml b/src/contrib/SDL-2.30.2/.github/workflows/riscos.yml
new file mode 100644
index 0000000..9f4c140
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/riscos.yml
@@ -0,0 +1,68 @@
+name: Build (RISC OS)
+
+on: [push, pull_request]
+
+jobs:
+  Build:
+    name: ${{ matrix.platform.name }}
+    runs-on: ubuntu-latest
+    container: riscosdotinfo/riscos-gccsdk-4.7:latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        platform:
+          - { name: autotools, test_args: '-DTEST_SHARED=FALSE' } # FIXME: autotools should build and install shared libraries
+          - { name: CMake }
+
+    steps:
+    - name: Setup dependencies
+      run: apt-get update && apt-get install -y cmake ninja-build
+    - uses: actions/checkout@v4
+    - name: Configure (autotools)
+      if: ${{ contains(matrix.platform.name, 'autotools') }}
+      run: |
+        mkdir build_autotools
+        cd build_autotools
+        ../configure \
+          --host=arm-unknown-riscos \
+          --disable-gcc-atomics \
+          --prefix=${{ github.workspace }}/prefix_autotools
+    - name: Build (autotools)
+      if: ${{ contains(matrix.platform.name, 'autotools') }}
+      run: make -C build_autotools -j`nproc` V=1
+    - name: Install (autotools)
+      if: ${{ contains(matrix.platform.name, 'autotools') }}
+      run: |
+        echo "SDL2_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
+        make -C build_autotools install
+        ( cd ${{ github.workspace }}/prefix_autotools; find ) | LC_ALL=C sort -u
+    - name: Configure (CMake)
+      if: ${{ contains(matrix.platform.name, 'CMake') }}
+      run: |
+        cmake -S . -B build -G Ninja \
+          -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
+          -DRISCOS=ON \
+          -DSDL_GCC_ATOMICS=OFF \
+          -DSDL_TESTS=ON \
+          -DSDL_INSTALL_TESTS=ON \
+          -DSDL_VENDOR_INFO="Github Workflow" \
+          -DCMAKE_BUILD_TYPE=Release \
+          -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
+    - name: Build (CMake)
+      if: ${{ contains(matrix.platform.name, 'CMake') }}
+      run: cmake --build build --verbose
+    - name: Install (CMake)
+      if: ${{ contains(matrix.platform.name, 'CMake') }}
+      run: |
+        echo "SDL2_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
+        cmake --install build/
+        ( cd ${{ github.workspace }}/prefix_cmake; find ) | LC_ALL=C sort -u
+    - name: Verify CMake configuration files
+      run: |
+        cmake -S cmake/test -B cmake_config_build -G Ninja \
+          -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
+          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
+          -DCMAKE_BUILD_TYPE=Release \
+          ${{ matrix.platform.test_args }}
+        cmake --build cmake_config_build --verbose
-- 
cgit v1.2.3