Skip to content

[swift-build] Update vm images - no Python 3.9 #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .cirun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runners:
- name: win11-23h2-pro-arm64-16
cloud: azure
instance_type: Standard_D16plds_v5
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.12"
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.27"
labels:
- cirun-win11-23h2-pro-arm64-16
extra_config:
Expand All @@ -30,7 +30,7 @@ runners:
- name: win11-23h2-pro-arm64-64
cloud: azure
instance_type: Standard_D64plds_v5
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.12"
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.27"
labels:
- cirun-win11-23h2-pro-arm64-64
extra_config:
Expand All @@ -41,7 +41,7 @@ runners:
- name: win11-23h2-pro-x64-16
cloud: azure
instance_type: Standard_F16s_v2
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.12"
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.27"
labels:
- cirun-win11-23h2-pro-x64-16
extra_config:
Expand All @@ -52,7 +52,7 @@ runners:
- name: win11-23h2-pro-x64-64
cloud: azure
instance_type: Standard_D64ads_v5
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.12"
machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.27"
labels:
- cirun-win11-23h2-pro-x64-64
extra_config:
Expand Down
6 changes: 6 additions & 0 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ runs:
steps:
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
working-directory: ${{ inputs.repo-root }}
# Explicitly set where the pyproject.toml file is located untill we
# a fix for https://github.com/astral-sh/setup-uv/issues/441
cache-dependency-glob: ${{ inputs.repo-root }}/**/pyproject.toml

# uv misbehaves in the presence of the python 3.9 pythonarm64 Nuget package.
# This is a workaround to remove it if it exists.
- name: Uninstall pythonarm64 if installed
Expand Down
42 changes: 28 additions & 14 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ env:
WORKAROUND_WINDOWS_PINNED_BOOTSTRAP_TOOLCHAIN_REPO: thebrowsercompany/swift-build
WORKAROUND_WINDOWS_PINNED_BOOTSTRAP_TOOLCHAIN_VERSION: 6.0.0-20241216.0

# Workaround to build the early swift-driver without the workaround for the MSVC version.
WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_REPO: thebrowsercompany/swift-build
WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_VERSION: 6.2.0-20250630.0

# Workaround for issues with building with MSVC 14.43.
# See https://github.com/swiftlang/swift/issues/79852 for details.
# TODO: Remove this once the bootstrap toolchain is updated to 6.1.
Expand Down Expand Up @@ -682,7 +686,10 @@ jobs:
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false

- name: Setup python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have this upstream. Is there a reason why this cannot be upstream?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uses: ./SourceCache/ci-build/.github/actions/setup-python
with:
repo-root: ${{ github.workspace }}/SourceCache/ci-build
- name: Configure Tools
run: |
cmake -B ${{ github.workspace }}/BinaryCache/0 `
Expand Down Expand Up @@ -782,10 +789,9 @@ jobs:
- uses: ./SourceCache/ci-build/.github/actions/setup-build
id: setup-build
with:
msvc-version: ${{ env.WORKAROUND_BOOTSTRAP_WINDOWS_MSVC_VERSION }}
host-arch: ${{ matrix.arch }}
swift-version: ${{ inputs.build_os == 'Windows' && env.WORKAROUND_WINDOWS_PINNED_BOOTSTRAP_TOOLCHAIN_VERSION || env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}
swift-repo: ${{ inputs.build_os == 'Windows' && env.WORKAROUND_WINDOWS_PINNED_BOOTSTRAP_TOOLCHAIN_REPO || '' }}
swift-version: ${{ inputs.build_os == 'Windows' && env.WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_VERSION || env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}
swift-repo: ${{ inputs.build_os == 'Windows' && env.WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_REPO || '' }}

- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -821,14 +827,8 @@ jobs:
- name: Build early swift-driver
run: |
$env:SWIFTCI_USE_LOCAL_DEPS=1
$BuildToolsVersion = "${{ steps.setup-build.outputs.windows-build-tools-version }}"
$ExtraFlags = if ($BuildToolsVersion -ne "") {
@("-Xlinker", "${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/swiftCore.lib",
"-Xswiftc", "-visualc-tools-version", "-Xswiftc", "${BuildToolsVersion}",
"-Xbuild-tools-swiftc", "-visualc-tools-version", "-Xbuild-tools-swiftc", "${BuildToolsVersion}",
"-Xcc", "-Xmicrosoft-visualc-tools-version", "-Xcc", "${BuildToolsVersion}",
"-Xcxx", "-Xmicrosoft-visualc-tools-version", "-Xcxx", "${BuildToolsVersion}"
)
$ExtraFlags = if ("${{ matrix.os }}" -eq "Windows") {
@("-Xlinker", "${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/swiftCore.lib")
} else {
@()
}
Expand Down Expand Up @@ -1134,6 +1134,7 @@ jobs:
-D CLANG_VENDOR_UTI=org.compnerd.dt `
-D cmark-gfm_DIR=${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/cmake `
-D LibXml2_DIR=${{ github.workspace }}/BinaryCache/Library/libxml2-${{ inputs.libxml2_version }}/usr/lib/cmake/libxml2-${{ inputs.libxml2_version }} `
-D LLDB_LIBXML2_VERSION="${{ inputs.libxml2_version }}" `
-D PACKAGE_VENDOR=compnerd.org `
-D SWIFT_VENDOR=compnerd.org `
-D LLVM_PARALLEL_LINK_JOBS=8 `
Expand Down Expand Up @@ -1162,7 +1163,11 @@ jobs:
Copy-Item -Path "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/*.dylib" -Destination "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/lib/swift/host/compiler"
}

- uses: actions/setup-python@v5
- name: Setup python
uses: ./SourceCache/ci-build/.github/actions/setup-python
with:
repo-root: ${{ github.workspace }}/SourceCache/ci-build

- uses: jannekem/run-python-script-action@v1
with:
script: |
Expand Down Expand Up @@ -1676,6 +1681,11 @@ jobs:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true

- name: Setup python
uses: ./SourceCache/ci-build/.github/actions/setup-python
with:
repo-root: ${{ github.workspace }}/SourceCache/ci-build

- name: Configure LLVM
if: matrix.os != 'Android' || inputs.build_android
run: |
Expand Down Expand Up @@ -2553,7 +2563,11 @@ jobs:
run: |
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch --target install

- uses: actions/setup-python@v5
- name: Setup python
uses: ./SourceCache/ci-build/.github/actions/setup-python
with:
repo-root: ${{ github.workspace }}/SourceCache/ci-build

- uses: jannekem/run-python-script-action@v1
if: matrix.os != 'Android' || inputs.build_android
with:
Expand Down
Loading