From 112cc6607c002ed2b42cb53d7caf4d9e30eda0ec Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Tue, 16 Jul 2024 22:20:34 +0200 Subject: [PATCH 1/5] add arch64 architecture --- .github/workflows/pre-release.yml | 74 ++++++++++--------------------- 1 file changed, 24 insertions(+), 50 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 82b7e21..65cc6f4 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -7,72 +7,46 @@ on: name: build-and-prerelease jobs: - flatpak-release-target: - name: build-flatpak-release-target + flatpak: + name: "Flatpak" runs-on: ubuntu-latest container: image: bilelmoussaoui/flatpak-github-actions:gnome-46 options: --privileged + strategy: + matrix: + target: [ToolboxTuner, ToolboxTuner.Devel, ToolboxTuner.Screenshot] + arch: [x86_64, aarch64] + # Don't fail the whole workflow if one architecture fails + fail-fast: false steps: - uses: actions/checkout@v4 with: lfs: true + # Docker is required by the docker/setup-qemu-action which enables emulation + - name: Install deps + if: ${{ matrix.arch != 'x86_64' }} + run: | + dnf -y install docker + - name: Set up QEMU + if: ${{ matrix.arch != 'x86_64' }} + id: qemu + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6.3 with: - bundle: toolboxtuner-release.flatpak - manifest-path: build-aux/org.kuchelmeister.ToolboxTuner.json + bundle: ${{ matrix.target }}.${{ matrix.arch }}.flatpak + manifest-path: build-aux/org.kuchelmeister.${{ matrix.target }}.json run-tests: true cache-key: flatpak-builder-release-${{ github.sha }} upload-artifact: false + arch: ${{ matrix.arch }} - uses: actions/upload-artifact@v4 with: name: flatpak-release path: | *.flatpak - flatpak-screenshot-target: - name: build-flatpak-screenshot-target - runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:gnome-46 - options: --privileged - steps: - - uses: actions/checkout@v4 - with: - lfs: true - - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6.3 - with: - bundle: toolboxtuner-screenshot.flatpak - manifest-path: build-aux/org.kuchelmeister.ToolboxTuner.Screenshot.json - run-tests: true - cache-key: flatpak-builder-screenshot-${{ github.sha }} - upload-artifact: false - - uses: actions/upload-artifact@v4 - with: - name: flatpak-screenshot - path: | - *.flatpak - flatpak-dev-target: - name: build-flatpak-dev-target - runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:gnome-46 - options: --privileged - steps: - - uses: actions/checkout@v4 - with: - lfs: true - - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6.3 - with: - bundle: toolboxtuner-dev.flatpak - manifest-path: build-aux/org.kuchelmeister.ToolboxTuner.Devel.json - run-tests: true - cache-key: flatpak-builder-dev-${{ github.sha }} - upload-artifact: false - - uses: actions/upload-artifact@v4 - with: - name: flatpak-dev - path: | - *.flatpak vendor: name: vendor-prerelease runs-on: ubuntu-latest @@ -91,7 +65,7 @@ jobs: *.sha256sum publish-prerelease: name: publish-prerelease - needs: [flatpak-dev-target, vendor] + needs: [flatpak, vendor] runs-on: ubuntu-latest if: startsWith(github.ref_name, 'main') && github.ref_type == 'branch' steps: @@ -105,7 +79,7 @@ jobs: automatic_release_tag: dev title: 'Latest Development Build' files: | - **/*-dev.flatpak + **/*.Devel.*.flatpak **/*.tar.gz **/*.sha256sum From ce85300e1ce5fe67c421e5a75e1e1ab20f95d2e0 Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister <13hannes11@users.noreply.github.com> Date: Tue, 16 Jul 2024 22:25:04 +0200 Subject: [PATCH 2/5] Update pre-release.yml --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 65cc6f4..7110439 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -18,7 +18,7 @@ jobs: target: [ToolboxTuner, ToolboxTuner.Devel, ToolboxTuner.Screenshot] arch: [x86_64, aarch64] # Don't fail the whole workflow if one architecture fails - fail-fast: false + fail-fast: false steps: - uses: actions/checkout@v4 with: From 14d948cfa3a6f56e63961346d6a569d48a964201 Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Tue, 16 Jul 2024 22:32:02 +0200 Subject: [PATCH 3/5] change artifact names based on matrix --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 7110439..428ea7e 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -44,7 +44,7 @@ jobs: arch: ${{ matrix.arch }} - uses: actions/upload-artifact@v4 with: - name: flatpak-release + name: flatpak-release-${{ matrix.target }}-${{ matrix.arch }} path: | *.flatpak vendor: From a1c22fa714408353eadf6808bbe4df561765e27d Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Tue, 16 Jul 2024 22:33:34 +0200 Subject: [PATCH 4/5] update cache key --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 428ea7e..2cbc94b 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -39,7 +39,7 @@ jobs: bundle: ${{ matrix.target }}.${{ matrix.arch }}.flatpak manifest-path: build-aux/org.kuchelmeister.${{ matrix.target }}.json run-tests: true - cache-key: flatpak-builder-release-${{ github.sha }} + cache-key: flatpak-builder-${{ github.sha }} upload-artifact: false arch: ${{ matrix.arch }} - uses: actions/upload-artifact@v4 From 5e28d5cb6a7aaaec1ffce8acfdac76ad793d02c9 Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Tue, 16 Jul 2024 23:02:41 +0200 Subject: [PATCH 5/5] only do one arch build --- .github/workflows/pre-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 2cbc94b..5e1b911 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -16,7 +16,10 @@ jobs: strategy: matrix: target: [ToolboxTuner, ToolboxTuner.Devel, ToolboxTuner.Screenshot] - arch: [x86_64, aarch64] + arch: [x86_64] + include: + - target: ToolboxTuner.Devel + arch: aarch64 # Don't fail the whole workflow if one architecture fails fail-fast: false steps: