|
1 | 1 | on:
|
2 | 2 | workflow_call:
|
3 | 3 | inputs:
|
| 4 | + arch: |
| 5 | + description: CPU architecture |
| 6 | + required: true |
| 7 | + type: string |
4 | 8 | free-threading:
|
5 | 9 | description: Whether to compile CPython in free-threading mode
|
6 | 10 | required: false
|
7 | 11 | type: boolean
|
8 | 12 | default: false
|
9 | 13 |
|
10 |
| -jobs: |
11 |
| - build_win32: |
12 |
| - name: 'build and test (x86)' |
13 |
| - runs-on: windows-latest |
14 |
| - timeout-minutes: 60 |
15 |
| - env: |
16 |
| - IncludeUwp: 'true' |
17 |
| - steps: |
18 |
| - - uses: actions/checkout@v4 |
19 |
| - - name: Build CPython |
20 |
| - run: .\PCbuild\build.bat -e -d -p Win32 ${{ inputs.free-threading && '--disable-gil' || '' }} |
21 |
| - - name: Display build info |
22 |
| - run: .\python.bat -m test.pythoninfo |
23 |
| - - name: Tests |
24 |
| - run: .\PCbuild\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 |
| 14 | +env: |
| 15 | + IncludeUwp: >- |
| 16 | + true |
25 | 17 |
|
26 |
| - build_win_amd64: |
27 |
| - name: 'build and test (x64)' |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + name: >- |
| 21 | + build${{ inputs.arch != 'arm64' && ' and test' || '' }} |
| 22 | + (${{ inputs.arch }}) |
28 | 23 | runs-on: windows-latest
|
29 | 24 | timeout-minutes: 60
|
30 |
| - env: |
31 |
| - IncludeUwp: 'true' |
32 | 25 | steps:
|
33 | 26 | - uses: actions/checkout@v4
|
34 | 27 | - name: Register MSVC problem matcher
|
| 28 | + if: inputs.arch != 'Win32' |
35 | 29 | run: echo "::add-matcher::.github/problem-matchers/msvc.json"
|
36 | 30 | - name: Build CPython
|
37 |
| - run: .\PCbuild\build.bat -e -d -p x64 ${{ inputs.free-threading && '--disable-gil' || '' }} |
| 31 | + run: >- |
| 32 | + .\PCbuild\build.bat |
| 33 | + -e -d |
| 34 | + -p ${{ inputs.arch }} |
| 35 | + ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} |
38 | 36 | - name: Display build info
|
| 37 | + if: inputs.arch != 'arm64' |
39 | 38 | run: .\python.bat -m test.pythoninfo
|
40 | 39 | - name: Tests
|
41 |
| - run: .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 |
42 |
| - |
43 |
| - build_win_arm64: |
44 |
| - name: 'build (arm64)' |
45 |
| - runs-on: windows-latest |
46 |
| - timeout-minutes: 60 |
47 |
| - env: |
48 |
| - IncludeUwp: 'true' |
49 |
| - steps: |
50 |
| - - uses: actions/checkout@v4 |
51 |
| - - name: Register MSVC problem matcher |
52 |
| - run: echo "::add-matcher::.github/problem-matchers/msvc.json" |
53 |
| - - name: Build CPython |
54 |
| - run: .\PCbuild\build.bat -e -d -p arm64 ${{ inputs.free-threading && '--disable-gil' || '' }} |
| 40 | + if: inputs.arch != 'arm64' |
| 41 | + run: >- |
| 42 | + .\PCbuild\rt.bat |
| 43 | + -p ${{ inputs.arch }} |
| 44 | + -d -q -uall -u-cpu -rwW |
| 45 | + --slowest --timeout=1200 -j0 |
0 commit comments