Skip to content

Commit

Permalink
Add aarch64 architecture support to flatpak builds (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmhewitt committed Sep 23, 2021
1 parent 6207271 commit 883db72
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 13 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,43 @@ jobs:
name: Flatpak
runs-on: ubuntu-latest

strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false

container:
image: ghcr.io/elementary/flatpak-platform/runtime:daily
image: ghcr.io/elementary/flatpak-platform/runtime:6-${{ matrix.arch }}
options: --privileged

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU for aarch64 emulation
if: ${{ matrix.arch != 'x86_64' }}
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Build
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: screenshot.flatpak
manifest-path: io.elementary.screenshot.yml
run-tests: true
repository-name: appcenter
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
arch: ${{ matrix.arch }}

lint:
runs-on: ubuntu-latest

container:
image: valalang/lint

steps:
- uses: actions/checkout@v2
- name: Lint
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,39 @@ jobs:
name: Deploy Flatpak
runs-on: ubuntu-latest

strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false

container:
image: ghcr.io/elementary/flatpak-platform/runtime:daily
image: ghcr.io/elementary/flatpak-platform/runtime:6-${{ matrix.arch }}
options: --privileged

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU for aarch64 emulation
if: ${{ matrix.arch != 'x86_64' }}
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Build
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: screenshot.flatpak
manifest-path: io.elementary.screenshot.yml
repository-name: appcenter
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
branch: daily
arch: ${{ matrix.arch }}

- name: Deploy
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v3
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
with:
repository: appcenter
flat-manager-url: https://flatpak-api.elementary.io
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Release
uses: elementary/actions/release@master
env:
Expand All @@ -30,19 +30,31 @@ jobs:
deploy_flatpak:
name: Deploy Flatpak
runs-on: ubuntu-latest

if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')

strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false

container:
image: ghcr.io/elementary/flatpak-platform/runtime:6
image: ghcr.io/elementary/flatpak-platform/runtime:6-${{ matrix.arch }}
options: --privileged

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU for aarch64 emulation
if: ${{ matrix.arch != 'x86_64' }}
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Build
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@master
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: screenshot.flatpak
manifest-path: io.elementary.screenshot.yml
Expand All @@ -51,9 +63,10 @@ jobs:
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
branch: stable

arch: ${{ matrix.arch }}

- name: Deploy
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v3
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
with:
repository: appcenter
flat-manager-url: https://flatpak-api.elementary.io
Expand Down

0 comments on commit 883db72

Please sign in to comment.