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-
1615permissions :
1716 contents : read
1817 id-token : write
6362 with :
6463 node-version : " 22"
6564
66- - name : Build standard binary
67- env :
68- VERSION : ${{ inputs.version }}
69- CC : ${{ matrix.cc }}
70- CXX : ${{ matrix.cxx }}
71- run : |
72- if [ -n "$VERSION" ]; then
73- scripts/build.sh --version "$VERSION" "CC=$CC" "CXX=$CXX"
74- else
75- scripts/build.sh "CC=$CC" "CXX=$CXX"
76- fi
77-
78- - name : Ad-hoc sign macOS binary
79- if : startsWith(matrix.os, 'macos')
80- run : codesign --sign - --force build/c/codebase-memory-mcp
81-
82- # Archive layout/name live in the ONE canonical script the local
83- # artifact-flow smoke lane also runs (venue-parity contract).
84- - name : Archive standard binary (canonical package-release.sh)
85- run : scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }}
86-
87- - name : Attest standard binary provenance
88- if : ${{ inputs.attest }}
89- uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
90- with :
91- subject-path : codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
92-
93- - name : Build UI binary
65+ - name : Build release binary with UI
9466 env :
9567 VERSION : ${{ inputs.version }}
9668 CC : ${{ matrix.cc }}
@@ -102,22 +74,24 @@ jobs:
10274 scripts/build.sh --with-ui "CC=$CC" "CXX=$CXX"
10375 fi
10476
105- - name : Ad-hoc sign macOS UI binary
77+ - name : Ad-hoc sign macOS release binary
10678 if : startsWith(matrix.os, 'macos')
10779 run : codesign --sign - --force build/c/codebase-memory-mcp
10880
10981 - name : Frontend integrity scan
11082 if : matrix.goos == 'linux' && matrix.goarch == 'amd64'
11183 run : scripts/security-ui.sh
11284
113- - name : Archive UI binary (canonical package-release.sh)
114- run : scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }} --variant ui
85+ # Archive layout/name live in the ONE canonical script the local
86+ # artifact-flow smoke lane also runs (venue-parity contract).
87+ - name : Archive release binary (canonical package-release.sh)
88+ run : scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }}
11589
116- - name : Attest UI binary provenance
90+ - name : Attest release binary provenance
11791 if : ${{ inputs.attest }}
11892 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
11993 with :
120- subject-path : codebase-memory-mcp-ui- ${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
94+ subject-path : codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
12195
12296 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
12397 with :
@@ -144,50 +118,29 @@ jobs:
144118 with :
145119 node-version : " 22"
146120
147- - name : Build standard binary
121+ - name : Build release binary with UI
148122 shell : msys2 {0}
149123 env :
150124 VERSION : ${{ inputs.version }}
151125 run : |
152126 if [ -n "$VERSION" ]; then
153- scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
127+ scripts/build.sh --with-ui -- version "$VERSION" CC=clang CXX=clang++
154128 else
155- scripts/build.sh CC=clang CXX=clang++
129+ scripts/build.sh --with-ui CC=clang CXX=clang++
156130 fi
157131
158132 # Archive layout/name live in the ONE canonical script the local
159133 # artifact-flow smoke lane also runs (venue-parity contract).
160- - name : Archive standard binary (canonical package-release.sh)
134+ - name : Archive release binary (canonical package-release.sh)
161135 shell : msys2 {0}
162136 run : scripts/package-release.sh windows amd64 CC=clang CXX=clang++
163137
164- - name : Attest standard binary provenance
138+ - name : Attest release binary provenance
165139 if : ${{ inputs.attest }}
166140 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
167141 with :
168142 subject-path : codebase-memory-mcp-windows-amd64.zip
169143
170- - name : Build UI binary
171- shell : msys2 {0}
172- env :
173- VERSION : ${{ inputs.version }}
174- run : |
175- if [ -n "$VERSION" ]; then
176- scripts/build.sh --with-ui --version "$VERSION" CC=clang CXX=clang++
177- else
178- scripts/build.sh --with-ui CC=clang CXX=clang++
179- fi
180-
181- - name : Archive UI binary (canonical package-release.sh)
182- shell : msys2 {0}
183- run : scripts/package-release.sh windows amd64 --variant ui CC=clang CXX=clang++
184-
185- - name : Attest UI binary provenance
186- if : ${{ inputs.attest }}
187- uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
188- with :
189- subject-path : codebase-memory-mcp-ui-windows-amd64.zip
190-
191144 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
192145 with :
193146 name : binaries-windows-amd64
@@ -217,28 +170,7 @@ jobs:
217170 with :
218171 node-version : " 22"
219172
220- - name : Build standard binary
221- shell : msys2 {0}
222- env :
223- VERSION : ${{ inputs.version }}
224- run : |
225- if [ -n "$VERSION" ]; then
226- scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
227- else
228- scripts/build.sh CC=clang CXX=clang++
229- fi
230-
231- - name : Archive standard binary (canonical package-release.sh)
232- shell : msys2 {0}
233- run : scripts/package-release.sh windows arm64 CC=clang CXX=clang++
234-
235- - name : Attest standard binary provenance
236- if : ${{ inputs.attest }}
237- uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
238- with :
239- subject-path : codebase-memory-mcp-windows-arm64.zip
240-
241- - name : Build UI binary
173+ - name : Build release binary with UI
242174 shell : msys2 {0}
243175 env :
244176 VERSION : ${{ inputs.version }}
@@ -249,15 +181,15 @@ jobs:
249181 scripts/build.sh --with-ui CC=clang CXX=clang++
250182 fi
251183
252- - name : Archive UI binary (canonical package-release.sh)
184+ - name : Archive release binary (canonical package-release.sh)
253185 shell : msys2 {0}
254- run : scripts/package-release.sh windows arm64 --variant ui CC=clang CXX=clang++
186+ run : scripts/package-release.sh windows arm64 CC=clang CXX=clang++
255187
256- - name : Attest UI binary provenance
188+ - name : Attest release binary provenance
257189 if : ${{ inputs.attest }}
258190 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
259191 with :
260- subject-path : codebase-memory-mcp-ui- windows-arm64.zip
192+ subject-path : codebase-memory-mcp-windows-arm64.zip
261193
262194 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
263195 with :
@@ -287,49 +219,30 @@ jobs:
287219 with :
288220 node-version : " 22"
289221
290- - name : Build standard binary (static)
222+ - name : Build release binary with UI (static)
291223 env :
292224 VERSION : ${{ inputs.version }}
293225 run : |
294226 if [ -n "$VERSION" ]; then
295- scripts/build.sh --version "$VERSION" CC=gcc CXX=g++ STATIC=1
227+ scripts/build.sh --with-ui -- version "$VERSION" CC=gcc CXX=g++ STATIC=1
296228 else
297- scripts/build.sh CC=gcc CXX=g++ STATIC=1
229+ scripts/build.sh --with-ui CC=gcc CXX=g++ STATIC=1
298230 fi
299231
300- - name : Verify static linking
232+ - name : Verify release static linking
301233 run : |
302234 file build/c/codebase-memory-mcp
303235 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"
304236
305- - name : Archive standard binary (canonical package-release.sh)
237+ - name : Archive release binary (canonical package-release.sh)
306238 run : scripts/package-release.sh linux ${{ matrix.arch }}-portable
307239
308- - name : Attest standard binary provenance
240+ - name : Attest release binary provenance
309241 if : ${{ inputs.attest }}
310242 uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
311243 with :
312244 subject-path : codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz
313245
314- - name : Build UI binary (static)
315- env :
316- VERSION : ${{ inputs.version }}
317- run : |
318- if [ -n "$VERSION" ]; then
319- scripts/build.sh --with-ui --version "$VERSION" CC=gcc CXX=g++ STATIC=1
320- else
321- scripts/build.sh --with-ui CC=gcc CXX=g++ STATIC=1
322- fi
323-
324- - name : Archive UI binary (canonical package-release.sh)
325- run : scripts/package-release.sh linux ${{ matrix.arch }}-portable --variant ui
326-
327- - name : Attest UI binary provenance
328- if : ${{ inputs.attest }}
329- uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
330- with :
331- subject-path : codebase-memory-mcp-ui-linux-${{ matrix.arch }}-portable.tar.gz
332-
333246 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
334247 with :
335248 name : binaries-linux-${{ matrix.arch }}-portable
0 commit comments