Skip to content

Commit 4d9cc3e

Browse files
committed
Improve Vulkan SDK download resilience in CI workflow
- Added multiple fallback URLs for Vulkan SDK download from LunarG. - Implemented error handling to ensure CI exits gracefully if all downloads fail.
1 parent 150d149 commit 4d9cc3e

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/simple_engine_ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,25 @@ jobs:
8484
8585
echo "Downloading Vulkan SDK from LunarG..."
8686
# Use the official LunarG download endpoint (latest Linux tarball).
87-
# We avoid distro packages so this matches what students are expected to do.
8887
SDK_TGZ="${RUNNER_TEMP}/vulkansdk-linux.tar.xz"
89-
curl -L --fail -o "$SDK_TGZ" "https://sdk.lunarg.com/sdk/download/latest/linux/vulkansdk-linux-x86_64.tar.xz"
88+
89+
download_ok=0
90+
for url in \
91+
"https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz" \
92+
"https://sdk.lunarg.com/sdk/download/latest/linux/vulkansdk-linux-x86_64.tar.xz" \
93+
"https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz?Human=true" \
94+
"https://sdk.lunarg.com/sdk/download/latest/linux/vulkansdk-linux-x86_64.tar.xz?Human=true"
95+
do
96+
echo "Attempting: $url"
97+
if curl -L --fail -o "$SDK_TGZ" "$url"; then
98+
download_ok=1
99+
break
100+
fi
101+
done
102+
if [ "$download_ok" -ne 1 ]; then
103+
echo "Failed to download Vulkan SDK from LunarG (all endpoints returned non-200)." >&2
104+
exit 1
105+
fi
90106
91107
SDK_DIR="${RUNNER_TEMP}/VulkanSDK"
92108
rm -rf "$SDK_DIR"

0 commit comments

Comments
 (0)