Skip to content

Commit

Permalink
Support GitHub's Linux arm64 preview hosts
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit a3916a5
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 14:38:50 2025 +1100

    Reinstate all macOS and Windows builds

commit bd0c6be
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 14:24:42 2025 +1100

    Use x86-64 as the arch matrix value

    For consistency with other workflow jobs.

commit 987f22e
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 14:04:59 2025 +1100

    Avoid workflow expressions in `uses`

    GitHub Actions does not support that.

commit 30c2794
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 14:00:51 2025 +1100

    Use jdpurcell's patch on linux-arm runners for now

    At least until jurplel/install-qt-action#248
    is resolved.

commit b7e5bf1
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 13:51:26 2025 +1100

    Auto-detect linuxdeploy-aarch64.AppImage too

commit ec94af3
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 13:12:29 2025 +1100

    Set the correct host type (default the arch)

commit de316e8
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 13:01:00 2025 +1100

    Tell coveralls the correct arch

commit e1176d0
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 12:09:22 2025 +1100

    Exclude Qt versions not supported by Qt's online installer

    Thus, not supported by aqtinstall, and thus not supported by
    install-qt-action.

commit ef98409
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 12:02:58 2025 +1100

    Install Qt for the right arch

commit eb63847
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 11:57:30 2025 +1100

    Include the right arch in the Linux build IDs

commit 34427ce
Merge: 20ce8fe 18872c5
Author: Paul Colby <[email protected]>
Date:   Sat Jan 18 11:35:51 2025 +1100

    Merge branch 'main' into linux-arm64

commit 20ce8fe
Author: Paul Colby <[email protected]>
Date:   Thu Jan 16 18:01:56 2025 +1100

    Hold the correct EFI package

commit 5370b0e
Author: Paul Colby <[email protected]>
Date:   Thu Jan 16 18:00:00 2025 +1100

    Try out GitHub's new Linux arm64 runners

    Now in public preview:
    https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
  • Loading branch information
