Skip to content

Commit

Permalink
infra: Fix AppImage build for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
regginator committed Oct 6, 2024
1 parent 51b956a commit dc545c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Build AppImage
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
run: |
ARCH_NAME="${RUNNER_ARCH,,}"
PLATFORM_NAME="${{ matrix.platform.name }}"
sudo apt install -y zsync desktop-file-utils appstream
Expand All @@ -93,13 +93,15 @@ jobs:
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x tools/appimagetool
# Explicitly set $ARCH for appimagetool
if [ "$ARCH_NAME" = "x64" ]; then
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64
elif [ "$ARCH_NAME" = "arm64" ]; then
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64
else
echo "Unexpected ARCH_NAME "$ARCH_NAME""
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1
fi
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
if: matrix.platform.os == 'ubuntu-latest'
run: |
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
Expand All @@ -135,13 +135,15 @@ jobs:
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x tools/appimagetool
# Explicitly set $ARCH for appimagetool
if [ "$ARCH_NAME" = "x64" ]; then
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64
elif [ "$ARCH_NAME" = "arm64" ]; then
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64
else
echo "Unexpected ARCH_NAME "$ARCH_NAME""
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1
fi
Expand Down

0 comments on commit dc545c3

Please sign in to comment.