From 7357f593a91b3b1a6cdbd882bb3e8ee06893fc37 Mon Sep 17 00:00:00 2001 From: Kyle Hayes Date: Tue, 3 Feb 2026 07:21:18 -0800 Subject: [PATCH 1/3] Regressions on several workflows that removed the setup/build/test job split. The release workflow was not correct and not triggering. --- .github/workflows/aarch64-apple-darwin.yml | 36 +++++++++-- .github/workflows/aarch64-pc-linux-gnu.yml | 38 +++++++++-- .github/workflows/aarch64-pc-windows-gnu.yml | 13 ++++ .github/workflows/release.yml | 66 ++++++++++++++++---- .github/workflows/x86_64-apple-darwin.yml | 36 +++++++++-- .github/workflows/x86_64-pc-linux-gnu.yml | 38 +++++++++-- .github/workflows/x86_64-pc-windows-gnu.yml | 13 ++++ .github/workflows/x86_64-pc-windows-msvc.yml | 30 ++++++++- 8 files changed, 241 insertions(+), 29 deletions(-) diff --git a/.github/workflows/aarch64-apple-darwin.yml b/.github/workflows/aarch64-apple-darwin.yml index ab8eb30..c01a00a 100644 --- a/.github/workflows/aarch64-apple-darwin.yml +++ b/.github/workflows/aarch64-apple-darwin.yml @@ -3,15 +3,43 @@ name: aarch64-apple-darwin on: [push, pull_request] jobs: - build-and-test: + setup-aarch64-apple-darwin: runs-on: macos-15 steps: - uses: actions/checkout@v4 - name: Install dependencies run: brew install cmake - - name: Build and Test + + build-aarch64-apple-darwin: + runs-on: macos-15 + needs: setup-aarch64-apple-darwin + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: brew install cmake + - name: Configure run: | mkdir -p build && cd build cmake -G "Unix Makefiles" -DTARGET=aarch64-apple-darwin .. - make -j$(sysctl -n hw.ncpu) - ctest --output-on-failure + - name: Build + run: cd build && make -j$(sysctl -n hw.ncpu) + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-aarch64-apple-darwin + path: build/ + + test-aarch64-apple-darwin: + runs-on: macos-15 + needs: build-aarch64-apple-darwin + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-aarch64-apple-darwin + path: build/ + - name: Restore execute permissions + run: chmod +x build/bin/* + - name: Run Tests + run: cd build && ctest --output-on-failure diff --git a/.github/workflows/aarch64-pc-linux-gnu.yml b/.github/workflows/aarch64-pc-linux-gnu.yml index 8eb0de0..309fc7e 100644 --- a/.github/workflows/aarch64-pc-linux-gnu.yml +++ b/.github/workflows/aarch64-pc-linux-gnu.yml @@ -3,7 +3,7 @@ name: aarch64-pc-linux-gnu on: [push, pull_request] jobs: - build-and-test: + setup-aarch64-pc-linux-gnu: runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 @@ -11,9 +11,39 @@ jobs: run: | sudo apt-get update sudo apt-get install -y cmake build-essential - - name: Build and Test + + build-aarch64-pc-linux-gnu: + runs-on: ubuntu-24.04-arm + needs: setup-aarch64-pc-linux-gnu + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake build-essential + - name: Configure run: | mkdir -p build && cd build cmake -G "Unix Makefiles" -DTARGET=aarch64-pc-linux-gnu .. - make -j$(nproc) - ctest --output-on-failure + - name: Build + run: cd build && make -j$(nproc) + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-aarch64-pc-linux-gnu + path: build/ + + test-aarch64-pc-linux-gnu: + runs-on: ubuntu-24.04-arm + needs: build-aarch64-pc-linux-gnu + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-aarch64-pc-linux-gnu + path: build/ + - name: Restore execute permissions + run: chmod +x build/bin/* + - name: Run Tests + run: cd build && ctest --output-on-failure diff --git a/.github/workflows/aarch64-pc-windows-gnu.yml b/.github/workflows/aarch64-pc-windows-gnu.yml index 1f3fbcd..0fdea24 100644 --- a/.github/workflows/aarch64-pc-windows-gnu.yml +++ b/.github/workflows/aarch64-pc-windows-gnu.yml @@ -3,8 +3,21 @@ name: aarch64-pc-windows-gnu on: [push, pull_request] jobs: + setup-aarch64-pc-windows-gnu: + runs-on: windows-11-arm + steps: + - uses: actions/checkout@v4 + - name: Setup MinGW + uses: msys2/setup-msys2@v2 + with: + msystem: CLANGARM64 + update: true + cache: true + install: mingw-w64-clang-aarch64-toolchain mingw-w64-clang-aarch64-cmake + build-aarch64-pc-windows-gnu: runs-on: windows-11-arm + needs: setup-aarch64-pc-windows-gnu steps: - uses: actions/checkout@v4 - name: Setup MinGW diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fae563e..8defb8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,8 +31,6 @@ on: - riscv64-musl-linux types: - completed - branches: - - release permissions: contents: write @@ -41,10 +39,34 @@ permissions: jobs: check-and-release: runs-on: ubuntu-latest - # Only run if the triggering workflow succeeded AND it ran on the release branch - if: ${{ github.event.workflow_run.head_branch == 'release' && github.event.workflow_run.conclusion == 'success' }} steps: + - name: Log trigger information + run: | + echo "Triggered by workflow: ${{ github.event.workflow_run.name }}" + echo "Workflow status: ${{ github.event.workflow_run.conclusion }}" + echo "Branch: ${{ github.event.workflow_run.head_branch }}" + echo "Commit SHA: ${{ github.event.workflow_run.head_sha }}" + + - name: Validate release branch and workflow success + id: validate + run: | + if [ "${{ github.event.workflow_run.head_branch }}" != "release" ]; then + echo "Skipping: Not on release branch (on ${{ github.event.workflow_run.head_branch }})" + echo "proceed=false" >> $GITHUB_OUTPUT + exit 0 + fi + + if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then + echo "Skipping: Workflow did not succeed (conclusion: ${{ github.event.workflow_run.conclusion }})" + echo "proceed=false" >> $GITHUB_OUTPUT + exit 0 + fi + + echo "Validation passed: On release branch with successful workflow" + echo "proceed=true" >> $GITHUB_OUTPUT + - name: Check all workflow statuses + if: steps.validate.outputs.proceed == 'true' id: check-all uses: actions/github-script@v7 with: @@ -104,42 +126,64 @@ jobs: const failed = []; const pending = []; + const succeeded = []; for (const name of target_workflows) { const run = latest_runs[name]; - if (!run || run.status !== 'completed') { + if (!run) { + console.log(` ${name}: NO RUN FOUND`); + pending.push(name); + } else if (run.status !== 'completed') { + console.log(` ${name}: ${run.status}`); pending.push(name); } else if (run.conclusion !== 'success') { + console.log(` ${name}: completed with ${run.conclusion}`); failed.push(name); + } else { + console.log(` ${name}: success`); + succeeded.push(name); } } + console.log(`\nSummary: ${succeeded.length} succeeded, ${pending.length} pending, ${failed.length} failed`); + if (pending.length > 0) { - console.log(`Waiting for other workflows to complete: ${pending.join(', ')}`); + console.log(`Waiting for ${pending.length} workflows to complete: ${pending.join(', ')}`); + core.setOutput("ready", "false"); + core.notice(`Release skipped: waiting for ${pending.length} workflows to complete`); return; // Exit successfully but do nothing; wait for next trigger } if (failed.length > 0) { core.setFailed(`One or more workflows failed: ${failed.join(', ')}`); + core.setOutput("ready", "false"); return; } console.log("All target workflows passed successfully!"); + core.notice("All required workflows passed - creating release"); core.setOutput("ready", "true"); - name: Perform Release - if: steps.check-all.outputs.ready == 'true' + if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' uses: actions/checkout@v4 with: ref: ${{ github.event.workflow_run.head_sha }} fetch-depth: 0 - name: Get Version - if: steps.check-all.outputs.ready == 'true' - run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV + if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' + run: | + if [ ! -f VERSION ]; then + echo "ERROR: VERSION file not found" + exit 1 + fi + VERSION=$(cat VERSION) + echo "Creating release for version: $VERSION" + echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Get Release Details - if: steps.check-all.outputs.ready == 'true' + if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' id: release_details uses: actions/github-script@v7 with: @@ -178,7 +222,7 @@ jobs: core.setOutput("body", body); - name: Create Release - if: steps.check-all.outputs.ready == 'true' + if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' uses: softprops/action-gh-release@v1 with: tag_name: v${{ env.VERSION }} diff --git a/.github/workflows/x86_64-apple-darwin.yml b/.github/workflows/x86_64-apple-darwin.yml index 86264d1..c84e369 100644 --- a/.github/workflows/x86_64-apple-darwin.yml +++ b/.github/workflows/x86_64-apple-darwin.yml @@ -3,15 +3,43 @@ name: x86_64-apple-darwin on: [push, pull_request] jobs: - build-and-test: + setup-x86_64-apple-darwin: runs-on: macos-15-intel steps: - uses: actions/checkout@v4 - name: Install dependencies run: brew install cmake - - name: Build and Test + + build-x86_64-apple-darwin: + runs-on: macos-15-intel + needs: setup-x86_64-apple-darwin + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: brew install cmake + - name: Configure run: | mkdir -p build && cd build cmake -G "Unix Makefiles" -DTARGET=x86_64-apple-darwin .. - make -j$(sysctl -n hw.ncpu) - ctest --output-on-failure + - name: Build + run: cd build && make -j$(sysctl -n hw.ncpu) + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-x86_64-apple-darwin + path: build/ + + test-x86_64-apple-darwin: + runs-on: macos-15-intel + needs: build-x86_64-apple-darwin + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-x86_64-apple-darwin + path: build/ + - name: Restore execute permissions + run: chmod +x build/bin/* + - name: Run Tests + run: cd build && ctest --output-on-failure diff --git a/.github/workflows/x86_64-pc-linux-gnu.yml b/.github/workflows/x86_64-pc-linux-gnu.yml index 9b8b09b..c2be802 100644 --- a/.github/workflows/x86_64-pc-linux-gnu.yml +++ b/.github/workflows/x86_64-pc-linux-gnu.yml @@ -3,7 +3,7 @@ name: x86_64-pc-linux-gnu on: [push, pull_request] jobs: - build-and-test: + setup-x86_64-pc-linux-gnu: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -11,12 +11,42 @@ jobs: run: | sudo apt-get update sudo apt-get install -y cmake build-essential - - name: Build and Test + + build-x86_64-pc-linux-gnu: + runs-on: ubuntu-latest + needs: setup-x86_64-pc-linux-gnu + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake build-essential + - name: Configure run: | mkdir -p build && cd build cmake -G "Unix Makefiles" -DTARGET=x86_64-pc-linux-gnu -DENABLE_COVERAGE=ON .. - make -j$(nproc) - ctest --output-on-failure + - name: Build + run: cd build && make -j$(nproc) + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-x86_64-pc-linux-gnu + path: build/ + + test-x86_64-pc-linux-gnu: + runs-on: ubuntu-latest + needs: build-x86_64-pc-linux-gnu + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-x86_64-pc-linux-gnu + path: build/ + - name: Restore execute permissions + run: chmod +x build/bin/* + - name: Run Tests + run: cd build && ctest --output-on-failure - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/x86_64-pc-windows-gnu.yml b/.github/workflows/x86_64-pc-windows-gnu.yml index 4bf0672..90d8c21 100644 --- a/.github/workflows/x86_64-pc-windows-gnu.yml +++ b/.github/workflows/x86_64-pc-windows-gnu.yml @@ -3,8 +3,21 @@ name: x86_64-pc-windows-gnu on: [push, pull_request] jobs: + setup-x86_64-pc-windows-gnu: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Setup MinGW + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + cache: true + install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake + build-x86_64-pc-windows-gnu: runs-on: windows-latest + needs: setup-x86_64-pc-windows-gnu steps: - uses: actions/checkout@v4 - name: Setup MinGW diff --git a/.github/workflows/x86_64-pc-windows-msvc.yml b/.github/workflows/x86_64-pc-windows-msvc.yml index da46961..42c7f4e 100644 --- a/.github/workflows/x86_64-pc-windows-msvc.yml +++ b/.github/workflows/x86_64-pc-windows-msvc.yml @@ -3,8 +3,18 @@ name: x86_64-pc-windows-msvc on: [push, pull_request] jobs: - build-and-test: + setup-x86_64-pc-windows-msvc: runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + build-x86_64-pc-windows-msvc: + runs-on: windows-latest + needs: setup-x86_64-pc-windows-msvc steps: - uses: actions/checkout@v4 - name: Setup MSVC @@ -17,5 +27,21 @@ jobs: cmake -G "Ninja" -DTARGET=x86_64-pc-windows-msvc -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl .. - name: Build run: cmake --build build --config Release --parallel 4 - - name: Test + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-x86_64-pc-windows-msvc + path: build/ + + test-x86_64-pc-windows-msvc: + runs-on: windows-latest + needs: build-x86_64-pc-windows-msvc + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-x86_64-pc-windows-msvc + path: build/ + - name: Run Tests run: cd build && ctest --output-on-failure From c149d4fa86c74c8d3bdddb319fea996b67e3496f Mon Sep 17 00:00:00 2001 From: Kyle Hayes Date: Tue, 3 Feb 2026 07:50:47 -0800 Subject: [PATCH 2/3] More tweaks to see if we can make the release workflow run only on the release branch. --- .github/workflows/release.yml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8defb8f..c2e38fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,8 @@ permissions: jobs: check-and-release: runs-on: ubuntu-latest + # Only run if the triggering workflow succeeded AND it ran on the release branch + if: ${{ github.event.workflow_run.head_branch == 'release' && github.event.workflow_run.conclusion == 'success' }} steps: - name: Log trigger information run: | @@ -47,26 +49,7 @@ jobs: echo "Branch: ${{ github.event.workflow_run.head_branch }}" echo "Commit SHA: ${{ github.event.workflow_run.head_sha }}" - - name: Validate release branch and workflow success - id: validate - run: | - if [ "${{ github.event.workflow_run.head_branch }}" != "release" ]; then - echo "Skipping: Not on release branch (on ${{ github.event.workflow_run.head_branch }})" - echo "proceed=false" >> $GITHUB_OUTPUT - exit 0 - fi - - if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then - echo "Skipping: Workflow did not succeed (conclusion: ${{ github.event.workflow_run.conclusion }})" - echo "proceed=false" >> $GITHUB_OUTPUT - exit 0 - fi - - echo "Validation passed: On release branch with successful workflow" - echo "proceed=true" >> $GITHUB_OUTPUT - - name: Check all workflow statuses - if: steps.validate.outputs.proceed == 'true' id: check-all uses: actions/github-script@v7 with: @@ -165,14 +148,14 @@ jobs: core.setOutput("ready", "true"); - name: Perform Release - if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' + if: steps.check-all.outputs.ready == 'true' uses: actions/checkout@v4 with: ref: ${{ github.event.workflow_run.head_sha }} fetch-depth: 0 - name: Get Version - if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' + if: steps.check-all.outputs.ready == 'true' run: | if [ ! -f VERSION ]; then echo "ERROR: VERSION file not found" @@ -183,7 +166,7 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Get Release Details - if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' + if: steps.check-all.outputs.ready == 'true' id: release_details uses: actions/github-script@v7 with: @@ -222,7 +205,7 @@ jobs: core.setOutput("body", body); - name: Create Release - if: steps.validate.outputs.proceed == 'true' && steps.check-all.outputs.ready == 'true' + if: steps.check-all.outputs.ready == 'true' uses: softprops/action-gh-release@v1 with: tag_name: v${{ env.VERSION }} From 10f05c378e6a411416fed4d094341413a42f7519 Mon Sep 17 00:00:00 2001 From: Kyle Hayes Date: Tue, 3 Feb 2026 07:52:49 -0800 Subject: [PATCH 3/3] Bumping version. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6da28dd..8294c18 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.1 \ No newline at end of file +0.1.2 \ No newline at end of file