pcolby committed Jan 18, 2025
1 parent 18872c5 commit d54fbbc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
linux:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -35,13 +35,31 @@ jobs:
- 6.7.3
- 6.8.1
- 6.9.0
arch:
- arm64
- x86-64
cc:
- clang
- gcc
exclude:
# Qt's online installer only provides arm64 builds from Qt 6.7 onwards. Note, Ubuntu (Debian) does provide
# arm64 Qt builds, so we don't exclude `5` nor `6`, just the Qt online versions (5.x.y and 6.[0-6].y).
- { qt: 5.9.9, arch: arm64 }
- { qt: 5.10.1, arch: arm64 }
- { qt: 5.11.3, arch: arm64 }
- { qt: 5.12.12, arch: arm64 }
- { qt: 5.13.2, arch: arm64 }
- { qt: 5.14.2, arch: arm64 }
- { qt: 5.15.2, arch: arm64 }
- { qt: 6.2.4, arch: arm64 }
- { qt: 6.3.2, arch: arm64 }
- { qt: 6.4.3, arch: arm64 }
- { qt: 6.5.3, arch: arm64 }
- { qt: 6.6.3, arch: arm64 }
steps:
- name: Upgrade OS
run: |
sudo apt-mark hold firefox grub-efi-amd64-signed
sudo apt-mark hold firefox grub-efi-${{ matrix.arch == 'arm64' && 'arm64' || 'amd64' }}-signed
sudo apt update && sudo apt upgrade
sudo apt install lcov llvm
- uses: actions/setup-python@v5
Expand All @@ -55,7 +73,7 @@ jobs:
run: >
sudo apt install qt6-{base-{dev{,-tools},doc-dev},connectivity-{dev,doc-html},l10n-tools,tools-dev{,-tools}}
- name: Install online Qt version
if: contains(matrix.qt, '.') # ie if not using Ubuntu's Qt5/Qt6.
if: contains(matrix.qt, '.') && matrix.arch != 'arm64' # ie if not using Ubuntu's Qt5/Qt6.
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt }}
Expand All @@ -71,6 +89,27 @@ jobs:
aqtsource: >-
${{ (startsWith(matrix.qt, '6.8') || startsWith(matrix.qt, '6.9')) &&
'git+https://github.com/miurahr/aqtinstall.git' || '' }}
- name: Install online Qt version for arm64
# \todo Revert to only using jurplel's action when issue #248 is resolved.
# Note, can probably remove the host property below at the same time.
# \todo See https://github.com/jurplel/install-qt-action/issues/248
if: contains(matrix.qt, '.') && matrix.arch == 'arm64' # ie if not using Ubuntu's Qt5/Qt6.
uses: jdpurcell/install-qt-action@b45c67aaa9e0ea77e59a7031ec14a12d5ddf4b35
with:
version: ${{ matrix.qt }}
host: linux_arm64
modules: ${{ startsWith(matrix.qt, '6') && 'qtconnectivity' || '' }}
setup-python: false
documentation: true
doc-archives: >-
${{ (startsWith(matrix.qt, '5.10.') || startsWith(matrix.qt, '5.11.')) && 'qt' ||
(startsWith(matrix.qt, '5') && 'qtcore qtbluetooth' || 'qtcore') }}
doc-modules: ${{ startsWith(matrix.qt, '6') && 'qtbluetooth' || '' }}
# \todo Use aqtinstall HEAD for Qt 6.8.1 and 6.9.0 support, until the fix for #843 is released (presumably in
# aqtinstall 3.1.22. See https://github.com/miurahr/aqtinstall/issues/843
aqtsource: >-
${{ (startsWith(matrix.qt, '6.8') || startsWith(matrix.qt, '6.9')) &&
'git+https://github.com/miurahr/aqtinstall.git' || '' }}
- name: Upload aqtinstall log file
if: failure()
uses: actions/upload-artifact@v4
Expand All @@ -88,7 +127,7 @@ jobs:
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cc == 'gcc' && 'g++' || 'clang++' }}
PROJECT_BUILD_ID: ${{ github.run_number }}.linux.x86-64.${{ matrix.cc }}.qt-${{ matrix.qt }}
PROJECT_BUILD_ID: ${{ github.run_number }}.linux.${{ matrix.arch }}.${{ matrix.cc }}.qt-${{ matrix.qt }}
run: |
[[ '${{ matrix.qt }}' =~ ^[56]$ ]] ||
qtInstallDocs="$RUNNER_WORKSPACE/Qt/Docs/Qt-${QT_VERSION:-${{ matrix.qt }}}"
Expand Down Expand Up @@ -133,6 +172,9 @@ jobs:
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
uses: coverallsapp/github-action@v2
with:
# Note, the coverage-reporter-platform option is currently undocumented. See
# https://github.com/coverallsapp/github-action/issues/218#issuecomment-2436338747
coverage-reporter-platform: ${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}
file: ${{ runner.temp }}/coverage/coverage.info
format: lcov
flag-name: linux-${{ matrix.cc }}-${{ matrix.qt }}
Expand Down
2 changes: 1 addition & 1 deletion src/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ target_link_libraries(
PRIVATE Qt${QT_VERSION_MAJOR}::Core
PRIVATE Qt${QT_VERSION_MAJOR}::Bluetooth)

find_program(LINUXDEPLOY NAMES linuxdeploy linuxdeploy-x86_64.AppImage)
find_program(LINUXDEPLOY NAMES linuxdeploy linuxdeploy-aarch64.AppImage linuxdeploy-x86_64.AppImage)
if (LINUXDEPLOY)
message(STATUS "Found linuxdeploy: ${LINUXDEPLOY}")
configure_file(desktop.in dokit.desktop)
Expand Down

0 comments on commit d54fbbc

Please sign in to comment.