@@ -285,65 +285,8 @@ jobs:
285285 commit_message : ${{ github.event.inputs.commit_message }}
286286 push_changes : ${{ github.event.inputs.push_changes }}
287287
288- # build-windows:
289- # if: ${{ github.event.inputs.platform == 'x86-win32' || github.event.inputs.platform == 'x86_64-win32' || github.event.inputs.platform == 'all' }}
290- # runs-on: windows-2022
291- # strategy:
292- # matrix:
293- # platform: ${{ fromJSON(github.event.inputs.platform == 'all' && '["x86_64-win32"]' || format('["{0}"]', github.event.inputs.platform)) }}
294- # steps:
295- # - name: Checkout repository
296- # uses: actions/checkout@v5
297- # with:
298- # fetch-depth: 1
299-
300- # - name: Setup VS DevCmd (x64)
301- # if: ${{ matrix.platform == 'x86_64-win32' }}
302- # uses: ilammy/msvc-dev-cmd@v1
303- # with:
304- # arch: x64
305- # vsversion: 2022
306- # toolset: 14.20
307- # sdk: 10.0.22621.0
308-
309- # - name: Setup VS DevCmd (x86)
310- # if: ${{ matrix.platform == 'x86-win32' }}
311- # uses: ilammy/msvc-dev-cmd@v1
312- # with:
313- # arch: x86
314- # vsversion: 2022
315- # toolset: 14.20
316- # sdk: 10.0.22621.0
317-
318- # - name: MSBuild sanity check
319- # shell: pwsh
320- # run: |
321- # msbuild -version
322- # Get-Command msbuild.exe | Format-List -Property Source
323-
324- # - name: Install DirectX Shader Compiler (DXC)
325- # shell: bash
326- # run: |
327- # set -euo pipefail
328- # choco install directxshadercompiler -y || true
329- # # Verify availability if installed
330- # dxc.exe -version 2> NUL || true
331-
332- # - name: Build, (optionally) upload, and commit
333- # uses: ./.github/actions/rive-build
334- # with:
335- # platform: ${{ matrix.platform }}
336- # rive_repo_url: ${{ github.event.inputs.rive_repo_url }}
337- # rive_ref: ${{ github.event.inputs.rive_ref }}
338- # rive_sha: ${{ github.event.inputs.rive_sha }}
339- # upload_artifact: ${{ github.event.inputs.upload_artifact }}
340- # commit_message: ${{ github.event.inputs.commit_message }}
341- # push_changes: ${{ github.event.inputs.push_changes }}
342-
343-
344288 build-windows :
345289 if : ${{ github.event.inputs.platform == 'x86-win32' || github.event.inputs.platform == 'x86_64-win32' || github.event.inputs.platform == 'all' }}
346- needs : prepare-defoldsdk
347290 runs-on : windows-2022
348291 strategy :
349292 matrix :
@@ -359,49 +302,19 @@ jobs:
359302 with :
360303 python-version : " 3.x"
361304
362- - name : Restore Defold SDK and bob.jar from cache
363- uses : actions/cache/restore@v4
364- with :
365- path : |
366- bob.jar
367- build/defoldsdk
368- key : ${{ needs.prepare-defoldsdk.outputs.defoldsdk_cache_key }}
369- enableCrossOsArchive : true
370- fail-on-cache-miss : true
371-
372- - name : Clone Rive runtime
373- shell : bash
374- run : |
375- set -euo pipefail
376- RIVE_TMP_DIR=$(mktemp -d)
377- git clone --depth 1 "${{ github.event.inputs.rive_repo_url }}" "$RIVE_TMP_DIR"
378- if [ -n "${{ github.event.inputs.rive_sha }}" ]; then
379- (cd "$RIVE_TMP_DIR" && git fetch --depth 1 origin "${{ github.event.inputs.rive_sha }}" && git checkout --force "${{ github.event.inputs.rive_sha }}")
380- elif [ -n "${{ github.event.inputs.rive_ref }}" ]; then
381- (cd "$RIVE_TMP_DIR" && git fetch --depth 1 origin "${{ github.event.inputs.rive_ref }}" && git checkout --force "${{ github.event.inputs.rive_ref }}")
382- fi
383- echo "RIVE_TMP_DIR=$RIVE_TMP_DIR" >> "$GITHUB_ENV"
384-
385305 - name : Setup VS DevCmd (x64)
386306 if : ${{ matrix.platform == 'x86_64-win32' }}
387307 uses : ilammy/msvc-dev-cmd@v1
388308 with :
389309 arch : x64
390310 vsversion : 2022
391- toolset : 14.20
392- sdk : 10.0.22621.0
393311
394312 - name : Setup VS DevCmd (x86)
395313 if : ${{ matrix.platform == 'x86-win32' }}
396314 uses : ilammy/msvc-dev-cmd@v1
397315 with :
398316 arch : x86
399317 vsversion : 2022
400- toolset : 14.20
401- sdk : 10.0.22621.0
402-
403- - name : Setup CMake 4.1
404- uses : lukka/get-cmake@v4.1.1
405318
406319 - name : Install Vulkan SDK
407320 uses : humbletim/install-vulkan-sdk@v1.2
@@ -419,6 +332,7 @@ jobs:
419332 run : |
420333 set -euo pipefail
421334 glslangValidator --version
335+ spirv-opt --version
422336
423337 - name : Install DirectX Shader Compiler (DXC)
424338 shell : bash
@@ -427,52 +341,17 @@ jobs:
427341 choco install directxshadercompiler -y || true
428342 dxc.exe -version 2> /dev/null || true
429343
430- - name : Build libraries with Vulkan
431- shell : bash
432- env :
433- DYNAMO_HOME : ${{ github.workspace }}/build/defoldsdk/defoldsdk
434- run : |
435- set -euo pipefail
436- ./utils/build_rive_runtime.sh "${{ matrix.platform }}" "$RIVE_TMP_DIR" --with-vulkan
437-
438- - name : Commit native libs
439- if : ${{ github.event.inputs.push_changes == 'true' }}
440- shell : bash
441- run : |
442- set -euo pipefail
443- git config user.name "github-actions[bot]"
444- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
445- PLATFORM_DIR="defold-rive/lib/${{ matrix.platform }}"
446- git add -v "$PLATFORM_DIR" || true
447- if git diff --cached --quiet; then
448- echo "No native lib changes to commit."
449- exit 0
450- fi
451- msg="ci: update native libs (${{ matrix.platform }}) on ${{ github.ref_name }} [skip ci]"
452- if [ -n "${{ github.event.inputs.commit_message }}" ]; then
453- msg="$msg - ${{ github.event.inputs.commit_message }}"
454- fi
455- git commit -m "$msg"
456- max_attempts=3
457- attempt=1
458- until [ $attempt -gt $max_attempts ]; do
459- echo "Attempt $attempt: rebase + push"
460- if git pull --rebase origin "${{ github.ref_name }}"; then
461- if git push origin HEAD:"${{ github.ref_name }}"; then
462- echo "Push succeeded"
463- break
464- fi
465- else
466- echo "Rebase failed; aborting and retrying"
467- git rebase --abort || true
468- fi
469- attempt=$((attempt+1))
470- sleep $((attempt*2))
471- done
472- if [ $attempt -gt $max_attempts ]; then
473- echo "Push failed after $max_attempts attempts"
474- exit 1
475- fi
344+ - name : Build, (optionally) upload, and commit
345+ uses : ./.github/actions/rive-build
346+ with :
347+ platform : ${{ matrix.platform }}
348+ rive_repo_url : ${{ github.event.inputs.rive_repo_url }}
349+ rive_ref : ${{ github.event.inputs.rive_ref }}
350+ rive_sha : ${{ github.event.inputs.rive_sha }}
351+ upload_artifact : ${{ github.event.inputs.upload_artifact }}
352+ commit_message : ${{ github.event.inputs.commit_message }}
353+ push_changes : ${{ github.event.inputs.push_changes }}
354+ with_vulkan : true
476355
477356 build-plugin-macos :
478357 if : ${{ github.event.inputs.platform == 'arm64-macos' || github.event.inputs.platform == 'x86_64-macos' || github.event.inputs.platform == 'all' }}
0 commit comments