From 89dd3bb7c6bb2c16b002bc05e0c039dbd448a6ce Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Thu, 19 Mar 2026 10:43:32 +0100 Subject: [PATCH] Add skip_tests/skip_builds flags, fix build-stage failures 1. dry-run.yml: Add skip_tests and skip_builds workflow_dispatch inputs for faster iteration. Build jobs use always() to run even when tests are skipped. 2. Windows archive: Switch from PowerShell Copy-Item to MSYS2 shell with .exe extension detection. MSYS2 Clang produces .exe suffix that Copy-Item didn't account for. 3. Linux embed: Use absolute path for ld output when cd'd into dist directory. Relative path build/c/embedded/*.o was invalid from inside graph-ui/dist/. 4. release.yml: Same Windows archive fix as dry-run. --- .github/workflows/dry-run.yml | 33 +++++++++++++++++++++++++-------- .github/workflows/release.yml | 16 ++++++++++------ scripts/embed-frontend.sh | 3 ++- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml index fc0c08ed9..4b014146e 100644 --- a/.github/workflows/dry-run.yml +++ b/.github/workflows/dry-run.yml @@ -7,6 +7,14 @@ on: description: 'Skip lint step (faster iteration)' type: boolean default: false + skip_tests: + description: 'Skip test steps (faster iteration on build/smoke)' + type: boolean + default: false + skip_builds: + description: 'Skip build+smoke steps (faster iteration on lint/tests)' + type: boolean + default: false permissions: contents: read @@ -54,7 +62,7 @@ jobs: # Linux: use system gcc — full ASan/UBSan support # Windows: MSYS2 MinGW GCC test-unix: - if: ${{ always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }} + if: ${{ !inputs.skip_tests && always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }} needs: [lint] strategy: fail-fast: false @@ -88,7 +96,7 @@ jobs: run: scripts/test.sh CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} test-windows: - if: ${{ always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }} + if: ${{ !inputs.skip_tests && always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }} needs: [lint] runs-on: windows-latest steps: @@ -110,6 +118,7 @@ jobs: # ── Step 3: Build binaries (standard + UI, all OS) ────────── build-unix: + if: ${{ !inputs.skip_builds && always() && (needs.test-unix.result == 'success' || needs.test-unix.result == 'skipped') && (needs.test-windows.result == 'success' || needs.test-windows.result == 'skipped') }} needs: [test-unix, test-windows] strategy: matrix: @@ -168,6 +177,7 @@ jobs: path: "*.tar.gz" build-windows: + if: ${{ !inputs.skip_builds && always() && (needs.test-unix.result == 'success' || needs.test-unix.result == 'skipped') && (needs.test-windows.result == 'success' || needs.test-windows.result == 'skipped') }} needs: [test-unix, test-windows] runs-on: windows-latest steps: @@ -191,20 +201,25 @@ jobs: run: scripts/build.sh CC=clang CXX=clang++ - name: Archive standard binary - shell: pwsh + shell: msys2 {0} run: | - Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp.exe - Compress-Archive -Path codebase-memory-mcp.exe -DestinationPath codebase-memory-mcp-windows-amd64.zip + BIN=build/c/codebase-memory-mcp + # MSYS2 Clang produces .exe extension + [ -f "${BIN}.exe" ] && BIN="${BIN}.exe" + cp "$BIN" codebase-memory-mcp.exe + zip codebase-memory-mcp-windows-amd64.zip codebase-memory-mcp.exe - name: Build UI binary shell: msys2 {0} run: scripts/build.sh --with-ui CC=clang CXX=clang++ - name: Archive UI binary - shell: pwsh + shell: msys2 {0} run: | - Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp-ui.exe -Force - Compress-Archive -Path codebase-memory-mcp-ui.exe -DestinationPath codebase-memory-mcp-ui-windows-amd64.zip + BIN=build/c/codebase-memory-mcp + [ -f "${BIN}.exe" ] && BIN="${BIN}.exe" + cp "$BIN" codebase-memory-mcp-ui.exe + zip codebase-memory-mcp-ui-windows-amd64.zip codebase-memory-mcp-ui.exe - uses: actions/upload-artifact@v4 with: @@ -213,6 +228,7 @@ jobs: # ── Step 4: Smoke test every binary ───────────────────────── smoke-unix: + if: ${{ !inputs.skip_builds }} needs: [build-unix] strategy: matrix: @@ -248,6 +264,7 @@ jobs: run: scripts/smoke-test.sh ./codebase-memory-mcp smoke-windows: + if: ${{ !inputs.skip_builds }} needs: [build-windows] strategy: matrix: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 240e6caa7..33bf4de22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -197,20 +197,24 @@ jobs: run: scripts/build.sh --version ${{ inputs.version }} CC=clang CXX=clang++ - name: Archive standard binary - shell: pwsh + shell: msys2 {0} run: | - Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp.exe - Compress-Archive -Path codebase-memory-mcp.exe -DestinationPath codebase-memory-mcp-windows-amd64.zip + BIN=build/c/codebase-memory-mcp + [ -f "${BIN}.exe" ] && BIN="${BIN}.exe" + cp "$BIN" codebase-memory-mcp.exe + zip codebase-memory-mcp-windows-amd64.zip codebase-memory-mcp.exe - name: Build UI binary shell: msys2 {0} run: scripts/build.sh --with-ui --version ${{ inputs.version }} CC=clang CXX=clang++ - name: Archive UI binary - shell: pwsh + shell: msys2 {0} run: | - Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp-ui.exe -Force - Compress-Archive -Path codebase-memory-mcp-ui.exe -DestinationPath codebase-memory-mcp-ui-windows-amd64.zip + BIN=build/c/codebase-memory-mcp + [ -f "${BIN}.exe" ] && BIN="${BIN}.exe" + cp "$BIN" codebase-memory-mcp-ui.exe + zip codebase-memory-mcp-ui-windows-amd64.zip codebase-memory-mcp-ui.exe - uses: actions/upload-artifact@v4 with: diff --git a/scripts/embed-frontend.sh b/scripts/embed-frontend.sh index 68fe4adeb..da661df81 100755 --- a/scripts/embed-frontend.sh +++ b/scripts/embed-frontend.sh @@ -85,7 +85,8 @@ for file in "${FILES[@]}"; do rm -f "$local_c" else # Linux: ld -r -b binary (zero bloat) - (cd "$DIST_DIR" && ld -r -b binary -o "$obj" "$rel") + abs_obj="$(cd "$(dirname "$0")/.." && pwd)/$obj" + (cd "$DIST_DIR" && ld -r -b binary -o "$abs_obj" "$rel") fi OBJ_FILES+=("$obj")