From 03ea6ecaa340f2ae4c1d022044898e6747c0bca3 Mon Sep 17 00:00:00 2001 From: TGP17 <86961834+TGP17@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:12:47 +0200 Subject: [PATCH] Add Linux ARM64 AppImage to Workflow --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea69b8019..270540de1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - target: ["appimage", "fresh"] + target: ["appimage", "arm64-appimage", "fresh"] container: image: citraemu/build-environments:linux-${{ matrix.target }} options: -u 1001 @@ -47,6 +47,15 @@ jobs: ${{ runner.os }}-${{ matrix.target }}- - name: Build run: ./.ci/linux.sh + - name: Prepare outputs for caching + run: mv ./build/bundle $OS-$TARGET + if: ${{ matrix.target == 'arm64-appimage' }} + - name: Cache outputs for ARM64 AppImage packaging + uses: actions/cache/save@v3 + if: ${{ matrix.target == 'arm64-appimage' }} + with: + path: ${{ env.OS }}-${{ env.TARGET }} + key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} - name: Pack run: ./.ci/pack.sh if: ${{ matrix.target == 'appimage' }} @@ -56,6 +65,43 @@ jobs: with: name: ${{ env.OS }}-${{ env.TARGET }} path: artifacts/ + linux-arm64-appimage: + runs-on: ubuntu-20.04 + strategy: + matrix: + target: ["arm64-appimage"] + needs: linux + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + OS: linux + TARGET: ${{ matrix.target }} + steps: + - uses: actions/checkout@v3 + - name: Download ARM64 build from cache + uses: actions/cache/restore@v3 + with: + path: ${{ env.OS }}-arm64-appimage + key: ${{ runner.os }}-arm64-appimage-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} + fail-on-cache-miss: true + - uses: uraimo/run-on-arch-action@v2 + name: Package ARM64 AppImage + id: build + with: + arch: none + distro: none + base_image: citraemu/build-environments:linux-arm64-appimage-packaging + githubToken: ${{ github.token }} + shell: /bin/sh + run: ./dist/appimage/package-appimage-arm64.sh + - name: chown output directory + run: sudo chown -R runner ./build/bundle + - name: Pack + run: ./.ci/pack.sh + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: ${{ env.OS }}-${{ env.TARGET }} + path: artifacts/ macos: runs-on: macos-latest strategy: @@ -253,7 +299,7 @@ jobs: run: ./.ci/ios.sh release: runs-on: ubuntu-latest - needs: [windows, linux, macos-universal, android, source] + needs: [windows, linux, linux-arm64-appimage, macos-universal, android, source] if: ${{ startsWith(github.ref, 'refs/tags/') }} steps: - uses: actions/download-artifact@v3