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