8000 🧪💅 Mv reusable-windows arch matrix outside · python/cpython@597392d · GitHub
[go: up one dir, main page]

Skip to content

Commit 597392d

Browse files
committed
🧪💅 Mv reusable-windows arch matrix outside
Previously, the reusable windows workflow defined a number of per-arch jobs with a lot of copy-paste. Now, there is a single job and a matrix definition on the calling side.
1 parent 4579407 commit 597392d

File tree

2 files changed

+40
-28
lines changed

2 files changed

+40
-28
lines changed

‎.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,29 @@ jobs:
182182
name: 'Windows'
183183
needs: check_source
184184
if: fromJSON(needs.check_source.outputs.run_tests)
185+
strategy:
186+
matrix:
187+
arch:
188+
- Win32
189+
- x64
190+
- arm64
185191
uses: ./.github/workflows/reusable-windows.yml
192+
with:
193+
arch: ${{ matrix.arch }}
186194

187195
build_windows_free_threading:
188196
name: 'Windows (free-threading)'
189197
needs: check_source
190198
if: fromJSON(needs.check_source.outputs.run_tests)
199+
strategy:
200+
matrix:
201+
arch:
202+
- Win32
203+
- x64
204+
- arm64
191205
uses: ./.github/workflows/reusable-windows.yml
192206
with:
207+
arch: ${{ matrix.arch }}
193208
free-threading: true
194209

195210
build_macos:
Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
on:
22
workflow_call:
33
inputs:
4+
arch:
5+
description: CPU architecture
6+
required: true
7+
type: choice
8+
options:
9+
- Win32
10+
- x64
11+
- arm64
412
free-threading:
513
description: Whether to use no-GIL mode
614
required: false
@@ -12,41 +20,30 @@ env:
1220
true
1321
1422
jobs:
15-
build_win32:
16-
name: 'build and test (x86)'
17-
runs-on: windows-latest
18-
timeout-minutes: 60
19-
steps:
20-
- uses: actions/checkout@v4
21-
- name: Build CPython
22-
run: .\PCbuild\build.bat -e -d -v -p Win32 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
23-
- name: Display build info
24-
run: .\python.bat -m test.pythoninfo
25-
- name: Tests
26-
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
27-
28-
build_win_amd64:
29-
name: 'build and test (x64)'
23+
build:
24+
name: >-
25+
build${{ inputs.arch != 'arm64' && ' and test' || '' }}
26+
(${{ inputs.arch }})
3027
runs-on: windows-latest
3128
timeout-minutes: 60
3229
steps:
3330
- uses: actions/checkout@v4
3431
- name: Register MSVC problem matcher
32+
if: inputs.arch != 'Win32'
3533
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
36 D60D 34
- name: Build CPython
37-
run: .\PCbuild\build.bat -e -d -v -p x64 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
35+
run: >-
36+
.\PCbuild\build.bat
37+
-e -d -v
38+
-p ${{ inputs.arch }}
39+
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
3840
- name: Display build info
41+
if: inputs.arch != 'arm64'
3942
run: .\python.bat -m test.pythoninfo
4043
- name: Tests
41-
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
42-
43-
build_win_arm64:
44-
name: 'build (arm64)'
45-
runs-on: windows-latest
46-
timeout-minutes: 60
47-
steps:
48-
- uses: actions/checkout@v4
49-
- name: Register MSVC problem matcher
50-
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
51-
- name: Build CPython
52-
run: .\PCbuild\build.bat -e -d -v -p arm64 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
44+
if: inputs.arch != 'arm64'
45+
run: >-
46+
.\PCbuild\rt.bat
47+
-p ${{ inputs.arch }}
48+
-d -q --fast-ci
49+
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}

0 commit comments

Comments
 (0)
0