From e8ebd0584b6e787779e64a3e94cbb9255191453b Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Wed, 28 Oct 2026 20:43:18 -0400 Subject: [PATCH 1/2] flatpak: Update libaio source URL Move libaio 0.3.113 to its Codeberg release archive, updating the source checksum accordingly. Fixes #3042 Signed-off-by: Robin Getz --- flatpak/org.sdrangel.SDRangel.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flatpak/org.sdrangel.SDRangel.yaml b/flatpak/org.sdrangel.SDRangel.yaml index ebd54dd42..a24d5efa3 100644 --- a/flatpak/org.sdrangel.SDRangel.yaml +++ b/flatpak/org.sdrangel.SDRangel.yaml @@ -198,8 +198,8 @@ modules: - prefix=${FLATPAK_DEST} sources: - type: archive - url: https://pagure.io/libaio/archive/libaio-0.3.113/libaio-libaio-0.3.113.tar.gz - sha256: 716c7059703247344eb066b54ecbc3ca2134f0103307192e6c2b7dab5f9528ab + url: https://codeberg.org/jmoyer/libaio/releases/download/libaio-0.3.113/libaio-0.3.113.tar.gz + sha256: 2c44d1c5fd0d43752287c9ae1eb9c023f04ef848ea8d4aafa46e9aedb678200b - name: cm256cc buildsystem: cmake-ninja From 29bf22f020884f538ee38a4a1ec5e853b70b08d3 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Wed, 28 Oct 2026 20:44:23 -0400 Subject: [PATCH 2/2] ci: Schedule Flatpak builds and notify on regressions Run Flatpak builds weekly to monitor code and build infrastructure. Restrict artifact uploads to tagged releases and remove the dedicated flatpak branch trigger (which doesn't exist anymore). Create an issue when a scheduled build regresses from success to failure, provided SDRangel CI/CD succeeds on the same commit indicating a likely flatpack infrastructure problem like #3042. Signed-off-by: Robin Getz --- .github/workflows/flatpak.yml | 100 ++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 5a4392e43..b4e183c4f 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -1,9 +1,9 @@ name: SDRangel Flatpak Build on: + schedule: + - cron: '23 6 * * 1' # Mondays at 06:23 UTC; periodically check code and flatpack infrastructure push: - branches: - - flatpak tags: - 'v*' workflow_dispatch: @@ -29,8 +29,6 @@ jobs: run: | if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then version="${GITHUB_REF_NAME#v}" - elif [[ "$GITHUB_REF_NAME" == "flatpak" ]]; then - version="${GITHUB_SHA::8}" else version="${GITHUB_REF_NAME//\//-}-${GITHUB_SHA::8}" fi @@ -43,6 +41,7 @@ jobs: manifest-path: flatpak/org.sdrangel.SDRangel.yaml cache-key: flatpak-builder-${{ hashFiles('flatpak/**') }} - name: Upload artifact + if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-artifact@v4 with: name: ${{ steps.get_version.outputs.bundle }} @@ -52,3 +51,96 @@ jobs: uses: softprops/action-gh-release@v2 with: files: ${{ steps.get_version.outputs.bundle }} + + notify_flatpak_failure: + needs: build_flatpak + # Notify only for scheduled failures, not tag releases or manual runs. + # Ignore reruns to avoid duplicate issues. + if: ${{ failure() && github.event_name == 'schedule' && github.run_attempt == 1 }} + runs-on: ubuntu-latest + permissions: + actions: read + issues: write + + steps: + - name: Check SDRangel CI/CD status + id: health + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + COMMIT_SHA: ${{ github.sha }} + run: | + deadline=$((SECONDS + 2 * 60 * 60)) + conclusion=unknown + + # Wait up to two hours for CI/CD to finish for this exact commit. + # Any successful run takes precedence over failed runs for the same SHA. + # If no completed run exists, keep waiting; timeout leaves "unknown". + while (( SECONDS < deadline )); do + conclusion=$(gh api \ + "repos/$GH_REPO/actions/workflows/sdrangel.yml/runs?branch=master&head_sha=$COMMIT_SHA&per_page=100" \ + --jq '[ + .workflow_runs[] + | select(.conclusion == "success" or .conclusion == "failure") + | .conclusion + ] | if any(.[]; . == "success") then "success" + elif any(.[]; . == "failure") then "failure" + else "unknown" end') || { + echo "Failed to query SDRangel CI/CD; retrying in 5 minutes..." >&2 + sleep 300 + continue + } + + if [[ "$conclusion" != "unknown" ]]; then + break + fi + + echo "CI/CD has not completed for $COMMIT_SHA; waiting 5 minutes..." + sleep 300 + done + + echo "Latest SDRangel CI/CD conclusion: $conclusion" + echo "conclusion=$conclusion" >> "$GITHUB_OUTPUT" + - name: Check previous scheduled build + id: previous + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + CURRENT_RUN_ID: ${{ github.run_id }} + run: | + # Find the most recent completed scheduled Flatpak run, excluding + # this run. Only a success -> failure transition should open an issue. + previous=$(gh api \ + "repos/$GH_REPO/actions/workflows/flatpak.yml/runs?branch=master&event=schedule&per_page=20" \ + --jq "([.workflow_runs[] + | select(.id != $CURRENT_RUN_ID) + | select(.conclusion != null)] + | sort_by(.created_at) + | last + | .conclusion) // \"unknown\"") + + echo "Previous scheduled build: $previous" + echo "conclusion=$previous" >> "$GITHUB_OUTPUT" + + - name: Notify on passing-to-failing transition + # Require both a previously successful Flatpak build and healthy CI/CD + # on the current commit before reporting a regression. + if: steps.previous.outputs.conclusion == 'success' && steps.health.outputs.conclusion == 'success' + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + COMMIT_SHA: ${{ github.sha }} + run: | + gh issue create \ + --repo "$GH_REPO" \ + --title "Flatpak build regressed" \ + --body "$(cat <