diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7c06909..5357b9e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -77,6 +77,7 @@ jobs: Invoke-Program swift package init --type library Invoke-Program swift build enable_windows_docker: false + windows_os_versions: '["windows-2022", "windows-11-arm"]' tests_macos: name: Test diff --git a/.github/workflows/scripts/windows/install-vsb.ps1 b/.github/workflows/scripts/windows/install-vsb.ps1 index 931cbbb..d251bf4 100644 --- a/.github/workflows/scripts/windows/install-vsb.ps1 +++ b/.github/workflows/scripts/windows/install-vsb.ps1 @@ -32,7 +32,8 @@ $Process = '--norestart', '--nocache', '--add', 'Microsoft.VisualStudio.Component.Windows11SDK.22000', - '--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + '--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', + '--add', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64' ) if ($Process.ExitCode -eq 0 -or $Process.ExitCode -eq 3010) { Write-Host 'SUCCESS' diff --git a/.github/workflows/scripts/windows/swift/install-swift-6.0.ps1 b/.github/workflows/scripts/windows/swift/install-swift-6.0.ps1 index 1a6a432..fcc5348 100644 --- a/.github/workflows/scripts/windows/swift/install-swift-6.0.ps1 +++ b/.github/workflows/scripts/windows/swift/install-swift-6.0.ps1 @@ -11,7 +11,12 @@ ##===----------------------------------------------------------------------===## . $PSScriptRoot\install-swift.ps1 -$SWIFT='https://download.swift.org/swift-6.0.3-release/windows10/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-windows10.exe' -$SWIFT_SHA256='AB205D83A38047882DB80E6A88C7D33B651F3BAC96D4515D7CBA5335F37999D3' +if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq "Arm64") { + $SWIFT='https://download.swift.org/swift-6.0.3-release/windows10-arm64/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-windows10-arm64.exe' + $SWIFT_SHA256='81474651e59a9955c9e6a389ef53abd61631ffc62c63a2a02977271019e7c722' +} else { + $SWIFT='https://download.swift.org/swift-6.0.3-release/windows10/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-windows10.exe' + $SWIFT_SHA256='AB205D83A38047882DB80E6A88C7D33B651F3BAC96D4515D7CBA5335F37999D3' +} Install-Swift -Url $SWIFT -Sha256 $SWIFT_SHA256 \ No newline at end of file diff --git a/.github/workflows/scripts/windows/swift/install-swift-6.1.ps1 b/.github/workflows/scripts/windows/swift/install-swift-6.1.ps1 index 035d337..426d9d6 100644 --- a/.github/workflows/scripts/windows/swift/install-swift-6.1.ps1 +++ b/.github/workflows/scripts/windows/swift/install-swift-6.1.ps1 @@ -11,7 +11,12 @@ ##===----------------------------------------------------------------------===## . $PSScriptRoot\install-swift.ps1 -$SWIFT='https://download.swift.org/swift-6.1.2-release/windows10/swift-6.1.2-RELEASE/swift-6.1.2-RELEASE-windows10.exe' -$SWIFT_SHA256='92a0323ed7dd333c3b05e6e0e428f3a91c77d159f6ccfc8626a996f2ace09a0b' +if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq "Arm64") { + $SWIFT='https://download.swift.org/swift-6.1.2-release/windows10-arm64/swift-6.1.2-RELEASE/swift-6.1.2-RELEASE-windows10-arm64.exe' + $SWIFT_SHA256='121fb407e578178f82dccf39a4d03527873d8f7611a801a8fc26da52503a0c5c' +} else { + $SWIFT='https://download.swift.org/swift-6.1.2-release/windows10/swift-6.1.2-RELEASE/swift-6.1.2-RELEASE-windows10.exe' + $SWIFT_SHA256='92a0323ed7dd333c3b05e6e0e428f3a91c77d159f6ccfc8626a996f2ace09a0b' +} Install-Swift -Url $SWIFT -Sha256 $SWIFT_SHA256 diff --git a/.github/workflows/scripts/windows/swift/install-swift-6.2.ps1 b/.github/workflows/scripts/windows/swift/install-swift-6.2.ps1 index 2827cb9..ede6cfa 100644 --- a/.github/workflows/scripts/windows/swift/install-swift-6.2.ps1 +++ b/.github/workflows/scripts/windows/swift/install-swift-6.2.ps1 @@ -11,7 +11,12 @@ ##===----------------------------------------------------------------------===## . $PSScriptRoot\install-swift.ps1 -$SWIFT='https://download.swift.org/swift-6.2.1-release/windows10/swift-6.2.1-RELEASE/swift-6.2.1-RELEASE-windows10.exe' -$SWIFT_SHA256='FD1209AC3E008152924E0409E5590F2FE41644132E532D4526B8641339E88000' +if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq "Arm64") { + $SWIFT='https://download.swift.org/swift-6.2.1-release/windows10-arm64/swift-6.2.1-RELEASE/swift-6.2.1-RELEASE-windows10-arm64.exe' + $SWIFT_SHA256='7c2351e1708f6e74f4c97098c50ac049e08a58894e75cc7c8fd220eb2549fb9d' +} else { + $SWIFT='https://download.swift.org/swift-6.2.1-release/windows10/swift-6.2.1-RELEASE/swift-6.2.1-RELEASE-windows10.exe' + $SWIFT_SHA256='FD1209AC3E008152924E0409E5590F2FE41644132E532D4526B8641339E88000' +} Install-Swift -Url $SWIFT -Sha256 $SWIFT_SHA256 diff --git a/.github/workflows/scripts/windows/swift/install-swift-nightly-6.2.ps1 b/.github/workflows/scripts/windows/swift/install-swift-nightly-6.2.ps1 index 324bea0..df7352d 100644 --- a/.github/workflows/scripts/windows/swift/install-swift-nightly-6.2.ps1 +++ b/.github/workflows/scripts/windows/swift/install-swift-nightly-6.2.ps1 @@ -11,8 +11,16 @@ ##===----------------------------------------------------------------------===## . $PSScriptRoot\install-swift.ps1 -$SWIFT_RELEASE_METADATA='http://download.swift.org/swift-6.2-branch/windows10/latest-build.json' +if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq "Arm64") { + # FIXME: http://download.swift.org/swift-6.2-branch/windows10-arm64/latest-build.json is currently missing on the server + #$swiftOSVersion = 'windows10-arm64' + $swiftOSVersion = 'windows10' +} else { + $swiftOSVersion = 'windows10' +} + +$SWIFT_RELEASE_METADATA="http://download.swift.org/swift-6.2-branch/$swiftOSVersion/latest-build.json" $Release = curl.exe -sL ${SWIFT_RELEASE_METADATA} -$SWIFT_URL = "https://download.swift.org/swift-6.2-branch/windows10/$($($Release | ConvertFrom-JSON).dir)/$($($Release | ConvertFrom-JSON).download)" +$SWIFT_URL = "https://download.swift.org/swift-6.2-branch/$swiftOSVersion/$($($Release | ConvertFrom-JSON).dir)/$($($Release | ConvertFrom-JSON).download)" Install-Swift -Url $SWIFT_URL -Sha256 "" \ No newline at end of file diff --git a/.github/workflows/scripts/windows/swift/install-swift-nightly.ps1 b/.github/workflows/scripts/windows/swift/install-swift-nightly.ps1 index 9c0c154..08558ff 100644 --- a/.github/workflows/scripts/windows/swift/install-swift-nightly.ps1 +++ b/.github/workflows/scripts/windows/swift/install-swift-nightly.ps1 @@ -11,8 +11,14 @@ ##===----------------------------------------------------------------------===## . $PSScriptRoot\install-swift.ps1 -$SWIFT_RELEASE_METADATA='http://download.swift.org/development/windows10/latest-build.json' +if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq "Arm64") { + $swiftOSVersion = 'windows10-arm64' +} else { + $swiftOSVersion = 'windows10' +} + +$SWIFT_RELEASE_METADATA="http://download.swift.org/development/$swiftOSVersion/latest-build.json" $Release = curl.exe -sL ${SWIFT_RELEASE_METADATA} -$SWIFT_URL = "https://download.swift.org/development/windows10/$($($Release | ConvertFrom-JSON).dir)/$($($Release | ConvertFrom-JSON).download)" +$SWIFT_URL = "https://download.swift.org/development/$swiftOSVersion/$($($Release | ConvertFrom-JSON).dir)/$($($Release | ConvertFrom-JSON).download)" Install-Swift -Url $SWIFT_URL -Sha256 "" \ No newline at end of file diff --git a/.github/workflows/swift_package_test.yml b/.github/workflows/swift_package_test.yml index 8637a1c..6ff0b18 100644 --- a/.github/workflows/swift_package_test.yml +++ b/.github/workflows/swift_package_test.yml @@ -83,6 +83,10 @@ on: type: string description: "Exclude Windows Swift version list (JSON)" default: "[{\"swift_version\": \"\"}]" + windows_os_versions: + type: string + description: "Windows OS version label list (JSON)" + default: "[\"windows-2022\"]" swift_flags: type: string description: "Swift flags for release version" @@ -618,13 +622,14 @@ jobs: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }} --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }} windows-build: - name: Windows (${{ matrix.swift_version }} - windows-2022) + name: Windows (${{ matrix.swift_version }} - ${{ matrix.os_version }}) if: ${{ inputs.enable_windows_checks }} - runs-on: windows-2022 + runs-on: ${{ matrix.os_version }} strategy: fail-fast: false matrix: swift_version: ${{ fromJson(inputs.windows_swift_versions) }} + os_version: ${{ fromJson(inputs.windows_os_versions) }} exclude: - ${{ fromJson(inputs.windows_exclude_swift_versions) }} steps: