Skip to content

Commit 6ef47f3

Browse files
committed
Add workflows for Qt 6
1 parent c35ffbe commit 6ef47f3

File tree

3 files changed

+124
-18
lines changed

3 files changed

+124
-18
lines changed

.github/workflows/android-qt6.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build for Android (Qt6)
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the master branch
5+
on:
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
submodules: 'recursive'
20+
21+
- name: Set up JDK 8
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: 8
25+
distribution: temurin
26+
27+
- name: Setup Android SDK
28+
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # v2
29+
30+
- uses: nttld/setup-ndk@8c3b609ff4d54576ea420551943fd34b4d03b0dc # v1
31+
id: setup-ndk
32+
with:
33+
ndk-version: r25
34+
add-to-path: false
35+
36+
- name: Install Qt
37+
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
38+
with:
39+
version: '6.4.1'
40+
host: 'linux'
41+
target: 'android'
42+
# Qt 6 only supports multi-arch builds with CMake
43+
arch: 'android_arm64_v8a'
44+
cache: true
45+
46+
# Qt 6 for Android needs the desktop version for building as well
47+
- name: Install Qt (desktop)
48+
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
49+
with:
50+
version: '6.4.1'
51+
host: 'linux'
52+
target: 'desktop'
53+
cache: true
54+
55+
- name: Build firebird
56+
env:
57+
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
58+
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
59+
run: |
60+
mkdir build
61+
cd build
62+
qmake ..
63+
make -j4 apk_install_target
64+
65+
- name: Pack APK
66+
env:
67+
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
68+
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
69+
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
70+
ANDROID_KEYSTORE_PWD: ${{ secrets.ANDROID_KEYSTORE_PWD }}
71+
run: |
72+
cd build
73+
if [ -n "$ANDROID_KEYSTORE_PWD" ]; then
74+
echo "$ANDROID_KEYSTORE" | base64 -d > keystore.jks
75+
androiddeployqt --input android-firebird-emu-deployment-settings.json --output android-build --apk firebird-emu.apk --sign keystore.jks firebirdemugh --storepass "$ANDROID_KEYSTORE_PWD"
76+
else
77+
androiddeployqt --input android-firebird-emu-deployment-settings.json --output android-build --apk firebird-emu.apk
78+
fi
79+
80+
- name: Upload zip
81+
uses: actions/upload-artifact@v3
82+
with:
83+
name: firebird-emu-android
84+
path: build/firebird-emu.apk
85+
if-no-files-found: error

.github/workflows/macOS.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: Build macOS
22

33
on:
44
push:
5-
branches: [ master, ci/macOS ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ master, ci/macOS ]
7+
branches: [ master ]
88
release:
99
types: [published]
1010

1111
jobs:
1212
build:
13-
name: "Build: ${{ matrix.os }}"
14-
runs-on: ${{ matrix.os }}
13+
name: "Qt ${{ matrix.qt }}"
14+
runs-on: macOS-latest
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [macOS-latest]
18+
qt: [ "5.15.2", "6.4.1" ]
1919

2020
steps:
2121
- name: Checkout Git Repo
@@ -26,6 +26,7 @@ jobs:
2626
- name: Install Qt
2727
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
2828
with:
29+
version: "${{ matrix.qt }}"
2930
target: desktop
3031
setup-python: false
3132

@@ -93,5 +94,5 @@ jobs:
9394
- name: "Upload DMG"
9495
uses: actions/upload-artifact@v3
9596
with:
96-
name: firebird-emu_macOS
97+
name: "firebird-emu_macOS-Qt${{ matrix.qt }}"
9798
path: firebird-emu_macOS.dmg

.github/workflows/windows.yml

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,63 @@ name: Build for Windows
22

33
on:
44
push:
5-
branches: [ master, ci/windows ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ master, ci/windows ]
7+
branches: [ master ]
88
release:
99
types: [published]
1010

1111
jobs:
1212
build:
13-
name: "Build: ${{ matrix.arch }}"
13+
name: "Qt ${{ matrix.qt }} ${{ matrix.arch }}"
1414
runs-on: windows-2022
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
arch:
19-
- win32
20-
- win64
18+
include:
19+
- qt: '5.15.2'
20+
qtmaj: '5'
21+
arch: 'win32'
22+
- qt: '5.15.2'
23+
qtmaj: '5'
24+
arch: 'win64'
25+
- qt: '6.4.1'
26+
qtmaj: '6'
27+
arch: 'win64'
2128

2229
steps:
2330
- name: Checkout Git Repo
2431
uses: actions/checkout@v3
2532
with:
2633
submodules: 'recursive'
2734

28-
- name: Install Qt
35+
- name: "Install Qt ${{ matrix.qt }}"
2936
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
37+
if: matrix.qtmaj == '5'
3038
with:
31-
version: '5.15.2'
39+
version: '${{ matrix.qt }}'
3240
host: 'windows'
3341
target: 'desktop'
3442
arch: '${{ matrix.arch }}_mingw81'
3543
tools: 'tools_mingw,qt.tools.${{ matrix.arch }}_mingw810'
3644
cache: true
3745

46+
- name: "Install Qt ${{ matrix.qt }}"
47+
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
48+
if: matrix.qtmaj != '5'
49+
with:
50+
version: '${{ matrix.qt }}'
51+
host: 'windows'
52+
target: 'desktop'
53+
arch: '${{ matrix.arch }}_mingw'
54+
tools: 'tools_mingw90'
55+
cache: true
56+
3857
- name: Fixup PATH
3958
run: |
4059
echo "$env:IQTA_TOOLS/mingw810_32/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
4160
echo "$env:IQTA_TOOLS/mingw810_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
61+
echo "$env:IQTA_TOOLS/mingw1120_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
4262
4363
- name: Build firebird-emu
4464
run: |
@@ -53,7 +73,7 @@ jobs:
5373
- name: Upload zip
5474
uses: actions/upload-artifact@v3
5575
with:
56-
name: firebird-emu-${{ matrix.arch }}
57-
# Use a wildcard to force a subfolder
58-
path: "build/*-emu/"
59-
if-no-files-found: error
76+
name: firebird-emu-Qt${{ matrix.qtmaj }}-${{ matrix.arch }}
77+
# Use a wildcard to force a subfolder
78+
path: "build/*-emu/"
79+
if-no-files-found: error

0 commit comments

Comments
 (0)