Skip to content

Commit

Permalink
Add workflows for Qt 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogtinator committed Dec 27, 2022
1 parent c35ffbe commit 6ef47f3
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 18 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/android-qt6.yml
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
13 changes: 7 additions & 6 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Build macOS

on:
push:
branches: [ master, ci/macOS ]
branches: [ master ]
pull_request:
branches: [ master, ci/macOS ]
branches: [ master ]
release:
types: [published]

jobs:
build:
name: "Build: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
name: "Qt ${{ matrix.qt }}"
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
qt: [ "5.15.2", "6.4.1" ]

steps:
- name: Checkout Git Repo
Expand All @@ -26,6 +26,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
with:
version: "${{ matrix.qt }}"
target: desktop
setup-python: false

Expand Down Expand Up @@ -93,5 +94,5 @@ jobs:
- name: "Upload DMG"
uses: actions/upload-artifact@v3
with:
name: firebird-emu_macOS
name: "firebird-emu_macOS-Qt${{ matrix.qt }}"
path: firebird-emu_macOS.dmg
44 changes: 32 additions & 12 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,63 @@ name: Build for Windows

on:
push:
branches: [ master, ci/windows ]
branches: [ master ]
pull_request:
branches: [ master, ci/windows ]
branches: [ master ]
release:
types: [published]

jobs:
build:
name: "Build: ${{ matrix.arch }}"
name: "Qt ${{ matrix.qt }} ${{ matrix.arch }}"
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
arch:
- win32
- win64
include:
- qt: '5.15.2'
qtmaj: '5'
arch: 'win32'
- qt: '5.15.2'
qtmaj: '5'
arch: 'win64'
- qt: '6.4.1'
qtmaj: '6'
arch: 'win64'

steps:
- name: Checkout Git Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Install Qt
- name: "Install Qt ${{ matrix.qt }}"
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
if: matrix.qtmaj == '5'
with:
version: '5.15.2'
version: '${{ matrix.qt }}'
host: 'windows'
target: 'desktop'
arch: '${{ matrix.arch }}_mingw81'
tools: 'tools_mingw,qt.tools.${{ matrix.arch }}_mingw810'
cache: true

- name: "Install Qt ${{ matrix.qt }}"
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
if: matrix.qtmaj != '5'
with:
version: '${{ matrix.qt }}'
host: 'windows'
target: 'desktop'
arch: '${{ matrix.arch }}_mingw'
tools: 'tools_mingw90'
cache: true

- name: Fixup PATH
run: |
echo "$env:IQTA_TOOLS/mingw810_32/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$env:IQTA_TOOLS/mingw810_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$env:IQTA_TOOLS/mingw1120_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build firebird-emu
run: |
Expand All @@ -53,7 +73,7 @@ jobs:
- name: Upload zip
uses: actions/upload-artifact@v3
with:
name: firebird-emu-${{ matrix.arch }}
# Use a wildcard to force a subfolder
path: "build/*-emu/"
if-no-files-found: error
name: firebird-emu-Qt${{ matrix.qtmaj }}-${{ matrix.arch }}
# Use a wildcard to force a subfolder
path: "build/*-emu/"
if-no-files-found: error

0 comments on commit 6ef47f3

Please sign in to comment.