Skip to content

Commit

Permalink
build: Added ARM64 AppImage build (#2073)
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv authored Jan 17, 2025
1 parent 14fb256 commit 63a219a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 33 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ jobs:
for plugin in install/plugins/*.hexplug; do
./cv2pdb/cv2pdb.exe $plugin
done
rm -rf cv2pdb
- name: 📦 Bundle MSI
run: |
Expand Down Expand Up @@ -255,7 +257,7 @@ jobs:
run: |
brew reinstall python --quiet || true
brew link --overwrite --quiet python 2>/dev/null || true
brew bundle --no-lock --quiet --file dist/Brewfile || true
brew bundle --no-lock --quiet --file dist/macOS/Brewfile || true
rm -rf /usr/local/Cellar/capstone
- name: ⬇️ Install classic glfw
Expand Down Expand Up @@ -587,8 +589,21 @@ jobs:

# AppImage build
appimage:
runs-on: ubuntu-24.04
name: ⬇️ AppImage
strategy:
fail-fast: false
matrix:
include:
- architecture: "x86_64"
architecture_package: "amd64"
architecture_appimage_builder: "x86_64"
image: ubuntu-24.04
- architecture: "arm64"
architecture_package: "arm64"
architecture_appimage_builder: "aarch64"
image: ubuntu-24.04-arm

runs-on: ${{ matrix.image }}
name: ⬇️ AppImage ${{ matrix.architecture }}

permissions:
id-token: write
Expand All @@ -615,8 +630,10 @@ jobs:

- name: 🛠️ Build using docker
run: |
docker buildx build . -f dist/appimage/Dockerfile --progress=plain --build-arg "BUILD_TYPE=$BUILD_TYPE" \
--build-arg "GIT_COMMIT_HASH=$GITHUB_SHA" --build-arg "GIT_BRANCH=${GITHUB_REF##*/}" --output out
docker buildx build . -f dist/AppImage/Dockerfile --progress=plain --build-arg "BUILD_TYPE=$BUILD_TYPE" \
--build-arg "GIT_COMMIT_HASH=$GITHUB_SHA" --build-arg "GIT_BRANCH=${GITHUB_REF##*/}" \
--build-arg "ARCHITECTURE_PACKAGE=${{ matrix.architecture_package }}" --build-arg "ARCHITECTURE_FILE_NAME=${{ matrix.architecture }}" --build-arg "ARCHITECTURE_APPIMAGE_BUILDER=${{ matrix.architecture_appimage_builder }}" \
--output out
- name: 🗝️ Generate build provenance attestations
uses: actions/attest-build-provenance@v2
Expand All @@ -629,14 +646,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Linux AppImage x86_64
name: Linux AppImage ${{ matrix.architecture }}
path: 'out/*.AppImage'

- name: ⬆️ Upload AppImage zsync
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Linux AppImage zsync x86_64
name: Linux AppImage zsync ${{ matrix.architecture }}
path: 'out/*.AppImage.zsync'

# ArchLinux build
Expand Down
41 changes: 16 additions & 25 deletions dist/AppImageBuilder.yml → dist/AppImage/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,23 @@ AppDir:
exec_args: $@
apt:
arch:
- amd64
- "{{ARCHITECTURE_PACKAGE}}"
allow_unauthenticated: true
sources:
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular-updates main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular-updates universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular multiverse
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular-updates multiverse
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ oracular-backports main restricted
universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu oracular-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu oracular-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu oracular-security multiverse
- sourceline: 'deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ oracular main restricted universe multiverse'
- sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ oracular main restricted universe multiverse'
include:
- librsvg2-common
- libbz2-1.0:amd64
- libcap2:amd64
- libdbus-1-3:amd64
- libfontconfig1:amd64
- libgpg-error0:amd64
- liblzma5:amd64
- libnss-mdns:amd64
- libpcre3:amd64
- libselinux1:amd64
- libtinfo6:amd64
- libbz2-1.0
- libcap2
- libdbus-1-3
- libfontconfig1
- libgpg-error0
- liblzma5
- libnss-mdns
- libpcre3
- libselinux1
- libtinfo6
files:
include:
- /lib/x86_64-linux-gnu/libLLVM-13.so.1
Expand Down Expand Up @@ -133,6 +124,6 @@ AppDir:
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
AppImage:
arch: x86_64
update-information: gh-releases-zsync|WerWolv|ImHex|latest|imhex-*-x86_64.AppImage.zsync
file_name: imhex-{{VERSION}}-x86_64.AppImage
arch: "{{ARCHITECTURE_APPIMAGE_BUILDER}}"
update-information: gh-releases-zsync|WerWolv|ImHex|latest|imhex-*-{{ARCHITECTURE_FILE_NAME}}.AppImage.zsync
file_name: imhex-{{VERSION}}-{{ARCHITECTURE_FILE_NAME}}.AppImage
8 changes: 7 additions & 1 deletion dist/appimage/Dockerfile → dist/AppImage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ ARG LTO=ON
ARG BUILD_TYPE=RelWithDebInfo
ARG GIT_COMMIT_HASH
ARG GIT_BRANCH
ARG ARCHITECTURE_PACKAGE
ARG ARCHITECTURE_FILE_NAME
ARG ARCHITECTURE_APPIMAGE_BUILDER
WORKDIR /build

# Ubuntu sh doesnt support string substitution
Expand Down Expand Up @@ -76,7 +79,10 @@ pip3 install git+https://github.com/AppImageCrafters/appimage-builder@f38699e

# Package ImHex as AppImage
export VERSION=$(cat /imhex/VERSION)
appimage-builder --recipe /imhex/dist/AppImageBuilder.yml
export ARCHITECTURE_PACKAGE=${ARCHITECTURE_PACKAGE}
export ARCHITECTURE_FILE_NAME=${ARCHITECTURE_FILE_NAME}
export ARCHITECTURE_APPIMAGE_BUILDER=${ARCHITECTURE_APPIMAGE_BUILDER}
appimage-builder --recipe /imhex/dist/AppImage/AppImageBuilder.yml
EOF

FROM scratch
Expand Down
File renamed without changes.

0 comments on commit 63a219a

Please sign in to comment.