Skip to content

mainui: update

mainui: update #114

Workflow file for this run

name: Build
on:
push:
branches:
- master
jobs:
android:
name: Android
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Build
run: ./gradlew assembleRelease
working-directory: android
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: android
path: android/app/build/outputs/apk/release/app-release-unsigned-signed.apk
windows:
name: Windows
runs-on: windows-latest
strategy:
matrix:
arch: ['x86']
fail-fast: false
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup Visual Studio
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Configure project
run: cmake --preset "win32-release-${{ matrix.arch }}"
- name: Build
run: cmake --build .
working-directory: build
- name: Generate extras.pk3
run: Compress-Archive -Path android/app/src/main/assets/* -Destination build/extras.pk3 -CompressionLevel NoCompression
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: win32-${{ matrix.arch }}
path: |
build/3rdparty/mainui_cpp/menu.dll
build/3rdparty/mainui_cpp/menu_amd64.dll
build/cl_dll/client.dll
build/cl_dll/client_amd64.dll
build/extras.pk3
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
arch: ['i386', 'amd64']
fail-fast: false
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libatomic1:i386 libgcc-s1:i386 \
libstdc++6:i386 gcc-multilib g++-multilib cmake \
ninja-build libfontconfig-dev:i386 libfontconfig-dev
- name: Configure project
run: |
if [[ ${{ matrix.arch }} == i386 ]]; then
export CC="gcc -m32"
export CXX="g++ -m32"
fi
cmake --preset "linux-release-${{ matrix.arch }}"
- name: Build
run: cmake --build .
working-directory: build
- name: Generate extras.pk3
run: zip -0 -r build/extras.pk3 android/app/src/main/assets
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: linux-${{ matrix.arch }}
path: |
build/3rdparty/mainui_cpp/menu.so
build/3rdparty/mainui_cpp/menu_amd64.so
build/cl_dll/client.so
build/cl_dll/client_amd64.so
build/extras.pk3
release:
name: Release
runs-on: ubuntu-latest
needs: [android, windows, linux]
steps:
- name: Fetch artifacts
uses: actions/download-artifact@v3
- name: Remove old release
uses: dev-drprasad/[email protected]
with:
tag_name: continuous
delete_release: true
github_token: ${{ secrets.REPO_TOKEN }}
- name: Repackage binaries
run: |
mv android/app-release-unsigned-signed.apk tf15-client.apk
mkdir -p tfc/dlls
mkdir -p tfc/cl_dlls
mv win32-x86/3rdparty/mainui_cpp/menu.dll tfc/cl_dlls
mv win32-x86/cl_dll/client.dll tfc/cl_dlls
mv win32-x86/extras.pk3 tfc
zip -r tf15-client_win32_x86.zip tfc/
rm -r tfc
# mkdir -p tfc/dlls
# mkdir -p tfc/cl_dlls
# mv win32-amd64/3rdparty/mainui_cpp/menu_amd64.dll tfc/cl_dlls
# mv win32-amd64/cl_dll/client_amd64.dll tfc/cl_dlls
# mv win32-amd64/extras.pk3 tfc
# zip -r tf15-client_win32_amd64.zip tfc/
# rm -r tfc
mkdir -p tfc/dlls
mkdir -p tfc/cl_dlls
mv linux-i386/3rdparty/mainui_cpp/menu.so tfc/cl_dlls
mv linux-i386/cl_dll/client.so tfc/cl_dlls
mv linux-i386/extras.pk3 tfc
tar -czvf tf15-client_linux_i386.tar.gz tfc/
rm -r tfc
mkdir -p tfc/dlls
mkdir -p tfc/cl_dlls
mv linux-amd64/3rdparty/mainui_cpp/menu_amd64.so tfc/cl_dlls
mv linux-amd64/cl_dll/client_amd64.so tfc/cl_dlls
mv linux-amd64/extras.pk3 tfc
tar -czvf tf15-client_linux_amd64.tar.gz tfc/
sleep 60s
- name: Purge artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: "*"
- name: Upload new release
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
file: tf15-client*
tag: continuous
overwrite: true
prerelease: true
release_name: TF15Client development build