Skip to content

Commit

Permalink
Add Linux ARM64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Jan 17, 2025
1 parent cf5d932 commit 75bb254
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ jobs:
- runner: 'ubuntu-22.04'
qtVersion: '6.8.1'
qtModules: 'qtimageformats'
osSuffix: '_x86_64'
buildArch: 'X64'
- runner: 'ubuntu-24.04-arm'
qtVersion: '6.8.1'
qtModules: 'qtimageformats'
osSuffix: '_aarch64'
buildArch: 'Arm64'
- runner: 'macos-14'
qtVersion: '6.8.1'
qtModules: 'qtimageformats'
Expand Down Expand Up @@ -46,6 +52,12 @@ jobs:
buildArch: 'X86'
runs-on: ${{ matrix.runner }}
steps:
- name: Fix PATH (Linux ARM runners)
if: runner.os == 'Linux' && runner.arch == 'ARM64'
shell: bash
run: |
echo "PATH=$(echo "$PATH" | sed 's/runneradmin/runner/g')" >> "$GITHUB_ENV"
- name: Set environment variables
shell: bash
run: |
Expand Down
21 changes: 15 additions & 6 deletions dist/scripts/linuxdeployqt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,32 @@ fi
sudo apt update
sudo apt install libfuse2

wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
if [[ "$buildArch" == "X64" ]]; then
ARCH_NAME="x86_64"
elif [[ "$buildArch" == "Arm64" ]]; then
ARCH_NAME="aarch64"
else
echo "Unsupported build architecture." >&2
exit 1
fi

wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$ARCH_NAME.AppImage"
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$ARCH_NAME.AppImage"
chmod a+x linuxdeploy-*.AppImage

mkdir -p bin/appdir/usr
make install INSTALL_ROOT=bin/appdir
cd bin
rm qview

../linuxdeploy-x86_64.AppImage \
../linuxdeploy-$ARCH_NAME.AppImage \
--plugin qt \
--appdir appdir \
--output appimage

if [ $1 != "" ]; then
mv *.AppImage qView-JDP-$1-Linux_x86_64.AppImage
if [[ -n "$1" ]]; then
mv *.AppImage qView-JDP-$1-Linux_$ARCH_NAME.AppImage
else
mv *.AppImage qView-JDP-$RELEASE_VER-Linux_x86_64.AppImage
mv *.AppImage qView-JDP-$RELEASE_VER-Linux_$ARCH_NAME.AppImage
fi
rm -r appdir

0 comments on commit 75bb254

Please sign in to comment.