From ccce33f8b0a5dadf56cd6c9243f1539d1eb020ad Mon Sep 17 00:00:00 2001 From: Binarybaron Date: Tue, 15 Jul 2025 14:44:01 +0200 Subject: [PATCH] fix(ci): Disable Linux armv7 and Windows builds, enable concurrency control --- .../build-gui-release-binaries-cb.yml | 9 +- .../workflows/build-gui-release-binaries.yml | 83 ++----------------- .github/workflows/build-release-binaries.yml | 40 +++++---- .github/workflows/ci.yml | 10 ++- .github/workflows/preview-release.yml | 4 + 5 files changed, 49 insertions(+), 97 deletions(-) diff --git a/.github/workflows/build-gui-release-binaries-cb.yml b/.github/workflows/build-gui-release-binaries-cb.yml index 045e62e1..8c57b546 100644 --- a/.github/workflows/build-gui-release-binaries-cb.yml +++ b/.github/workflows/build-gui-release-binaries-cb.yml @@ -5,6 +5,10 @@ on: release: types: [created] +concurrency: + group: build-gui-release-cb-${{ github.event.release.tag_name }} + cancel-in-progress: true + env: # We build on an older version to support older glib versions UBUNTU: "ubuntu-24.04" @@ -61,8 +65,9 @@ jobs: args: "--target x86_64-apple-darwin" - platform: "ubuntu-24.04" args: "" - - platform: "windows-latest" - args: "" + # Temporarily disabled Windows builds + # - platform: "windows-latest" + # args: "" runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/build-gui-release-binaries.yml b/.github/workflows/build-gui-release-binaries.yml index ed8977a9..4bedb2fa 100644 --- a/.github/workflows/build-gui-release-binaries.yml +++ b/.github/workflows/build-gui-release-binaries.yml @@ -5,6 +5,10 @@ on: release: types: [created] +concurrency: + group: build-gui-release-${{ github.event.release.tag_name }} + cancel-in-progress: true + jobs: publish-tauri: # Do not publish preview releases to Github. @@ -22,8 +26,9 @@ jobs: args: "--target x86_64-apple-darwin" - platform: "ubuntu-24.04" # We build on an older version to support older glib versions args: "--bundles deb,appimage" - - platform: "windows-latest" - args: "" + # Temporarily disabled Windows builds + # - platform: "windows-latest" + # args: "" runs-on: ${{ matrix.platform }} steps: @@ -125,76 +130,4 @@ jobs: releaseId: ${{ github.event.release.id }} projectPath: src-tauri args: ${{ matrix.args }} - tauriScript: cargo tauri - - flatpak-build: - name: Build Flatpak + update repo - needs: publish-tauri - runs-on: ubuntu-latest - container: - # Image already contains flatpak, flatpak-builder and runtimes - image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-47 - options: --privileged # sandbox needs it - permissions: - contents: write # to upload bundle to the release - id-token: write # for Pages deploy - pages: write - - steps: - - uses: actions/checkout@v4 - - # 1. Download the .deb we just published on the release - - name: Grab release asset - run: | - ASSET="UnstoppableSwap_${{ github.ref_name }}_amd64.deb" - gh release download ${{ github.event.release.id }} --pattern "$ASSET" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # 2. Update URL + SHA256 inside the manifest (yq = cleaner than sed) - - name: Rewrite manifest for new version - run: | - SHA=$(sha256sum UnstoppableSwap_*.deb | cut -d' ' -f1) - yq -i ' - .modules[0].sources[0].url = "https://github.com/UnstoppableSwap/core/releases/download/${{ github.ref_name }}/UnstoppableSwap_${{ github.ref_name }}_amd64.deb" | - .modules[0].sources[0].sha256 = strenv(SHA) - ' flatpak/net.unstoppableswap.gui.json - - # 3. Import signing key (one-liner GPG action) - - uses: crazy-max/ghaction-import-gpg@v5 - id: gpg - with: - gpg_private_key: ${{ secrets.FLATPAK_GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.FLATPAK_GPG_PASSPHRASE }} - - # 4. Build, export repo & one-click installer - - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 - with: - manifest-path: flatpak/net.unstoppableswap.gui.json - arch: x86_64 - bundle: net.unstoppableswap.gui.flatpakref # produces bundle + repo - gpg-sign: ${{ steps.gpg.outputs.fingerprint }} - build-bundle: true - upload-artifact: false # we'll attach manually below - - # 5. Attach bundle to the release so CLI users can "install --from" - - name: Upload .flatpakref to release - run: gh release upload ${{ github.event.release.id }} *.flatpakref --clobber - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # 6. Stage repo for GitHub Pages - # flatpak-builder exported everything into "repo" - - name: Prepare Pages artifact - run: | - mkdir -p public - cp -a repo/* public - # include the descriptor for GUI stores / CLI - cp net.unstoppableswap.gui.flatpakref public/ - # Upload as Pages artifact - - uses: actions/upload-pages-artifact@v2 - with: - path: public - - # 7. Deploy to Pages - - uses: actions/deploy-pages@v1 + tauriScript: cargo tauri \ No newline at end of file diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 3f93df25..abbe3b8d 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -7,6 +7,10 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/unstoppableswap/asb +concurrency: + group: build-release-${{ github.event.release.tag_name }} + cancel-in-progress: true + jobs: build_binaries: name: Build @@ -18,10 +22,11 @@ jobs: target: x86_64-unknown-linux-gnu os: ubuntu-latest archive_ext: tar - - bin: swap - target: armv7-unknown-linux-gnueabihf - os: ubuntu-latest - archive_ext: tar + # Temporarily disabled armv7 Linux builds + # - bin: swap + # target: armv7-unknown-linux-gnueabihf + # os: ubuntu-latest + # archive_ext: tar - bin: swap target: x86_64-apple-darwin os: macos-13 @@ -30,18 +35,20 @@ jobs: target: aarch64-apple-darwin os: macos-latest archive_ext: tar - - bin: swap - target: x86_64-pc-windows-msvc - os: windows-latest - archive_ext: zip + # Temporarily disabled Windows builds + # - bin: swap + # target: x86_64-pc-windows-msvc + # os: windows-latest + # archive_ext: zip - bin: asb target: x86_64-unknown-linux-gnu os: ubuntu-latest archive_ext: tar - - bin: asb - target: armv7-unknown-linux-gnueabihf - os: ubuntu-latest - archive_ext: tar + # Temporarily disabled armv7 Linux builds + # - bin: asb + # target: armv7-unknown-linux-gnueabihf + # os: ubuntu-latest + # archive_ext: tar - bin: asb target: x86_64-apple-darwin os: macos-13 @@ -50,10 +57,11 @@ jobs: target: aarch64-apple-darwin os: macos-latest archive_ext: tar - - bin: asb - target: x86_64-pc-windows-msvc - os: windows-latest - archive_ext: zip + # Temporarily disabled Windows builds + # - bin: asb + # target: x86_64-pc-windows-msvc + # os: windows-latest + # archive_ext: zip runs-on: ${{ matrix.os }} steps: - name: Checkout tagged commit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cca8626..d060fdd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,14 +164,16 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest-m - - target: armv7-unknown-linux-gnueabihf - os: ubuntu-latest-m + # Temporarily disabled armv7 Linux builds + # - target: armv7-unknown-linux-gnueabihf + # os: ubuntu-latest-m - target: x86_64-apple-darwin os: macos-13 - target: aarch64-apple-darwin os: macos-latest - - target: x86_64-pc-windows-msvc - os: windows-latest-l + # Temporarily disabled Windows builds + # - target: x86_64-pc-windows-msvc + # os: windows-latest-l runs-on: ${{ matrix.os }} if: github.event_name == 'push' || !github.event.pull_request.draft steps: diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index d36d714f..f6c26ef6 100644 --- a/.github/workflows/preview-release.yml +++ b/.github/workflows/preview-release.yml @@ -5,6 +5,10 @@ on: branches: - master +concurrency: + group: preview-release + cancel-in-progress: true + jobs: create_release: name: Create preview release