Skip to content

Commit 523d97e

Browse files
committed
GHA: generate SDKSettings.json
This was added upstream, follow suite and generate this here as this is needed for packaging.
1 parent c301b2b commit 523d97e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/swift-toolchain.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,6 +2496,24 @@ jobs:
24962496
# runtime.
24972497
plistlib.dump({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }, plist)
24982498
2499+
- run: |
2500+
$SDKSettings = @{
2501+
CanonicalName = "${{ matrix.triple }}"
2502+
DisplayName = "${{ matrix.os }}"
2503+
IsBaseSDK = "NO"
2504+
Version = "${{ inputs.swift_version }}"
2505+
VersionMap = @{}
2506+
DefaultProperties = @{
2507+
PLATFORM_NAME = "${{ matrix.os }}"
2508+
DEFAULT_COMPILER = [string]::Format(".org.compnerd.dt.toolchain.{0}.{1}-asserts", (Get-Date -Format "yyyymmdd"), ((Get-Date).Hour % 6))
2509+
}
2510+
}
2511+
if ("${{ matrix.os }}" -eq "Windows") {
2512+
$SDKSettings.DefaultProperties.DEFAULT_USE_RUNTIME = "MD"
2513+
}
2514+
New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk" -Force | Out-Null
2515+
$SDKSettings | ConvertTo-JSON | Out-File -FilePath "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/SDKSettings.json"
2516+
24992517
- uses: actions/upload-artifact@v4
25002518
if: matrix.os != 'Android' || inputs.build_android
25012519
with:

0 commit comments

Comments
 (0)