infra: Fix AppImage build for arm64

This commit is contained in:
reggie 2024-10-06 14:42:31 -05:00
parent 51b956ac7f
commit dc545c33e4
2 changed files with 14 additions and 10 deletions

View file

@ -82,7 +82,7 @@ jobs:
- name: Build AppImage - name: Build AppImage
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest' if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
run: | run: |
ARCH_NAME="${RUNNER_ARCH,,}" PLATFORM_NAME="${{ matrix.platform.name }}"
sudo apt install -y zsync desktop-file-utils appstream sudo apt install -y zsync desktop-file-utils appstream
@ -93,13 +93,15 @@ jobs:
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x tools/appimagetool chmod +x tools/appimagetool
# Explicitly set $ARCH for appimagetool # Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$ARCH_NAME" = "x64" ]; then if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64 export ARCH=x86_64
elif [ "$ARCH_NAME" = "arm64" ]; then elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64 export ARCH=aarch64
else else
echo "Unexpected ARCH_NAME "$ARCH_NAME"" echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1 exit 1
fi fi

View file

@ -124,7 +124,7 @@ jobs:
if: matrix.platform.os == 'ubuntu-latest' if: matrix.platform.os == 'ubuntu-latest'
run: | run: |
BUILD_VERSION="${{ steps.version_info.outputs.build_version }}" BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
ARCH_NAME="${RUNNER_ARCH,,}" PLATFORM_NAME="${{ matrix.platform.name }}"
sudo apt install -y zsync desktop-file-utils appstream sudo apt install -y zsync desktop-file-utils appstream
@ -135,13 +135,15 @@ jobs:
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x tools/appimagetool chmod +x tools/appimagetool
# Explicitly set $ARCH for appimagetool # Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$ARCH_NAME" = "x64" ]; then if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64 export ARCH=x86_64
elif [ "$ARCH_NAME" = "arm64" ]; then elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64 export ARCH=aarch64
else else
echo "Unexpected ARCH_NAME "$ARCH_NAME"" echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1 exit 1
fi fi