1- # Reusable: build binaries (standard + UI) on all platforms
1+ # Reusable: build release binaries on all supported platforms
22name : Build
33
44on :
1212 description : ' Generate build provenance attestations for release artifacts'
1313 type : boolean
1414 default : false
15+ ui_only :
16+ description : ' Build only the UI runtime archives'
17+ type : boolean
18+ default : false
1519
1620permissions :
1721 contents : read
6468 node-version : " 22"
6569
6670 - name : Build standard binary
71+ if : ${{ !inputs.ui_only }}
6772 env :
6873 VERSION : ${{ inputs.version }}
6974 CC : ${{ matrix.cc }}
@@ -75,17 +80,16 @@ jobs:
7580 scripts/build.sh "CC=$CC" "CXX=$CXX"
7681 fi
7782
78- - name : Ad-hoc sign macOS binary
79- if : startsWith(matrix.os, 'macos')
83+ - name : Ad-hoc sign macOS standard binary
84+ if : ${{ !inputs.ui_only && startsWith(matrix.os, 'macos') }}
8085 run : codesign --sign - --force build/c/codebase-memory-mcp
8186
82- # Archive layout/name live in the ONE canonical script the local
83- # artifact-flow smoke lane also runs (venue-parity contract).
8487 - name : Archive standard binary (canonical package-release.sh)
88+ if : ${{ !inputs.ui_only }}
8589 run : scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }}
8690
8791 - name : Attest standard binary provenance
88- if : ${{ inputs.attest }}
92+ if : ${{ inputs.attest && !inputs.ui_only }}
8993 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
9094 with :
9195 subject-path : codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
@@ -110,6 +114,8 @@ jobs:
110114 if : matrix.goos == 'linux' && matrix.goarch == 'amd64'
111115 run : scripts/security-ui.sh
112116
117+ # Archive layout/name live in the ONE canonical script the local
118+ # artifact-flow smoke lane also runs (venue-parity contract).
113119 - name : Archive UI binary (canonical package-release.sh)
114120 run : scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }} --variant ui
115121
@@ -145,6 +151,7 @@ jobs:
145151 node-version : " 22"
146152
147153 - name : Build standard binary
154+ if : ${{ !inputs.ui_only }}
148155 shell : msys2 {0}
149156 env :
150157 VERSION : ${{ inputs.version }}
@@ -155,14 +162,13 @@ jobs:
155162 scripts/build.sh CC=clang CXX=clang++
156163 fi
157164
158- # Archive layout/name live in the ONE canonical script the local
159- # artifact-flow smoke lane also runs (venue-parity contract).
160165 - name : Archive standard binary (canonical package-release.sh)
166+ if : ${{ !inputs.ui_only }}
161167 shell : msys2 {0}
162168 run : scripts/package-release.sh windows amd64 CC=clang CXX=clang++
163169
164170 - name : Attest standard binary provenance
165- if : ${{ inputs.attest }}
171+ if : ${{ inputs.attest && !inputs.ui_only }}
166172 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
167173 with :
168174 subject-path : codebase-memory-mcp-windows-amd64.zip
@@ -178,6 +184,8 @@ jobs:
178184 scripts/build.sh --with-ui CC=clang CXX=clang++
179185 fi
180186
187+ # Archive layout/name live in the ONE canonical script the local
188+ # artifact-flow smoke lane also runs (venue-parity contract).
181189 - name : Archive UI binary (canonical package-release.sh)
182190 shell : msys2 {0}
183191 run : scripts/package-release.sh windows amd64 --variant ui CC=clang CXX=clang++
@@ -218,6 +226,7 @@ jobs:
218226 node-version : " 22"
219227
220228 - name : Build standard binary
229+ if : ${{ !inputs.ui_only }}
221230 shell : msys2 {0}
222231 env :
223232 VERSION : ${{ inputs.version }}
@@ -229,11 +238,12 @@ jobs:
229238 fi
230239
231240 - name : Archive standard binary (canonical package-release.sh)
241+ if : ${{ !inputs.ui_only }}
232242 shell : msys2 {0}
233243 run : scripts/package-release.sh windows arm64 CC=clang CXX=clang++
234244
235245 - name : Attest standard binary provenance
236- if : ${{ inputs.attest }}
246+ if : ${{ inputs.attest && !inputs.ui_only }}
237247 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
238248 with :
239249 subject-path : codebase-memory-mcp-windows-arm64.zip
@@ -288,6 +298,7 @@ jobs:
288298 node-version : " 22"
289299
290300 - name : Build standard binary (static)
301+ if : ${{ !inputs.ui_only }}
291302 env :
292303 VERSION : ${{ inputs.version }}
293304 run : |
@@ -297,16 +308,18 @@ jobs:
297308 scripts/build.sh CC=gcc CXX=g++ STATIC=1
298309 fi
299310
300- - name : Verify static linking
311+ - name : Verify standard static linking
312+ if : ${{ !inputs.ui_only }}
301313 run : |
302314 file build/c/codebase-memory-mcp
303315 ldd build/c/codebase-memory-mcp 2>&1 | grep -q "not a dynamic executable" || ldd build/c/codebase-memory-mcp 2>&1 | grep -q "statically linked"
304316
305317 - name : Archive standard binary (canonical package-release.sh)
318+ if : ${{ !inputs.ui_only }}
306319 run : scripts/package-release.sh linux ${{ matrix.arch }}-portable
307320
308321 - name : Attest standard binary provenance
309- if : ${{ inputs.attest }}
322+ if : ${{ inputs.attest && !inputs.ui_only }}
310323 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
311324 with :
312325 subject-path : codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz
@@ -321,6 +334,11 @@ jobs:
321334 scripts/build.sh --with-ui CC=gcc CXX=g++ STATIC=1
322335 fi
323336
337+ - name : Verify UI static linking
338+ run : |
339+ file build/c/codebase-memory-mcp
340+ ldd build/c/codebase-memory-mcp 2>&1 | grep -q "not a dynamic executable" || ldd build/c/codebase-memory-mcp 2>&1 | grep -q "statically linked"
341+
324342 - name : Archive UI binary (canonical package-release.sh)
325343 run : scripts/package-release.sh linux ${{ matrix.arch }}-portable --variant ui
326344
0 commit comments