4646 cc : clang
4747 cxx : clang++
4848 name : Linux-x64-clang
49+ - runner : ubuntu-latest
50+ name : Android
4951 build_type :
5052 - Debug
5153 - Release
6264 brew bundle install
6365
6466 - name : Install Linux dependencies
65- if : ${{ matrix.os.preset == 'linux' }}
67+ if : ${{ matrix.os.preset == 'linux' }} || ${{ matrix.os.name == 'Android' }}
6668 run : |
6769 sudo apt update
6870 sudo apt install -y --no-install-recommends \
@@ -81,23 +83,38 @@ jobs:
8183 with :
8284 vcpkgJsonGlob : vcpkg.json
8385
86+ - uses : actions/setup-java@v4
87+ if : ${{ matrix.os.name == 'Android' }}
88+ with :
89+ java-version : ' 17'
90+ distribution : ' temurin'
91+
92+ - name : Build APK
93+ if : ${{ matrix.os.name == 'Android' }}
94+ run : ./gradlew build
95+
8496 - name : Configure CMake
97+ if : ${{ matrix.os.name != 'Android' }}
8598 env :
8699 CC : ${{ matrix.os.cc }}
87100 CXX : ${{ matrix.os.cxx }}
88101 run : cmake --preset ${{ matrix.os.preset }} -DBUILD_TESTING=ON -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=ON
89102
90103 - name : Build ${{ matrix.build_type }}
104+ if : ${{ matrix.os.name != 'Android' }}
91105 run : cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --verbose
92106
93107 - name : Run ${{ matrix.build_type }} Unittests
108+ if : ${{ matrix.os.name != 'Android' }}
94109 run : ctest --preset ${{ matrix.os.preset }} -C ${{ matrix.build_type }}
95110
96111 - name : Local install
112+ if : ${{ matrix.os.name != 'Android' }}
97113 # There no cmake install presets so install in traditional way
98114 run : cmake --install builds/${{ matrix.os.preset }}/ --config ${{ matrix.build_type }}
99115
100116 - name : Upload Artifacts
117+ if : ${{ matrix.os.name != 'Android' }}
101118 uses : actions/upload-artifact@v4
102119 with :
103120 name : Descent3_${{ matrix.build_type }}_${{ matrix.os.name }}
0 commit comments