Skip to content

Commit 6eb4e98

Browse files
authored
Install Python 3.9 on 6.1 and lower (#227)
* Install Python 3.9 on 6.1 and lower The underlying Windows image has been updated to remove Python 3.9. Swift toolchains version 6.1 and lower require Python 3.9. Install it for these toolchains, and continue to install 3.10 for toolchains > 6.1. * Fixup whitespace lint issue
1 parent 1ffcd38 commit 6eb4e98

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/swift_package_test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,11 +730,17 @@ jobs:
730730
docker pull $Image
731731
echo "image=$Image" >> "$env:GITHUB_OUTPUT"
732732
- name: "Install Python 3.10"
733-
if: ${{ !inputs.enable_windows_docker }}
733+
if: ${{ !inputs.enable_windows_docker && !(matrix.swift_version == '6.1' || matrix.swift_version == '6.0' || matrix.swift_version == '5.10' || matrix.swift_version == '5.9') }}
734734
uses: actions/setup-python@v6
735735
with:
736736
python-version: "3.10"
737737
architecture: "x64"
738+
- name: "Install Python 3.9"
739+
if: ${{ !inputs.enable_windows_docker && (matrix.swift_version == '6.1' || matrix.swift_version == '6.0' || matrix.swift_version == '5.10' || matrix.swift_version == '5.9') }}
740+
uses: actions/setup-python@v6
741+
with:
742+
python-version: "3.9"
743+
architecture: "x64"
738744
- name: Install Visual Studio Build Tools
739745
if: ${{ !inputs.enable_windows_docker }}
740746
run: . ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/windows/install-vsb.ps1

0 commit comments

Comments
 (0)