@@ -215,188 +215,14 @@ jobs:
215215 - name : Web smoke test
216216 run : npm run test:web
217217
218- dev-package :
219- name : Dev Package (${{ matrix.target }})
218+ dev-artifacts :
219+ name : Dev Artifacts
220220 needs : changes
221- if : fromJSON(needs.changes.outputs.plan).run_dev_package == true
222- runs-on : ${{ matrix.os }}
223- strategy :
224- fail-fast : false
225- matrix :
226- include : ${{ fromJSON(needs.changes.outputs.plan).dev_package_matrix }}
227- defaults :
228- run :
229- working-directory : editors/vscode
230- env :
231- SERVER_BIN : ${{ startsWith(matrix.target, 'win32-') && 'vide.exe' || 'vide' }}
232- steps :
233- - uses : actions/checkout@v4
234- - name : Restore bundled server cache
235- id : bundled-server-cache
236- uses : actions/cache/restore@v4
237- with :
238- path : editors/vscode/server/${{ matrix.target }}/${{ env.SERVER_BIN }}
239- key : bundled-server-${{ matrix.target }}-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'build.rs', 'rust-toolchain.toml', 'src/**', 'crates/**', 'xtask/**') }}
240- - name : Install Rust
241- uses : ./.github/actions/setup-rust
242- with :
243- components : rustfmt
244- - name : Setup sccache
245- uses : ./.github/actions/setup-sccache
246- with :
247- cmake-launcher : " true"
248- - name : Rust Cache
249- uses : Swatinem/rust-cache@v2
250- continue-on-error : true
251- with :
252- shared-key : rust-${{ runner.os }}
253- key : package-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'build.rs', 'rust-toolchain.toml', 'src/**', 'crates/**', 'xtask/**') }}
254- cache-workspace-crates : true
255- cache-on-failure : true
256- - name : Setup Node
257- uses : actions/setup-node@v4
258- with :
259- node-version : 22
260- cache : npm
261- cache-dependency-path : editors/vscode/package-lock.json
262- - name : Install dependencies
263- run : npm ci
264- - name : Set build metadata
265- id : build-metadata
266- shell : bash
267- run : |
268- commit_hash="$(git rev-parse --short "$GITHUB_SHA")"
269- echo "commit_hash=${commit_hash}" >> "$GITHUB_OUTPUT"
270- echo "VIDE_EXTENSION_BUILD_KIND=nightly" >> "$GITHUB_ENV"
271- echo "VIDE_EXTENSION_COMMIT_HASH=${commit_hash}" >> "$GITHUB_ENV"
272- echo "VIDE_EXTENSION_BUILD_DATE=$(date -u +'%Y%m%dT%H%M%SZ')" >> "$GITHUB_ENV"
273- - name : Package extension
274- run : npm run package:vsix:debug -- --target ${{ matrix.target }} ${{ steps.bundled-server-cache.outputs.cache-hit == 'true' && '--server=prebuilt' || '--server=build' }}
275- - name : Save bundled server cache
276- if : steps.bundled-server-cache.outputs.cache-hit != 'true'
277- uses : actions/cache/save@v4
278- continue-on-error : true
279- with :
280- path : editors/vscode/server/${{ matrix.target }}/${{ env.SERVER_BIN }}
281- key : ${{ steps.bundled-server-cache.outputs.cache-primary-key }}
282- - name : Upload dev VSIX
283- uses : actions/upload-artifact@v4
284- with :
285- name : vide-vscode-dev-${{ matrix.target }}-${{ steps.build-metadata.outputs.commit_hash }}
286- path : editors/vscode/vide-vscode-${{ matrix.target }}-debug.vsix
287- if-no-files-found : error
288- retention-days : 14
289- - name : Upload dev language server binary
290- shell : bash
291- working-directory : .
292- run : |
293- set -euo pipefail
294- server_dir="editors/vscode/server/${{ matrix.target }}"
295- if [[ "${{ matrix.target }}" == win32-* ]]; then
296- src="${server_dir}/vide.exe"
297- dst="vide-${{ matrix.target }}.exe"
298- else
299- src="${server_dir}/vide"
300- dst="vide-${{ matrix.target }}"
301- fi
302- if [[ ! -f "$src" ]]; then
303- echo "Language server binary not found: $src" >&2
304- exit 1
305- fi
306- cp "$src" "$dst"
307- - name : Upload dev language server binary artifact
308- uses : actions/upload-artifact@v4
309- with :
310- name : vide-lsp-dev-${{ matrix.target }}-${{ steps.build-metadata.outputs.commit_hash }}
311- path : vide-${{ matrix.target }}*
312- if-no-files-found : error
313- retention-days : 14
314-
315- dev-web-package :
316- name : Dev Package (web)
317- needs : changes
318- if : fromJSON(needs.changes.outputs.plan).run_dev_web_package == true
319- runs-on : ubuntu-latest
320- defaults :
321- run :
322- working-directory : editors/vscode
323- steps :
324- - uses : actions/checkout@v4
325- - name : Restore playground WASM cache
326- id : playground-wasm-cache
327- uses : actions/cache/restore@v4
328- with :
329- path : playground/public/wasm
330- key : playground-wasm-${{ runner.os }}-${{ env.EMSDK_VERSION }}-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'build.rs', 'rust-toolchain.toml', 'src/**', 'crates/**', 'playground/scripts/build-vide-wasm.mjs', 'playground/scripts/script-utils.mjs', '.github/actions/setup-emscripten/**', '.github/actions/setup-rust/**') }}
331- - name : Verify cached playground WASM
332- if : steps.playground-wasm-cache.outputs.cache-hit == 'true'
333- working-directory : .
334- run : |
335- test -s playground/public/wasm/vide-lsp.js
336- test -s playground/public/wasm/vide-core.js
337- test -s playground/public/wasm/vide-core.wasm
338- - name : Install Rust
339- if : steps.playground-wasm-cache.outputs.cache-hit != 'true'
340- uses : ./.github/actions/setup-rust
341- with :
342- components : rustfmt
343- - name : Setup sccache
344- if : steps.playground-wasm-cache.outputs.cache-hit != 'true'
345- uses : ./.github/actions/setup-sccache
346- with :
347- cmake-launcher : " true"
348- - name : Rust Cache
349- if : steps.playground-wasm-cache.outputs.cache-hit != 'true'
350- uses : Swatinem/rust-cache@v2
351- continue-on-error : true
352- with :
353- shared-key : vscode-web-wasm-${{ runner.os }}-${{ env.EMSDK_VERSION }}
354- key : wasm-src-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'build.rs', 'rust-toolchain.toml', 'src/**', 'crates/**', 'playground/scripts/build-vide-wasm.mjs', 'playground/scripts/script-utils.mjs', '.github/actions/setup-emscripten/**', '.github/actions/setup-rust/**') }}
355- cache-workspace-crates : true
356- cache-on-failure : true
357- - name : Install Emscripten SDK
358- if : steps.playground-wasm-cache.outputs.cache-hit != 'true'
359- uses : ./.github/actions/setup-emscripten
360- with :
361- version : ${{ env.EMSDK_VERSION }}
362- - name : Setup Node
363- uses : actions/setup-node@v4
364- with :
365- node-version : 22
366- cache : npm
367- cache-dependency-path : editors/vscode/package-lock.json
368- - name : Install dependencies
369- run : npm ci
370- - name : Build playground WASM
371- if : steps.playground-wasm-cache.outputs.cache-hit != 'true'
372- working-directory : playground
373- run : |
374- source "${EMSDK}/emsdk_env.sh"
375- npm run build:wasm
376- - name : Save playground WASM cache
377- if : steps.playground-wasm-cache.outputs.cache-hit != 'true'
378- uses : actions/cache/save@v4
379- continue-on-error : true
380- with :
381- path : playground/public/wasm
382- key : ${{ steps.playground-wasm-cache.outputs.cache-primary-key }}
383- - name : Set build metadata
384- id : build-metadata
385- shell : bash
386- working-directory : .
387- run : |
388- commit_hash="$(git rev-parse --short "$GITHUB_SHA")"
389- echo "commit_hash=${commit_hash}" >> "$GITHUB_OUTPUT"
390- echo "VIDE_EXTENSION_BUILD_KIND=nightly" >> "$GITHUB_ENV"
391- echo "VIDE_EXTENSION_COMMIT_HASH=${commit_hash}" >> "$GITHUB_ENV"
392- echo "VIDE_EXTENSION_BUILD_DATE=$(date -u +'%Y%m%dT%H%M%SZ')" >> "$GITHUB_ENV"
393- - name : Package extension
394- run : npm run package:vsix:web
395- - name : Upload dev VSIX
396- uses : actions/upload-artifact@v4
397- with :
398- name : vide-vscode-dev-web-${{ steps.build-metadata.outputs.commit_hash }}
399- path : editors/vscode/vide-vscode-web.vsix
400- if-no-files-found : error
401- retention-days : 14
221+ if : fromJSON(needs.changes.outputs.plan).run_dev_artifacts == true
222+ uses : ./.github/workflows/build-artifacts.yml
223+ with :
224+ plan : ' {"announcement_is_prerelease":true}'
225+ build-kind : nightly
226+ cargo-profile : debug
227+ vsix-profile : debug
402228
0 commit comments