Skip to content

Commit ba95ec2

Browse files
committed
create directories as needed
1 parent 1c738e7 commit ba95ec2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ runs:
2727
# Download and extract SDK if we failed to restore
2828
- run: |
2929
sdkVersion='${{ inputs.version == 'latest' && steps.determineSdkVersion.outputs.sdkVersion || inputs.version }}'
30-
curl -sSL --create-dirs -o "$RUNNER_TEMP/vulkan_sdk.tar.xz" "https://sdk.lunarg.com/sdk/download/$sdkVersion/linux/vulkan_sdk.tar.xz"
30+
curl -sSL -o "$RUNNER_TEMP/vulkan_sdk.tar.xz" "https://sdk.lunarg.com/sdk/download/$sdkVersion/linux/vulkan_sdk.tar.xz"
31+
mkdir -p "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion"
3132
tar -xf "$RUNNER_TEMP/vulkan_sdk.tar.xz" -C "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion" --strip-components 2 "$sdkVersion/x86_64"
3233
shell: bash
3334
if: ${{ steps.cache-restore.output.cache-hit != 'true' && runner.os == 'Linux' }}
3435
- run: |
3536
sdkVersion='${{ inputs.version == 'latest' && steps.determineSdkVersion.outputs.sdkVersion || inputs.version }}'
36-
curl -sSL --create-dirs -o "$RUNNER_TEMP/vulkan_sdk.zip" "https://sdk.lunarg.com/sdk/download/$sdkVersion/mac/vulkan_sdk.zip"
37+
curl -sSL -o "$RUNNER_TEMP/vulkan_sdk.zip" "https://sdk.lunarg.com/sdk/download/$sdkVersion/mac/vulkan_sdk.zip"
38+
mkdir -p "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion"
39+
mkdir -p "$RUNNER_TEMP/vulkan_sdk"
3740
ditto -xk "$RUNNER_TEMP/vulkan_sdk.zip" "$RUNNER_TEMP/vulkan_sdk"
3841
appRoot="$RUNNER_TEMP/vulkan_sdk/vulkansdk-macOS-$sdkVersion.app"
3942
installer="$appRoot/Contents/MacOS/vulkansdk-macOS-$sdkVersion"
@@ -42,13 +45,15 @@ runs:
4245
if: ${{ steps.cache-restore.output.cache-hit != 'true' && runner.os == 'macOS' }}
4346
- run: |
4447
$sdkVersion='${{ inputs.version == 'latest' && steps.determineSdkVersion.outputs.sdkVersion || inputs.version }}'
45-
curl -sSL --create-dirs -o "$RUNNER_TEMP/vulkan_sdk.exe" "https://sdk.lunarg.com/sdk/download/$sdkVersion/windows/vulkan_sdk.exe"
48+
curl -sSL -o "$RUNNER_TEMP/vulkan_sdk.exe" "https://sdk.lunarg.com/sdk/download/$sdkVersion/windows/vulkan_sdk.exe"
49+
$null = New-Item -ItemType Directory -Force -Path "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion"
4650
& "$RUNNER_TEMP/vulkan_sdk.exe" --root "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion" --accept-licenses --default-answer --auto-answer OverwriteTargetDirectory=Yes --confirm-command install
4751
shell: pwsh
4852
if: ${{ steps.cache-restore.output.cache-hit != 'true' && runner.os == 'Windows' && runner.arch == 'x64' }}
4953
- run: |
5054
$sdkVersion='${{ inputs.version == 'latest' && steps.determineSdkVersion.outputs.sdkVersion || inputs.version }}'
51-
curl -sSL --create-dirs -o "$RUNNER_TEMP/vulkan_sdk.exe" "https://sdk.lunarg.com/sdk/download/$sdkVersion/warm/vulkan_sdk.exe"
55+
curl -sSL -o "$RUNNER_TEMP/vulkan_sdk.exe" "https://sdk.lunarg.com/sdk/download/$sdkVersion/warm/vulkan_sdk.exe"
56+
$null = New-Item -ItemType Directory -Force -Path "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion"
5257
& "$RUNNER_TEMP/vulkan_sdk.exe" --root "$RUNNER_TOOL_CACHE/vulkan/$sdkVersion" --accept-licenses --default-answer --auto-answer OverwriteTargetDirectory=Yes --confirm-command install
5358
shell: pwsh
5459
if: ${{ steps.cache-restore.output.cache-hit != 'true' && runner.os == 'Windows' && (runner.arch == 'ARM' || runner.arch == 'ARM64') }}

0 commit comments

Comments
 (0)