1- name : Android (arm64-v8a, API level 33)
1+ name : Android
22
33on :
44 push :
5- branches :
5+ branches :
66 - " *"
77 tags :
88 - " *"
9-
9+
1010 pull_request :
11- branches :
11+ branches :
1212 - " *"
1313
1414jobs :
1515 build-shared :
16- name : Shared Library
17- runs-on : ubuntu-latest
16+ name : " Libs: ${{ matrix.libs }}, ABI: ${{ matrix.abi }}, Platform: ${{ matrix.platform-version }}, Build OS: ${{ matrix.runs-on }}"
17+ runs-on : ${{ matrix.runs-on }}
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ libs : ['shared', 'static']
22+ abi : ['arm64-v8a', 'armeabi-v7a', 'x86_64']
23+ platform-version : ['33']
24+ runs-on : ['ubuntu-24.04']
1825
1926 steps :
2027 - uses : actions/checkout@v4
@@ -25,57 +32,39 @@ jobs:
2532 run : |
2633 sudo apt-get update
2734 sudo apt-get install -y ninja-build
28-
35+ #
2936 - name : Configure Build
30- run : cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DANDROID_PLATFORM=33 -DANDROID_ABI=arm64-v8a -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=NO -DENABLE_SDL_UI=OFF
31-
32- - name : Build Debug
33- run : cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel
34-
35- - name : Build Release
36- run : cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel
37-
38- - name : Install
39- run : |
40- cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install
41- cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install
42-
43- - name : Upload Artifact
44- uses : actions/upload-artifact@v4
45- with :
46- name : projectm-android-shared-latest
47- path : install/*
48-
49- build-static :
50- name : Static Library
51- runs-on : ubuntu-latest
52-
53- steps :
54- - uses : actions/checkout@v4
55- with :
56- submodules : ' recursive'
57-
58- - name : Install Packages
5937 run : |
60- sudo apt-get update
61- sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev libgtest-dev libgmock-dev ninja-build
62-
63- - name : Configure Build
64- run : cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DANDROID_PLATFORM=33 -DANDROID_ABI=arm64-v8a -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=NO -DENABLE_SDL_UI=OFF
65-
38+ if [ "${{ matrix.libs }}" == "shared" ]; then
39+ shared_libs=ON
40+ else
41+ shared_libs=OFF
42+ fi
43+ cmake -G "Ninja Multi-Config" \
44+ -S "${{ github.workspace }}" \
45+ -B "${{ github.workspace }}/cmake-build" \
46+ -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
47+ -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \
48+ -DANDROID_PLATFORM="${{ matrix.platform-version }}" \
49+ -DANDROID_ABI="${{ matrix.abi }}" \
50+ -DCMAKE_VERBOSE_MAKEFILE=YES \
51+ -DBUILD_SHARED_LIBS="${shared_libs}" \
52+ -DBUILD_TESTING=NO \
53+ -DENABLE_SDL_UI=OFF
54+ #
6655 - name : Build Debug
6756 run : cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel
68-
57+ #
6958 - name : Build Release
7059 run : cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel
71-
60+ #
7261 - name : Install
7362 run : |
7463 cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install
7564 cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install
76-
65+ #
7766 - name : Upload Artifact
7867 uses : actions/upload-artifact@v4
7968 with :
80- name : projectm-android-static-latest
81- path : install/*
69+ name : projectm-android-${{ matrix.libs }}-${{ matrix.abi }}-api${{ matrix.platform-version }}
70+ path : install/*
0 commit comments