From ea3425c384b49d3b5b0d9d13c9c4c3c6e3823733 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Thu, 6 Nov 2025 10:55:34 -0500 Subject: [PATCH 1/5] aarch64 test release workflow on PR --- .github/workflows/build.yml | 2 +- .github/workflows/windows_release.yml | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36ecd240f..ca067388f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: build on: push: - pull_request: + # pull_request: jobs: macos: strategy: diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index d0f0450ac..37afd60c7 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -3,6 +3,8 @@ name: Build Windows Release Artifacts on: release: types: [published] + pull_request: + types: [opened, synchronize, reopened] workflow_dispatch: inputs: tag: @@ -18,11 +20,11 @@ jobs: fail-fast: false matrix: include: - - target-triple: x86_64-unknown-windows-msvc - product-arch: amd64 + # - target-triple: x86_64-unknown-windows-msvc + # product-arch: amd64 # Disabled since the build was always failing - # - target-triple: aarch64-unknown-windows-msvc - # product-arch: arm64 + - target-triple: aarch64-unknown-windows-msvc + product-arch: arm64 steps: - uses: compnerd/gha-setup-swift@main @@ -52,10 +54,19 @@ jobs: throw "Swift redistributable not found at $SwiftRedistDir" } + # Determine product version based on trigger + if ("${{ github.event_name }}" -eq "release") { + $ProductVersion = "${{ github.event.release.tag_name }}" + } elseif ("${{ github.event_name }}" -eq "workflow_dispatch") { + $ProductVersion = "${{ inputs.tag }}" + } else { + $ProductVersion = "PR${{ github.event.pull_request.number }}" + } + & msbuild -nologo -restore Platforms\Windows\SwiftFormat.wixproj ` -p:Configuration=Release ` -p:ProductArchitecture=${{ matrix.product-arch }} ` - -p:ProductVersion=${{ github.event.release.tag_name || inputs.tag }} ` + -p:ProductVersion=$ProductVersion ` -p:SwiftFormatBuildDir=${{ github.workspace }}\.build\${{ matrix.target-triple }}\release ` -p:SwiftRedistDir=$SwiftRedistDir ` -p:OutputPath=${{ github.workspace }}\artifacts ` @@ -82,7 +93,7 @@ jobs: name: Upload release artifacts runs-on: ubuntu-latest needs: [build] - if: always() + if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') steps: - name: Checkout the repository uses: actions/checkout@v5 From 73769d6e15fcd64774d56ea969974eb94bc3c888 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Thu, 6 Nov 2025 11:03:41 -0500 Subject: [PATCH 2/5] try develop snapshot --- .github/workflows/build.yml | 2 +- .github/workflows/windows_release.yml | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca067388f..b45be9dd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ name: build on: - push: + # push: # pull_request: jobs: macos: diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index 37afd60c7..f41a33844 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -22,20 +22,27 @@ jobs: include: # - target-triple: x86_64-unknown-windows-msvc # product-arch: amd64 - # Disabled since the build was always failing - - target-triple: aarch64-unknown-windows-msvc - product-arch: arm64 + # Disabled since the build was always failing + - target-triple: aarch64-unknown-windows-msvc + product-arch: arm64 steps: - uses: compnerd/gha-setup-swift@main with: - tag: 6.1-RELEASE - branch: swift-6.1-release + swift-version: development + # Note: This snapshot includes the WindowsExperimental.sdk needed for static linking support, + # this will be merged into Windows.sdk in the near future and $ExperimentalSDK related flags below will need to be removed + swift-build: DEVELOPMENT-SNAPSHOT-2025-08-27-a + update-sdk-modules: true - name: Checkout uses: actions/checkout@v5 - - run: swift build -c release --triple ${{ matrix.target-triple }} -Xswiftc -gnone + - shell: pwsh + run: | + $ExperimentalSDK = "$(Split-Path -Path ${env:SDKROOT} -Parent)/WindowsExperimental.sdk" + swift build -c release --triple ${{ matrix.target-triple }} -debug-info-format none -Xswiftc -static-stdlib ` + -Xswiftc -sdk -Xswiftc ${ExperimentalSDK} - uses: microsoft/setup-msbuild@v2.0.0 From a759d5af089970ab9bb84c670c4b26ad168589bd Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Thu, 6 Nov 2025 11:14:27 -0500 Subject: [PATCH 3/5] fix version, remove toolchain from msbuild --- .github/workflows/windows_release.yml | 2 +- Platforms/Windows/SwiftFormat.wxs | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index f41a33844..50d075138 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -65,7 +65,7 @@ jobs: if ("${{ github.event_name }}" -eq "release") { $ProductVersion = "${{ github.event.release.tag_name }}" } elseif ("${{ github.event_name }}" -eq "workflow_dispatch") { - $ProductVersion = "${{ inputs.tag }}" + $ProductVersion = "0.0.0.1" } else { $ProductVersion = "PR${{ github.event.pull_request.number }}" } diff --git a/Platforms/Windows/SwiftFormat.wxs b/Platforms/Windows/SwiftFormat.wxs index fc78776b6..736da6699 100644 --- a/Platforms/Windows/SwiftFormat.wxs +++ b/Platforms/Windows/SwiftFormat.wxs @@ -19,14 +19,6 @@ - - - - - - - - From e5948b32a8002880fc5809fb00c5283b9ac17035 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Thu, 6 Nov 2025 11:24:23 -0500 Subject: [PATCH 4/5] actually fix ProductVersion --- .github/workflows/windows_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index 50d075138..1429cc4b2 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -65,9 +65,9 @@ jobs: if ("${{ github.event_name }}" -eq "release") { $ProductVersion = "${{ github.event.release.tag_name }}" } elseif ("${{ github.event_name }}" -eq "workflow_dispatch") { - $ProductVersion = "0.0.0.1" + $ProductVersion = "${{ inputs.tag }}" } else { - $ProductVersion = "PR${{ github.event.pull_request.number }}" + $ProductVersion = "0.0.0.1" } & msbuild -nologo -restore Platforms\Windows\SwiftFormat.wixproj ` From 74cd9c43635277cd80da7132f0972b0a1025a77b Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Thu, 6 Nov 2025 11:34:20 -0500 Subject: [PATCH 5/5] another try to fix wxs --- Platforms/Windows/SwiftFormat.wxs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Platforms/Windows/SwiftFormat.wxs b/Platforms/Windows/SwiftFormat.wxs index 736da6699..c4187197d 100644 --- a/Platforms/Windows/SwiftFormat.wxs +++ b/Platforms/Windows/SwiftFormat.wxs @@ -19,6 +19,14 @@ + + + + + + + + @@ -33,7 +41,7 @@ - +