Skip to content

Commit bf2233d

Browse files
committed
CI: Add Linux Arm64 Release
1 parent eee119e commit bf2233d

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

.github/workflows/linux.yml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,23 @@ on:
2525

2626
jobs:
2727
build:
28-
runs-on: ubuntu-22.04
28+
runs-on: ${{ matrix.runs-on }}
2929

3030
strategy:
3131
matrix:
3232
BuildType: [Debug, Release]
33-
# Arch: [x64] # Arm64
33+
runs-on: [ubuntu-24.04-arm, ubuntu-22.04]
34+
include:
35+
- runs-on: ubuntu-24.04-arm
36+
ARTIFACT: QGroundControl-aarch64.AppImage
37+
PACKAGE: QGroundControl-aarch64
38+
host: linux_arm64
39+
arch: linux_gcc_arm64
40+
- runs-on: ubuntu-22.04
41+
ARTIFACT: QGroundControl-x86_64.AppImage
42+
PACKAGE: QGroundControl-x86_64
43+
host: linux
44+
arch: linux_gcc_64
3445

3546
defaults:
3647
run:
@@ -50,7 +61,7 @@ jobs:
5061
fetch-tags: false
5162

5263
- name: Get all tags for correct version determination
53-
working-directory: ${{ github.workspace }}
64+
working-directory: ${{ github.workspace }}
5465
run: |
5566
git fetch --all --tags -f --depth 1
5667
@@ -62,28 +73,21 @@ jobs:
6273
chmod a+x ./tools/setup/install-dependencies-debian.sh
6374
sudo ./tools/setup/install-dependencies-debian.sh
6475
65-
- name: Install Vulkan
66-
run: |
67-
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
68-
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
69-
sudo apt update
70-
sudo apt install vulkan-sdk
71-
7276
- name: Setup Caching
7377
uses: ./.github/actions/cache
7478
with:
75-
host: linux
76-
target: linux_gcc_64
79+
host: ${{ matrix.host }}
80+
target: ${{ matrix.arch }}
7781
build-type: ${{ matrix.BuildType }}
7882
cpm-modules: ${{ runner.temp }}/shadow_build_dir/cpm_modules
7983

80-
- name: Install Qt for Linux (x64)
81-
uses: jurplel/install-qt-action@v4
84+
- name: Install Qt for Linux
85+
uses: jurplel/install-qt-action@master
8286
with:
8387
version: ${{ env.QT_VERSION }}
84-
host: linux
88+
host: ${{ matrix.host }}
8589
target: desktop
86-
arch: linux_gcc_64
90+
arch: ${{ matrix.arch }}
8791
dir: ${{ runner.temp }}
8892
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
8993
cache: true
@@ -109,19 +113,19 @@ jobs:
109113
- name: Sanity check release excecutable
110114
if: matrix.BuildType == 'Release'
111115
working-directory: ${{ runner.temp }}/shadow_build_dir
112-
run: xvfb-run -a ./${{ env.ARTIFACT }} --simple-boot-test
116+
run: xvfb-run -a ./${{ matrix.ARTIFACT }} --simple-boot-test
113117

114118
- name: Run unit tests
115119
if: matrix.BuildType == 'Debug'
116120
working-directory: ${{ runner.temp }}/shadow_build_dir
117-
run: xvfb-run -a ./${{ env.ARTIFACT }} --unittest
121+
run: xvfb-run -a ./${{ matrix.ARTIFACT }} --unittest
118122

119123
- name: Upload Build File
120124
if: matrix.BuildType == 'Release'
121125
uses: ./.github/actions/upload
122126
with:
123-
artifact_name: ${{ env.ARTIFACT }}
124-
package_name: ${{ env.PACKAGE }}
127+
artifact_name: ${{ matrix.ARTIFACT }}
128+
package_name: ${{ matrix.PACKAGE }}
125129
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
126130
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
127131
github_token: ${{ secrets.GITHUB_TOKEN }}

cmake/CreateAppImage.cmake

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,28 @@ message(STATUS "Creating AppImage")
33

