Skip to content

Commit

Permalink
CI: run arm workflows on arm runner
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmhewitt committed Feb 23, 2025
1 parent 2554c71 commit 3b94106
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,31 @@ on:

jobs:
Flatpak:
runs-on: ubuntu-latest
name: Flatpak (${{ matrix.configuration.arch }})
runs-on: ${{ matrix.configuration.runs-on }}

strategy:
matrix:
arch: [x86_64, aarch64]
configuration:
- arch: x86_64
runs-on: ubuntu-latest
- arch: aarch64
runs-on: ubuntu-24.04-arm
# Don't fail the whole workflow if one architecture fails
fail-fast: false

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

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

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

- name: Install Rust SDK extension
run: |
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --arch=${{matrix.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
flatpak install -y --arch=${{matrix.configuration.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
- name: Build
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
Expand All @@ -47,7 +46,7 @@ jobs:
repository-name: appcenter
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
arch: ${{ matrix.arch }}
arch: ${{ matrix.configuration.arch }}

Lint:
runs-on: ubuntu-latest
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,31 @@ on:

jobs:
deploy_flatpak:
name: Deploy Flatpak
runs-on: ubuntu-latest
name: Deploy Flatpak ${{ matrix.configuration.arch }}
runs-on: ${{ matrix.configuration.runs-on }}

strategy:
matrix:
arch: [x86_64, aarch64]
configuration:
- arch: x86_64
runs-on: ubuntu-latest
- arch: aarch64
runs-on: ubuntu-24.04-arm
# Don't fail the whole workflow if one architecture fails
fail-fast: false

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

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

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

- name: Install Rust SDK extension
run: |
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --arch=${{matrix.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
flatpak install -y --arch=${{matrix.configuration.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
- name: Build
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
Expand All @@ -45,7 +43,7 @@ jobs:
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
branch: daily
arch: ${{ matrix.arch }}
arch: ${{ matrix.configuration.arch }}

- name: Deploy
uses: flatpak/flatpak-github-actions/flat-manager@v6
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,33 @@ jobs:
release_branch: "odin"

deploy_flatpak:
name: Deploy Flatpak
runs-on: ubuntu-latest
name: Deploy Flatpak (${{ matrix.configuration.arch }})
runs-on: ${{ matrix.configuration.runs-on }}

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

strategy:
matrix:
arch: [x86_64, aarch64]
configuration:
- arch: x86_64
runs-on: ubuntu-latest
- arch: aarch64
runs-on: ubuntu-24.04-arm
# Don't fail the whole workflow if one architecture fails
fail-fast: false

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

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

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

- name: Install Rust SDK extension
run: |
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --arch=${{matrix.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
flatpak install -y --arch=${{matrix.configuration.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
- name: Build
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
Expand All @@ -58,7 +56,7 @@ jobs:
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
branch: stable
arch: ${{ matrix.arch }}
arch: ${{ matrix.configuration.arch }}

- name: Deploy
uses: flatpak/flatpak-github-actions/flat-manager@v6
Expand Down

0 comments on commit 3b94106

Please sign in to comment.