summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-2.30.2/.github/workflows/android.yml
diff options
context:
space:
mode:
Diffstat (limited to 'src/contrib/SDL-2.30.2/.github/workflows/android.yml')
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/android.yml81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/android.yml b/src/contrib/SDL-2.30.2/.github/workflows/android.yml
new file mode 100644
index 0000000..a2d2b0b
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/android.yml
@@ -0,0 +1,81 @@
1name: Build (Android)
2
3on: [push, pull_request]
4
5jobs:
6 android:
7 name: ${{ matrix.platform.name }}
8 runs-on: ubuntu-latest
9
10 strategy:
11 fail-fast: false
12 matrix:
13 platform:
14 - { name: Android.mk }
15 - { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64" }
16
17 steps:
18 - uses: actions/checkout@v4
19 - uses: nttld/setup-ndk@v1
20 id: setup_ndk
21 with:
22 ndk-version: r21e
23 - name: Build (Android.mk)
24 if: ${{ matrix.platform.name == 'Android.mk' }}
25 run: |
26 ./build-scripts/androidbuildlibs.sh
27 - name: Setup (CMake)
28 if: ${{ matrix.platform.name == 'CMake' }}
29 run: |
30 sudo apt-get update
31 sudo apt-get install ninja-build pkg-config
32 - name: Configure (CMake)
33 if: ${{ matrix.platform.name == 'CMake' }}
34 run: |
35 cmake -B build \
36 -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
37 -DSDL_WERROR=ON \
38 -DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
39 -DANDROID_ABI=${{ matrix.platform.android_abi }} \
40 -DSDL_STATIC_PIC=ON \
41 -DSDL_VENDOR_INFO="Github Workflow" \
42 -DCMAKE_INSTALL_PREFIX=prefix \
43 -DCMAKE_BUILD_TYPE=Release \
44 -GNinja
45 - name: Build (CMake)
46 if: ${{ matrix.platform.name == 'CMake' }}
47 run: |
48 cmake --build build --config Release --parallel --verbose
49 - name: Install (CMake)
50 if: ${{ matrix.platform.name == 'CMake' }}
51 run: |
52 cmake --install build --config Release
53 echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
54 ( cd prefix; find ) | LC_ALL=C sort -u
55 - name: Verify CMake configuration files
56 if: ${{ matrix.platform.name == 'CMake' }}
57 run: |
58 cmake -S cmake/test -B cmake_config_build -G Ninja \
59 -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
60 -DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
61 -DANDROID_ABI=${{ matrix.platform.android_abi }} \
62 -DCMAKE_BUILD_TYPE=Release \
63 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
64 cmake --build cmake_config_build --verbose
65 - name: Verify sdl2-config
66 if: ${{ matrix.platform.name == 'CMake' }}
67 run: |
68 export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
69 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
70 cmake/test/test_sdlconfig.sh
71 - name: Verify sdl2.pc
72 if: ${{ matrix.platform.name == 'CMake' }}
73 run: |
74 export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
75 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
76 cmake/test/test_pkgconfig.sh
77 - name: Verify Android.mk
78 if: ${{ matrix.platform.name == 'CMake' }}
79 run: |
80 export NDK_MODULE_PATH=${{ env.SDL2_DIR }}/share/ndk-modules
81 ndk-build -C ${{ github.workspace }}/cmake/test APP_PLATFORM=android-${{ matrix.platform.android_platform }} APP_ABI=${{ matrix.platform.android_abi }} NDK_OUT=$PWD NDK_LIBS_OUT=$PWD V=1