-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8966e5
commit 5e7597b
Showing
3 changed files
with
124 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Build for Android (Qt6) | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # v2 | ||
|
||
- uses: nttld/setup-ndk@8c3b609ff4d54576ea420551943fd34b4d03b0dc # v1 | ||
id: setup-ndk | ||
with: | ||
ndk-version: r25 | ||
add-to-path: false | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3 | ||
with: | ||
version: '6.4.1' | ||
host: 'linux' | ||
target: 'android' | ||
# Qt 6 only supports multi-arch builds with CMake | ||
arch: 'android_arm64_v8a' | ||
cache: true | ||
|
||
# Qt 6 for Android needs the desktop version for building as well | ||
- name: Install Qt (desktop) | ||
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3 | ||
with: | ||
version: '6.4.1' | ||
host: 'linux' | ||
target: 'desktop' | ||
cache: true | ||
|
||
- name: Build firebird | ||
env: | ||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | ||
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} | ||
run: | | ||
mkdir build | ||
cd build | ||
qmake .. | ||
make -j4 apk_install_target | ||
- name: Pack APK | ||
env: | ||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | ||
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} | ||
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }} | ||
ANDROID_KEYSTORE_PWD: ${{ secrets.ANDROID_KEYSTORE_PWD }} | ||
run: | | ||
cd build | ||
if [ -n "$ANDROID_KEYSTORE_PWD" ]; then | ||
echo "$ANDROID_KEYSTORE" | base64 -d > keystore.jks | ||
androiddeployqt --input android-firebird-emu-deployment-settings.json --output android-build --apk firebird-emu.apk --sign keystore.jks firebirdemugh --storepass "$ANDROID_KEYSTORE_PWD" | ||
else | ||
androiddeployqt --input android-firebird-emu-deployment-settings.json --output android-build --apk firebird-emu.apk | ||
fi | ||
- name: Upload zip | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: firebird-emu-android | ||
path: build/firebird-emu.apk | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters