Skip to content

Commit 89dd3bb

Browse files
committed
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.
1 parent c4d38c4 commit 89dd3bb

3 files changed

Lines changed: 37 additions & 15 deletions

File tree

.github/workflows/dry-run.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
description: 'Skip lint step (faster iteration)'
88
type: boolean
99
default: false
10+
skip_tests:
11+
description: 'Skip test steps (faster iteration on build/smoke)'
12+
type: boolean
13+
default: false
14+
skip_builds:
15+
description: 'Skip build+smoke steps (faster iteration on lint/tests)'
16+
type: boolean
17+
default: false
1018

1119
permissions:
1220
contents: read
@@ -54,7 +62,7 @@ jobs:
5462
# Linux: use system gcc — full ASan/UBSan support
5563
# Windows: MSYS2 MinGW GCC
5664
test-unix:
57-
if: ${{ always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }}
65+
if: ${{ !inputs.skip_tests && always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }}
5866
needs: [lint]
5967
strategy:
6068
fail-fast: false
@@ -88,7 +96,7 @@ jobs:
8896
run: scripts/test.sh CC=${{ matrix.cc }} CXX=${{ matrix.cxx }}
8997

9098
test-windows:
91-
if: ${{ always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }}
99+
if: ${{ !inputs.skip_tests && always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }}
92100
needs: [lint]
93101
runs-on: windows-latest
94102
steps:
@@ -110,6 +118,7 @@ jobs:
110118

111119
# ── Step 3: Build binaries (standard + UI, all OS) ──────────
112120
build-unix:
121+
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') }}
113122
needs: [test-unix, test-windows]
114123
strategy:
115124
matrix:
@@ -168,6 +177,7 @@ jobs:
168177
path: "*.tar.gz"
169178

170179
build-windows:
180+
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') }}
171181
needs: [test-unix, test-windows]
172182
runs-on: windows-latest
173183
steps:
@@ -191,20 +201,25 @@ jobs:
191201
run: scripts/build.sh CC=clang CXX=clang++
192202

193203
- name: Archive standard binary
194-
shell: pwsh
204+
shell: msys2 {0}
195205
run: |
196-
Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp.exe
197-
Compress-Archive -Path codebase-memory-mcp.exe -DestinationPath codebase-memory-mcp-windows-amd64.zip
206+
BIN=build/c/codebase-memory-mcp
207+
# MSYS2 Clang produces .exe extension
208+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
209+
cp "$BIN" codebase-memory-mcp.exe
210+
zip codebase-memory-mcp-windows-amd64.zip codebase-memory-mcp.exe
198211
199212
- name: Build UI binary
200213
shell: msys2 {0}
201214
run: scripts/build.sh --with-ui CC=clang CXX=clang++
202215

203216
- name: Archive UI binary
204-
shell: pwsh
217+
shell: msys2 {0}
205218
run: |
206-
Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp-ui.exe -Force
207-
Compress-Archive -Path codebase-memory-mcp-ui.exe -DestinationPath codebase-memory-mcp-ui-windows-amd64.zip
219+
BIN=build/c/codebase-memory-mcp
220+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
221+
cp "$BIN" codebase-memory-mcp-ui.exe
222+
zip codebase-memory-mcp-ui-windows-amd64.zip codebase-memory-mcp-ui.exe
208223
209224
- uses: actions/upload-artifact@v4
210225
with:
@@ -213,6 +228,7 @@ jobs:
213228

214229
# ── Step 4: Smoke test every binary ─────────────────────────
215230
smoke-unix:
231+
if: ${{ !inputs.skip_builds }}
216232
needs: [build-unix]
217233
strategy:
218234
matrix:
@@ -248,6 +264,7 @@ jobs:
248264
run: scripts/smoke-test.sh ./codebase-memory-mcp
249265

250266
smoke-windows:
267+
if: ${{ !inputs.skip_builds }}
251268
needs: [build-windows]
252269
strategy:
253270
matrix:

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,24 @@ jobs:
197197
run: scripts/build.sh --version ${{ inputs.version }} CC=clang CXX=clang++
198198

199199
- name: Archive standard binary
200-
shell: pwsh
200+
shell: msys2 {0}
201201
run: |
202-
Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp.exe
203-
Compress-Archive -Path codebase-memory-mcp.exe -DestinationPath codebase-memory-mcp-windows-amd64.zip
202+
BIN=build/c/codebase-memory-mcp
203+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
204+
cp "$BIN" codebase-memory-mcp.exe
205+
zip codebase-memory-mcp-windows-amd64.zip codebase-memory-mcp.exe
204206
205207
- name: Build UI binary
206208
shell: msys2 {0}
207209
run: scripts/build.sh --with-ui --version ${{ inputs.version }} CC=clang CXX=clang++
208210

209211
- name: Archive UI binary
210-
shell: pwsh
212+
shell: msys2 {0}
211213
run: |
212-
Copy-Item build/c/codebase-memory-mcp -Destination codebase-memory-mcp-ui.exe -Force
213-
Compress-Archive -Path codebase-memory-mcp-ui.exe -DestinationPath codebase-memory-mcp-ui-windows-amd64.zip
214+
BIN=build/c/codebase-memory-mcp
215+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
216+
cp "$BIN" codebase-memory-mcp-ui.exe
217+
zip codebase-memory-mcp-ui-windows-amd64.zip codebase-memory-mcp-ui.exe
214218
215219
- uses: actions/upload-artifact@v4
216220
with:

scripts/embed-frontend.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ for file in "${FILES[@]}"; do
8585
rm -f "$local_c"
8686
else
8787
# Linux: ld -r -b binary (zero bloat)
88-
(cd "$DIST_DIR" && ld -r -b binary -o "$obj" "$rel")
88+
abs_obj="$(cd "$(dirname "$0")/.." && pwd)/$obj"
89+
(cd "$DIST_DIR" && ld -r -b binary -o "$abs_obj" "$rel")
8990
fi
9091

9192
OBJ_FILES+=("$obj")

0 commit comments

Comments
 (0)