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..c2e38fa 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 @@ -44,6 +42,13 @@ jobs: # 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: Check all workflow statuses id: check-all uses: actions/github-script@v7 @@ -104,27 +109,42 @@ 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 @@ -136,7 +156,14 @@ jobs: - name: Get Version if: steps.check-all.outputs.ready == 'true' - run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV + 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' 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 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