forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.12] Generalize reusable Windows CI jobs (python#121766)
(cherry picked from commit 7982363)
- Loading branch information
Showing
2 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,45 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
arch: | ||
description: CPU architecture | ||
required: true | ||
type: string | ||
free-threading: | ||
description: Whether to compile CPython in free-threading mode | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build_win32: | ||
name: 'build and test (x86)' | ||
runs-on: windows-latest | ||
timeout-minutes: 60 | ||
env: | ||
IncludeUwp: 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build CPython | ||
run: .\PCbuild\build.bat -e -d -p Win32 ${{ inputs.free-threading && '--disable-gil' || '' }} | ||
- name: Display build info | ||
run: .\python.bat -m test.pythoninfo | ||
- name: Tests | ||
run: .\PCbuild\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 | ||
env: | ||
IncludeUwp: >- | ||
true | ||
build_win_amd64: | ||
name: 'build and test (x64)' | ||
jobs: | ||
build: | ||
name: >- | ||
build${{ inputs.arch != 'arm64' && ' and test' || '' }} | ||
(${{ inputs.arch }}) | ||
runs-on: windows-latest | ||
timeout-minutes: 60 | ||
env: | ||
IncludeUwp: 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Register MSVC problem matcher | ||
if: inputs.arch != 'Win32' | ||
run: echo "::add-matcher::.github/problem-matchers/msvc.json" | ||
- name: Build CPython | ||
run: .\PCbuild\build.bat -e -d -p x64 ${{ inputs.free-threading && '--disable-gil' || '' }} | ||
run: >- | ||
.\PCbuild\build.bat | ||
-e -d | ||
-p ${{ inputs.arch }} | ||
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} | ||
- name: Display build info | ||
if: inputs.arch != 'arm64' | ||
run: .\python.bat -m test.pythoninfo | ||
- name: Tests | ||
run: .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 | ||
|
||
build_win_arm64: | ||
name: 'build (arm64)' | ||
runs-on: windows-latest | ||
timeout-minutes: 60 | ||
env: | ||
IncludeUwp: 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Register MSVC problem matcher | ||
run: echo "::add-matcher::.github/problem-matchers/msvc.json" | ||
- name: Build CPython | ||
run: .\PCbuild\build.bat -e -d -p arm64 ${{ inputs.free-threading && '--disable-gil' || '' }} | ||
if: inputs.arch != 'arm64' | ||
run: >- | ||
.\PCbuild\rt.bat | ||
-p ${{ inputs.arch }} | ||
-d -q -uall -u-cpu -rwW | ||
--slowest --timeout=1200 -j0 |