44
set(APPDIR_PATH "${CMAKE_BINARY_DIR}/AppDir")
55
set(APPIMAGETOOL_PATH "${CMAKE_BINARY_DIR}/appimagetool-x86_64.AppImage")
6-
set(LD_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-x86_64.AppImage")
7-
# set(LD_APPIMAGEPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-appimage-x86_64.AppImage")
8-
# set(LD_QTPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-qt-x86_64.AppImage")
6+
set(LD_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-${CMAKE_SYSTEM_PROCESSOR}.AppImage")
7+
# set(LD_APPIMAGEPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-appimage-${CMAKE_SYSTEM_PROCESSOR}.AppImage")
8+
# set(LD_QTPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-qt-${CMAKE_SYSTEM_PROCESSOR}.AppImage")
99
# set(LD_GSTPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-gstreamer.sh")
10-
# set(LD_GTKPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-gtk.sh")
1110

1211
if(NOT EXISTS "${APPIMAGETOOL_PATH}")
13-
file(DOWNLOAD https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage "${APPIMAGETOOL_PATH}")
14-
# file(DOWNLOAD https://github.com/probonopd/go-appimage/releases/download/832/appimagetool-823-x86_64.AppImage "${APPIMAGETOOL_PATH}") # TODO: Use Continuous Release
12+
file(DOWNLOAD https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${CMAKE_SYSTEM_PROCESSOR}.AppImage "${APPIMAGETOOL_PATH}")
13+
# file(DOWNLOAD https://github.com/probonopd/go-appimage/releases/download/832/appimagetool-823-${CMAKE_SYSTEM_PROCESSOR}.AppImage "${APPIMAGETOOL_PATH}") # TODO: Use Continuous Release
1514
execute_process(COMMAND chmod a+x "${APPIMAGETOOL_PATH}")
1615
endif()
1716
if(NOT EXISTS "${LD_PATH}")
18-
file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage "${LD_PATH}")
17+
file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${CMAKE_SYSTEM_PROCESSOR}.AppImage "${LD_PATH}")
1918
execute_process(COMMAND chmod a+x "${LD_PATH}")
2019
endif()
2120
# if(NOT EXISTS "${LD_APPIMAGEPLUGIN_PATH}")
22-
# file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage "${LD_APPIMAGEPLUGIN_PATH}")
21+
# file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-${CMAKE_SYSTEM_PROCESSOR}.AppImage "${LD_APPIMAGEPLUGIN_PATH}")
2322
# execute_process(COMMAND chmod a+x "${LD_APPIMAGEPLUGIN_PATH}")
2423
# endif()
2524
# if(NOT EXISTS "${LD_QTPLUGIN_PATH}")
26-
# file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage "${LD_QTPLUGIN_PATH}")
25+
# file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${CMAKE_SYSTEM_PROCESSOR}.AppImage "${LD_QTPLUGIN_PATH}")
2726
# execute_process(COMMAND chmod a+x "${LD_QTPLUGIN_PATH}")
2827
# endif()
29-
# if(NOT EXISTS "${LD_GTKPLUGIN_PATH}")
30-
# file(DOWNLOAD https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh "${LD_GTKPLUGIN_PATH}")
31-
# execute_process(COMMAND chmod a+x "${LD_GTKPLUGIN_PATH}")
32-
# endif()
3328
# if(NOT EXISTS "${LD_GSTPLUGIN_PATH}")
3429
# file(DOWNLOAD https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gstreamer/master/linuxdeploy-plugin-gstreamer.sh "${LD_GSTPLUGIN_PATH}")
3530
# execute_process(COMMAND chmod a+x "${LD_GSTPLUGIN_PATH}")
@@ -40,9 +35,9 @@ execute_process(COMMAND ${LD_PATH}
4035
--executable ${APPDIR_PATH}/usr/bin/QGroundControl
4136
--desktop-file ${APPDIR_PATH}/usr/share/applications/org.mavlink.qgroundcontrol.desktop
4237
--custom-apprun ${CMAKE_BINARY_DIR}/AppRun)
43-
# --exclude-library "libgst*"
44-
# --plugin qt --plugin gtk --plugin gstreamer
38+
# --plugin qt --plugin gstreamer
39+
# --exclude-library "libgst*"
4540

46-
set(ENV{ARCH} x86_64)
41+
set(ENV{ARCH} ${CMAKE_SYSTEM_PROCESSOR})
4742
# set(ENV{VERSION} 5.0)
4843
execute_process(COMMAND ${APPIMAGETOOL_PATH} ${APPDIR_PATH})

cmake/Install.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ elseif(LINUX)
6464
FILES ${CMAKE_SOURCE_DIR}/deploy/linux/AppRun
6565
DESTINATION ${CMAKE_BINARY_DIR}
6666
)
67+
install(CODE "set(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")")
6768
install(SCRIPT "${CMAKE_SOURCE_DIR}/cmake/CreateAppImage.cmake")
6869
elseif(WIN32)
6970
install(CODE "set(CMAKE_PROJECT_NAME ${CMAKE_PROJECT_NAME})")

0 commit comments

Comments
 (0)