|
| 1 | +# Only for building release version by Github CI workflow |
| 2 | + |
| 3 | +name: Android release apk CI |
| 4 | + |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: [ "master" ] |
| 8 | + paths: |
| 9 | + #- 'idTech4Amm/**' |
| 10 | + #- 'Q3E/**' |
| 11 | + - '.github/workflows/android_release.yml' |
| 12 | + pull_request: |
| 13 | + branches: [ "master" ] |
| 14 | + paths: |
| 15 | + #- 'idTech4Amm/**' |
| 16 | + #- 'Q3E/**' |
| 17 | + - '.github/workflows/android_release.yml' |
| 18 | + |
| 19 | +jobs: |
| 20 | + build-android: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + working-directory: . |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Setup env |
| 29 | + id: env |
| 30 | + run: | |
| 31 | + release=69 |
| 32 | + echo "release=${release}" >> $GITHUB_OUTPUT |
| 33 | + echo "version=1.1.0harmattan${release}" >> $GITHUB_OUTPUT |
| 34 | +
|
| 35 | + - name: Mound working directory |
| 36 | + run: | |
| 37 | + u=`whoami` |
| 38 | + sudo mkdir /mnt/diii4a |
| 39 | + sudo chown $u /mnt -R |
| 40 | + echo "disk usage: >>>" |
| 41 | + df -h |
| 42 | + du -ch | tail -n -1 |
| 43 | + echo "<<< disk usage" |
| 44 | + - name: Checkout code |
| 45 | + uses: actions/checkout@v2 |
| 46 | + |
| 47 | + - name: Setup jdk 11 |
| 48 | + uses: actions/setup-java@v4 |
| 49 | + with: |
| 50 | + java-version: 11 |
| 51 | + distribution: 'temurin' |
| 52 | + cache: gradle |
| 53 | + |
| 54 | + - name: Setup build environment |
| 55 | + run: | |
| 56 | + sudo apt-get update |
| 57 | + sudo apt-get -y install build-essential # libtinfo5 |
| 58 | +
|
| 59 | + - name: Change build directory |
| 60 | + run: | |
| 61 | + echo "Move to working directory" |
| 62 | + mv ./* /mnt/diii4a/ |
| 63 | + cd /mnt/diii4a |
| 64 | + echo "work directory: `pwd`" |
| 65 | + chmod +x ./gradlew |
| 66 | + echo "disk usage: >>>" |
| 67 | + df -h |
| 68 | + du -ch | tail -n -1 |
| 69 | + echo "<<< disk usage" |
| 70 | + chmod +x ./gradlew |
| 71 | + mkdir -p ${GITHUB_WORKSPACE}/libs/armeabi-v7a |
| 72 | + mkdir -p ${GITHUB_WORKSPACE}/libs/arm64-v8a |
| 73 | + mkdir -p ${GITHUB_WORKSPACE}/apks |
| 74 | + mkdir -p ${GITHUB_WORKSPACE}/builtin_libs |
| 75 | + mv Q3E/libs/arm64-v8a ${GITHUB_WORKSPACE}/builtin_libs/ |
| 76 | + mv Q3E/libs/armeabi-v7a ${GITHUB_WORKSPACE}/builtin_libs/ |
| 77 | +
|
| 78 | + - name: Build arm64 with Gradle |
| 79 | + id: arm64 |
| 80 | + run: | |
| 81 | + cd /mnt/diii4a |
| 82 | + arch=arm64-v8a |
| 83 | + barch=-Pabifilters=${arch} |
| 84 | + build_libs=Q3E/libs/${arch} |
| 85 | + backup_libs=${GITHUB_WORKSPACE}/libs/${arch} |
| 86 | + # copy 64-bit libraries |
| 87 | + echo "Copy 64-bit libraries" |
| 88 | + cp -rf ${GITHUB_WORKSPACE}/builtin_libs/${arch} Q3E/libs/ |
| 89 | + # build Xash3d only |
| 90 | + echo "Build Xash3D libraries" |
| 91 | + bargs="$barch -Pcmake_options=-DGAME_DOOM3=OFF,-DGAME_RTCW=OFF,-DGAME_QUAKE3=OFF,-DGAME_QUAKE2=OFF,-DGAME_QUAKE1=OFF,-DGAME_TDM=OFF,-DGAME_DOOM3BFG=OFF,-DGAME_DOOM=OFF,-DGAME_ETW=OFF,-DGAME_REALRTCW=OFF,-DGAME_FTEQW=OFF,-DGAME_JK=OFF,-DGAME_SERIOUSSAM=OFF,-DGAME_REALRTCW=OFF,-DGAME_URT=OFF,-DGAME_SOURCE=OFF" |
| 92 | + ./gradlew assembleRelease $bargs |
| 93 | + echo "disk usage: >>>" |
| 94 | + df -h |
| 95 | + du -ch | tail -n -1 |
| 96 | + echo "<<< disk usage" |
| 97 | + echo "Copy Xash3D libraries to libs" |
| 98 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libxash3d*so ${backup_libs} |
| 99 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libfilesystem_stdio.so ${backup_libs} |
| 100 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libclient_cs.so ${backup_libs} |
| 101 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libmenu_cs.so ${backup_libs} |
| 102 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libserver_cs.so ${backup_libs} |
| 103 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libserver_yapb.so ${backup_libs} |
| 104 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libclient_hl.so ${backup_libs} |
| 105 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libserver_hl.so ${backup_libs} |
| 106 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libmenu_hl.so ${backup_libs} |
| 107 | + cp ${backup_libs}/* ${build_libs}/ |
| 108 | + ls ${build_libs} |
| 109 | + # build Source only |
| 110 | + echo "Clean builds" |
| 111 | + ./gradlew clean $bargs |
| 112 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 113 | + echo "disk usage: >>>" |
| 114 | + df -h |
| 115 | + du -ch | tail -n -1 |
| 116 | + echo "<<< disk usage" |
| 117 | + echo "Build Source libraries" |
| 118 | + # ,-DBUILD_SOURCE_HL2=OFF,-DBUILD_SOURCE_HL2MP=OFF,-DBUILD_SOURCE_EPISODIC=OFF,-DBUILD_SOURCE_HL1=OFF,-DBUILD_SOURCE_HL1MP=OFF,-DBUILD_SOURCE_PORTAL=OFF |
| 119 | + bargs="$barch -Pcmake_options=-DGAME_DOOM3=OFF,-DGAME_RTCW=OFF,-DGAME_QUAKE3=OFF,-DGAME_QUAKE2=OFF,-DGAME_QUAKE1=OFF,-DGAME_TDM=OFF,-DGAME_DOOM3BFG=OFF,-DGAME_DOOM=OFF,-DGAME_ETW=OFF,-DGAME_REALRTCW=OFF,-DGAME_FTEQW=OFF,-DGAME_JK=OFF,-DGAME_SERIOUSSAM=OFF,-DGAME_REALRTCW=OFF,-DGAME_URT=OFF,-DGAME_XASH3D=OFF" |
| 120 | + ./gradlew assembleRelease $bargs |
| 121 | + echo "disk usage: >>>" |
| 122 | + df -h |
| 123 | + du -ch | tail -n -1 |
| 124 | + echo "<<< disk usage" |
| 125 | + echo "Copy Source libraries to libs" |
| 126 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libsource*so ${backup_libs} |
| 127 | + cp ${backup_libs}/* ${build_libs}/ |
| 128 | + ls ${build_libs} |
| 129 | + # build idTech4 only |
| 130 | + echo "Clean builds" |
| 131 | + ./gradlew clean $bargs |
| 132 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 133 | + echo "disk usage: >>>" |
| 134 | + df -h |
| 135 | + du -ch | tail -n -1 |
| 136 | + echo "<<< disk usage" |
| 137 | + echo "Build idTech4" |
| 138 | + bargs="$barch -Pcmake_options=-DGAME_RTCW=OFF,-DGAME_QUAKE3=OFF,-DGAME_QUAKE2=OFF,-DGAME_QUAKE1=OFF,-DGAME_TDM=OFF,-DGAME_DOOM=OFF,-DGAME_ETW=OFF,-DGAME_REALRTCW=OFF,-DGAME_FTEQW=OFF,-DGAME_JK=OFF,-DGAME_SERIOUSSAM=OFF,-DGAME_REALRTCW=OFF,-DGAME_URT=OFF,-DGAME_XASH3D=OFF,-DGAME_SOURCE=OFF" |
| 139 | + ./gradlew assembleRelease $bargs |
| 140 | + echo "disk usage: >>>" |
| 141 | + df -h |
| 142 | + du -ch | tail -n -1 |
| 143 | + echo "<<< disk usage" |
| 144 | + echo "Copy idTech4 libraries to libs" |
| 145 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libdoom3.so ${backup_libs} |
| 146 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libquake4.so ${backup_libs} |
| 147 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libprey.so ${backup_libs} |
| 148 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libRBDoom3BFG*.so ${backup_libs} |
| 149 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libgame.so ${backup_libs} |
| 150 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libd3xp.so ${backup_libs} |
| 151 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libcdoom.so ${backup_libs} |
| 152 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libd3le.so ${backup_libs} |
| 153 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libfraggingfree.so ${backup_libs} |
| 154 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libhardcorps.so ${backup_libs} |
| 155 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libhexeneoc.so ${backup_libs} |
| 156 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/liblibrecoop.so ${backup_libs} |
| 157 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/liblibrecoopxp.so ${backup_libs} |
| 158 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/liboverthinked.so ${backup_libs} |
| 159 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libperfected.so ${backup_libs} |
| 160 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libperfected_roe.so ${backup_libs} |
| 161 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/librivensin.so ${backup_libs} |
| 162 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libsabot.so ${backup_libs} |
| 163 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libtfphobos.so ${backup_libs} |
| 164 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libq4game.so ${backup_libs} |
| 165 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libhardqore.so ${backup_libs} |
| 166 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libpreygame.so ${backup_libs} |
| 167 | + cp ${backup_libs}/* ${build_libs}/ |
| 168 | + ls ${build_libs} |
| 169 | + # build non-idTech4 only |
| 170 | + echo "Clean builds" |
| 171 | + ./gradlew clean $bargs |
| 172 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 173 | + echo "disk usage: >>>" |
| 174 | + df -h |
| 175 | + du -ch | tail -n -1 |
| 176 | + echo "<<< disk usage" |
| 177 | + echo "Build final apk" |
| 178 | + bargs="$barch -Pcmake_options=-DGAME_XASH3D=OFF,-DGAME_SOURCE=OFF,-DGAME_DOOM3=OFF,-DGAME_DOOM3BFG=OFF" |
| 179 | + ./gradlew assembleRelease $bargs |
| 180 | + echo "disk usage: >>>" |
| 181 | + df -h |
| 182 | + du -ch | tail -n -1 |
| 183 | + echo "<<< disk usage" |
| 184 | + echo "Copy ${arch} release apk" |
| 185 | + apk_file=${GITHUB_WORKSPACE}/apks/idTech4A++_${{ steps.env.outputs.version }}_arm64.apk |
| 186 | + mv ./idTech4Amm/build/outputs/apk/release/idTech4Amm-release.apk ${apk_file} |
| 187 | + echo "Clean builds" |
| 188 | + ./gradlew clean $bargs |
| 189 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 190 | + echo "disk usage: >>>" |
| 191 | + df -h |
| 192 | + du -ch | tail -n -1 |
| 193 | + rm -rf Q3E/libs/{arch} |
| 194 | + echo "<<< disk usage" |
| 195 | + echo "apk=${apk_file}" >> $GITHUB_OUTPUT |
| 196 | +
|
| 197 | + - name: Build arm32 with Gradle |
| 198 | + id: arm32 |
| 199 | + run: | |
| 200 | + cd /mnt/diii4a |
| 201 | + arch=armeabi-v7a |
| 202 | + barch=-Pabifilters=${arch} |
| 203 | + build_libs=Q3E/libs/${arch} |
| 204 | + backup_libs=${GITHUB_WORKSPACE}/libs/${arch} |
| 205 | + # copy 32-bit libraries |
| 206 | + echo "Copy 32-bit libraries" |
| 207 | + cp -rf ${GITHUB_WORKSPACE}/builtin_libs/${arch} Q3E/libs/ |
| 208 | + # build Xash3d only |
| 209 | + echo "Build Xash3D libraries" |
| 210 | + bargs="$barch -Pcmake_options=-DGAME_DOOM3=OFF,-DGAME_RTCW=OFF,-DGAME_QUAKE3=OFF,-DGAME_QUAKE2=OFF,-DGAME_QUAKE1=OFF,-DGAME_TDM=OFF,-DGAME_DOOM3BFG=OFF,-DGAME_DOOM=OFF,-DGAME_ETW=OFF,-DGAME_REALRTCW=OFF,-DGAME_FTEQW=OFF,-DGAME_JK=OFF,-DGAME_SERIOUSSAM=OFF,-DGAME_REALRTCW=OFF,-DGAME_URT=OFF,-DGAME_SOURCE=OFF" |
| 211 | + ./gradlew assembleRelease $bargs |
| 212 | + echo "disk usage: >>>" |
| 213 | + df -h |
| 214 | + du -ch | tail -n -1 |
| 215 | + echo "<<< disk usage" |
| 216 | + echo "Copy Xash3D libraries to libs" |
| 217 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libxash3d*so ${backup_libs} |
| 218 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libfilesystem_stdio.so ${backup_libs} |
| 219 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libclient_cs.so ${backup_libs} |
| 220 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libmenu_cs.so ${backup_libs} |
| 221 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libserver_cs.so ${backup_libs} |
| 222 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libserver_yapb.so ${backup_libs} |
| 223 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libclient_hl.so ${backup_libs} |
| 224 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libserver_hl.so ${backup_libs} |
| 225 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libmenu_hl.so ${backup_libs} |
| 226 | + cp ${backup_libs}/* ${build_libs}/ |
| 227 | + ls ${build_libs} |
| 228 | + # build Source only |
| 229 | + echo "Clean builds" |
| 230 | + ./gradlew clean $bargs |
| 231 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 232 | + echo "disk usage: >>>" |
| 233 | + df -h |
| 234 | + du -ch | tail -n -1 |
| 235 | + echo "<<< disk usage" |
| 236 | + echo "Build Source libraries" |
| 237 | + # ,-DBUILD_SOURCE_HL2=OFF,-DBUILD_SOURCE_HL2MP=OFF,-DBUILD_SOURCE_EPISODIC=OFF,-DBUILD_SOURCE_HL1=OFF,-DBUILD_SOURCE_HL1MP=OFF,-DBUILD_SOURCE_PORTAL=OFF |
| 238 | + bargs="$barch -Pcmake_options=-DGAME_DOOM3=OFF,-DGAME_RTCW=OFF,-DGAME_QUAKE3=OFF,-DGAME_QUAKE2=OFF,-DGAME_QUAKE1=OFF,-DGAME_TDM=OFF,-DGAME_DOOM3BFG=OFF,-DGAME_DOOM=OFF,-DGAME_ETW=OFF,-DGAME_REALRTCW=OFF,-DGAME_FTEQW=OFF,-DGAME_JK=OFF,-DGAME_SERIOUSSAM=OFF,-DGAME_REALRTCW=OFF,-DGAME_URT=OFF,-DGAME_XASH3D=OFF" |
| 239 | + ./gradlew assembleRelease $bargs |
| 240 | + echo "disk usage: >>>" |
| 241 | + df -h |
| 242 | + du -ch | tail -n -1 |
| 243 | + echo "<<< disk usage" |
| 244 | + echo "Copy Source libraries to libs" |
| 245 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libsource*so ${backup_libs} |
| 246 | + cp ${backup_libs}/* ${build_libs}/ |
| 247 | + ls ${build_libs} |
| 248 | + # build idTech4 only |
| 249 | + echo "Clean builds" |
| 250 | + ./gradlew clean $bargs |
| 251 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 252 | + echo "disk usage: >>>" |
| 253 | + df -h |
| 254 | + du -ch | tail -n -1 |
| 255 | + echo "<<< disk usage" |
| 256 | + echo "Build idTech4" |
| 257 | + bargs="$barch -Pcmake_options=-DGAME_RTCW=OFF,-DGAME_QUAKE3=OFF,-DGAME_QUAKE2=OFF,-DGAME_QUAKE1=OFF,-DGAME_TDM=OFF,-DGAME_DOOM=OFF,-DGAME_ETW=OFF,-DGAME_REALRTCW=OFF,-DGAME_FTEQW=OFF,-DGAME_JK=OFF,-DGAME_SERIOUSSAM=OFF,-DGAME_REALRTCW=OFF,-DGAME_URT=OFF,-DGAME_XASH3D=OFF,-DGAME_SOURCE=OFF" |
| 258 | + ./gradlew assembleRelease $bargs |
| 259 | + echo "disk usage: >>>" |
| 260 | + df -h |
| 261 | + du -ch | tail -n -1 |
| 262 | + echo "<<< disk usage" |
| 263 | + echo "Copy idTech4 libraries to libs" |
| 264 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libdoom3.so ${backup_libs} |
| 265 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libquake4.so ${backup_libs} |
| 266 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libprey.so ${backup_libs} |
| 267 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libRBDoom3BFG*.so ${backup_libs} |
| 268 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libgame.so ${backup_libs} |
| 269 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libd3xp.so ${backup_libs} |
| 270 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libcdoom.so ${backup_libs} |
| 271 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libd3le.so ${backup_libs} |
| 272 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libfraggingfree.so ${backup_libs} |
| 273 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libhardcorps.so ${backup_libs} |
| 274 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libhexeneoc.so ${backup_libs} |
| 275 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/liblibrecoop.so ${backup_libs} |
| 276 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/liblibrecoopxp.so ${backup_libs} |
| 277 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/liboverthinked.so ${backup_libs} |
| 278 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libperfected.so ${backup_libs} |
| 279 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libperfected_roe.so ${backup_libs} |
| 280 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/librivensin.so ${backup_libs} |
| 281 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libsabot.so ${backup_libs} |
| 282 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libtfphobos.so ${backup_libs} |
| 283 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libq4game.so ${backup_libs} |
| 284 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libhardqore.so ${backup_libs} |
| 285 | + cp -f Q3E/build/intermediates/library_jni/release/jni/${arch}/libpreygame.so ${backup_libs} |
| 286 | + cp ${backup_libs}/* ${build_libs}/ |
| 287 | + ls ${build_libs} |
| 288 | + # build non-idTech4 only |
| 289 | + echo "Clean builds" |
| 290 | + ./gradlew clean $bargs |
| 291 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 292 | + echo "disk usage: >>>" |
| 293 | + df -h |
| 294 | + du -ch | tail -n -1 |
| 295 | + echo "<<< disk usage" |
| 296 | + echo "Build final apk" |
| 297 | + bargs="$barch -Pcmake_options=-DGAME_XASH3D=OFF,-DGAME_SOURCE=OFF,-DGAME_DOOM3=OFF,-DGAME_DOOM3BFG=OFF" |
| 298 | + ./gradlew assembleRelease $bargs |
| 299 | + echo "disk usage: >>>" |
| 300 | + df -h |
| 301 | + du -ch | tail -n -1 |
| 302 | + echo "<<< disk usage" |
| 303 | + echo "Copy ${arch} release apk" |
| 304 | + apk_file=${GITHUB_WORKSPACE}/apks/idTech4A++_${{ steps.env.outputs.version }}_arm32.apk |
| 305 | + mv ./idTech4Amm/build/outputs/apk/release/idTech4Amm-release.apk ${apk_file} |
| 306 | + echo "Clean builds" |
| 307 | + ./gradlew clean $bargs |
| 308 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 309 | + echo "disk usage: >>>" |
| 310 | + df -h |
| 311 | + du -ch | tail -n -1 |
| 312 | + rm -rf Q3E/libs/{arch} |
| 313 | + echo "<<< disk usage" |
| 314 | + echo "apk=${apk_file}" >> $GITHUB_OUTPUT |
| 315 | +
|
| 316 | + - name: Build all with Gradle |
| 317 | + id: all |
| 318 | + run: | |
| 319 | + cd /mnt/diii4a |
| 320 | + # copy built-in libraries |
| 321 | + echo "Copy built-in libraries" |
| 322 | + cp -rf ${GITHUB_WORKSPACE}/builtin_libs/armeabi-v7a Q3E/libs/ |
| 323 | + cp -rf ${GITHUB_WORKSPACE}/builtin_libs/arm64-v8a Q3E/libs/ |
| 324 | + echo "Copy last build libraries" |
| 325 | + cp ${GITHUB_WORKSPACE}/libs/armeabi-v7a/* Q3E/libs/armeabi-v7a/ |
| 326 | + cp ${GITHUB_WORKSPACE}/libs/arm64-v8a/* Q3E/libs/arm64-v8a/ |
| 327 | + echo "Build final apk" |
| 328 | + bargs="-Pcmake_options=-DGAME_XASH3D=OFF,-DGAME_SOURCE=OFF,-DGAME_DOOM3=OFF,-DGAME_DOOM3BFG=OFF" |
| 329 | + ./gradlew assembleRelease $bargs |
| 330 | + echo "disk usage: >>>" |
| 331 | + df -h |
| 332 | + du -ch | tail -n -1 |
| 333 | + echo "<<< disk usage" |
| 334 | + echo "Copy release apk" |
| 335 | + apk_file=${GITHUB_WORKSPACE}/apks/idTech4A++_${{ steps.env.outputs.version }}.apk |
| 336 | + mv ./idTech4Amm/build/outputs/apk/release/idTech4Amm-release.apk ${apk_file} |
| 337 | + echo "Clean builds" |
| 338 | + ./gradlew clean $bargs |
| 339 | + rm -rf Q3E/.cxx Q3E/build idTech4Amm/build |
| 340 | + echo "disk usage: >>>" |
| 341 | + df -h |
| 342 | + du -ch | tail -n -1 |
| 343 | + echo "<<< disk usage" |
| 344 | + echo "apk=${apk_file}" >> $GITHUB_OUTPUT |
| 345 | +
|
| 346 | + - name: Delete tag and release |
| 347 | + uses: dev-drprasad/[email protected] |
| 348 | + with: |
| 349 | + tag_name: android_release |
| 350 | + delete_release: true |
| 351 | + repo: glKarin/com.n0n3m4.diii4a |
| 352 | + github_token: ${{ secrets.TOKEN }} |
| 353 | + |
| 354 | + - name: Get release date time |
| 355 | + id: release_datetime |
| 356 | + uses: Kaven-Universe/github-action-current-date-time@v1 |
| 357 | + with: |
| 358 | + format: "YYYYMMDD-HHmmss" |
| 359 | + |
| 360 | + - name: Create release |
| 361 | + uses: "marvinpinto/action-automatic-releases@latest" |
| 362 | + with: |
| 363 | + repo_token: "${{ secrets.TOKEN }}" |
| 364 | + automatic_release_tag: "android_release" |
| 365 | + prerelease: true |
| 366 | + title: "[${{steps.release_datetime.outputs.time}}] Android release build (Non-release. Automatic CI builds)" |
| 367 | + files: | |
| 368 | + ${{ steps.arm64.outputs.apk }} |
| 369 | + ${{ steps.arm32.outputs.apk }} |
| 370 | + ${{ steps.all.outputs.apk }} |
0 commit comments