From dc545c33e41c35623e6eb6294b0a96aa7881dcad Mon Sep 17 00:00:00 2001 From: reggie Date: Sun, 6 Oct 2024 14:42:31 -0500 Subject: [PATCH] infra: Fix AppImage build for arm64 --- .github/workflows/build.yml | 12 +++++++----- .github/workflows/release.yml | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4bfc647..d4aff70f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5acc28de..bba8309d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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