Skip to content

Commit 96ea6bf

Browse files
committed
Updated matrix to request native Python below 3.11
1 parent a99d812 commit 96ea6bf

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ jobs:
2626
python-version: ["3.8", "3.9.10", "3.10", "3.11", "3.12", "3.13"]
2727
# CPython has no ARM distribution until 3.11
2828
python-architecture: [x64, x86]
29-
os: [windows-2019, windows-11-arm]
30-
exclude:
31-
# We provide arm64, not arm
32-
- os: windows-11-arm
33-
python-architecture: x86
34-
# pythonarm64 NuGet has no download for Python 3.8
29+
include:
3530
- os: windows-11-arm
31+
python-architecture: arm64
32+
- os: windows-2019
33+
exclude:
34+
# actions/setup-python does not provide prebuilt arm Python before 3.11
35+
- python-architecture: arm64
3636
python-version: "3.8"
37+
- python-architecture: arm64
38+
python-version: "3.9"
39+
- python-architecture: arm64
40+
python-version: "3.10"
3741

3842
steps:
3943
- uses: actions/checkout@v4
@@ -55,14 +59,7 @@ jobs:
5559
echo $ScriptsPath
5660
Add-Content $env:GITHUB_PATH $ScriptsPath
5761
58-
- name: Build and install (arm)
59-
if: matrix.os == 'windows-11-arm'
60-
run: |
61-
python .github\workflows\download-arm64-libs.py ./arm64libs
62-
pip install . -v --user --config-setting=--build-option="build_ext -L./arm64libs --plat-name=win-arm64 build --plat-name=win-arm64 bdist_wheel --plat-name=win-arm64"
63-
64-
- name: Build and install (x86-x64)
65-
if: matrix.os != 'windows-11-arm'
62+
- name: Build and install
6663
run: pip install . -v --user
6764

6865
# This needs to happen *after* installing pywin32 since
@@ -110,27 +107,27 @@ jobs:
110107
# can be found - they aren't installed into the Python tree.
111108
run: python win32/scripts/pywin32_testall.py -v -skip-adodbapi
112109

113-
- name: Build wheels (arm)
114-
if: matrix.os == 'windows-11-arm'
115-
run: pip wheel . -v --wheel-dir=dist --config-setting=--build-option="bdist_wheel --plat-name=win-arm64"
116-
117-
- name: Build wheels (x86-x64)
118-
if: matrix.os != 'windows-11-arm'
110+
- name: Build wheels
119111
run: pip wheel . -v --wheel-dir=dist
120112

121113
- uses: actions/upload-artifact@v4
122114
# Upload artifacts even if tests fail
123115
if: ${{ always() }}
124116
with:
125-
name: artifacts-${{ matrix.python-version }}-${{ matrix.python-architecture }}-${{ matrix.os }}
117+
name: artifacts-${{ matrix.python-version }}-${{ matrix.python-architecture }}
126118
path: dist/*.whl
127119
if-no-files-found: error
128120

129-
# Do a single ARM64 cross-compilation to ensure we still support it
130-
test_cross_compile:
121+
# actions/setup-python does not provide prebuilt arm64 Python before 3.11, so we cross-compile.
122+
build_arm64:
131123
name: Cross-compile ARM
132124
runs-on: windows-2019
133125
timeout-minutes: 25
126+
strategy:
127+
fail-fast: false
128+
matrix:
129+
# pythonarm64 NuGet has no download for Python 3.8 and Python ~=3.9.11
130+
python-version: ["3.9.10", "3.10"]
134131
steps:
135132
- uses: actions/checkout@v4
136133

@@ -152,9 +149,14 @@ jobs:
152149
- name: Build wheels
153150
run: python -m build --wheel --config-setting=--build-option="build_ext -L./arm64libs --plat-name=win-arm64 build --plat-name=win-arm64 bdist_wheel --plat-name=win-arm64"
154151

152+
- uses: actions/upload-artifact@v4
153+
with:
154+
name: artifacts-${{ matrix.python-version }}-arm64
155+
path: dist/*.whl
156+
if-no-files-found: error
155157
merge:
156158
runs-on: windows-latest
157-
needs: [test]
159+
needs: [test, build_arm64]
158160
steps:
159161
- name: Merge Artifacts
160162
uses: actions/upload-artifact/merge@v4

0 commit comments

Comments
 (0)