From b84828bca7b283d3795254237ffa01ed3da8e464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 18 Mar 2025 11:29:00 +0100 Subject: [PATCH] CI: Build macOS binary without Vulkan if Vulkan SDK fails installing It's not rare for this step to fail, either due to network errors, or occasional changes in how the Vulkan SDK is distributed which require editing our script. --- .github/workflows/macos_builds.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index 74cf57b2840..1244ce25e47 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -44,13 +44,20 @@ jobs: uses: ./.github/actions/godot-deps - name: Setup Vulkan SDK + id: vulkan-sdk run: | - sh misc/scripts/install_vulkan_sdk_macos.sh + if sh misc/scripts/install_vulkan_sdk_macos.sh; then + echo "VULKAN_ENABLED=yes" >> "$GITHUB_OUTPUT" + else + echo "::warning::macOS: Vulkan SDK installation failed, building without Vulkan support." + echo "VULKAN_ENABLED=no" >> "$GITHUB_OUTPUT" + fi + continue-on-error: true - name: Compilation (x86_64) uses: ./.github/actions/godot-build with: - sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64 + sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }} platform: macos target: ${{ matrix.target }} tests: ${{ matrix.tests }} @@ -58,7 +65,7 @@ jobs: - name: Compilation (arm64) uses: ./.github/actions/godot-build with: - sconsflags: ${{ env.SCONSFLAGS }} arch=arm64 + sconsflags: ${{ env.SCONSFLAGS }} arch=arm64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }} platform: macos target: ${{ matrix.target }} tests: ${{ matrix.tests }}