mirror of
https://github.com/python/cpython.git
synced 2024-11-27 20:04:41 +08:00
Generalize reusable Windows CI jobs (#121766)
This commit is contained in:
parent
d005f2c186
commit
7982363b47
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@ -179,18 +179,24 @@ jobs:
|
||||
run: make check-c-globals
|
||||
|
||||
build_windows:
|
||||
name: 'Windows'
|
||||
name: >-
|
||||
Windows
|
||||
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
|
||||
needs: check_source
|
||||
if: needs.check_source.outputs.run_tests == 'true'
|
||||
uses: ./.github/workflows/reusable-windows.yml
|
||||
|
||||
build_windows_free_threading:
|
||||
name: 'Windows (free-threading)'
|
||||
needs: check_source
|
||||
if: needs.check_source.outputs.run_tests == 'true'
|
||||
if: fromJSON(needs.check_source.outputs.run_tests)
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- Win32
|
||||
- x64
|
||||
- arm64
|
||||
free-threading:
|
||||
- false
|
||||
- true
|
||||
uses: ./.github/workflows/reusable-windows.yml
|
||||
with:
|
||||
free-threading: true
|
||||
arch: ${{ matrix.arch }}
|
||||
free-threading: ${{ matrix.free-threading }}
|
||||
|
||||
build_macos:
|
||||
name: 'macOS'
|
||||
@ -556,7 +562,6 @@ jobs:
|
||||
- build_ubuntu_ssltests
|
||||
- build_wasi
|
||||
- build_windows
|
||||
- build_windows_free_threading
|
||||
- test_hypothesis
|
||||
- build_asan
|
||||
- build_tsan
|
||||
@ -592,7 +597,6 @@ jobs:
|
||||
build_ubuntu_ssltests,
|
||||
build_wasi,
|
||||
build_windows,
|
||||
build_windows_free_threading,
|
||||
build_asan,
|
||||
build_tsan,
|
||||
build_tsan_free_threading,
|
||||
|
60
.github/workflows/reusable-windows.yml
vendored
60
.github/workflows/reusable-windows.yml
vendored
@ -1,53 +1,45 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
arch:
|
||||
description: CPU architecture
|
||||
required: true
|
||||
type: string
|
||||
free-threading:
|
||||
description: Whether to use no-GIL mode
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
IncludeUwp: >-
|
||||
true
|
||||
|
||||
jobs:
|
||||
build_win32:
|
||||
name: 'build and test (x86)'
|
||||
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: Build CPython
|
||||
run: .\PCbuild\build.bat -e -d -v -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 --fast-ci ${{ inputs.free-threading && '--disable-gil' || '' }}
|
||||
|
||||
build_win_amd64:
|
||||
name: 'build and test (x64)'
|
||||
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 -v -p x64 ${{ inputs.free-threading && '--disable-gil' || '' }}
|
||||
run: >-
|
||||
.\PCbuild\build.bat
|
||||
-e -d -v
|
||||
-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 --fast-ci ${{ inputs.free-threading && '--disable-gil' || '' }}
|
||||
|
||||
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 -v -p arm64 ${{ inputs.free-threading && '--disable-gil' || '' }}
|
||||
if: inputs.arch != 'arm64'
|
||||
run: >-
|
||||
.\PCbuild\rt.bat
|
||||
-p ${{ inputs.arch }}
|
||||
-d -q --fast-ci
|
||||
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
|
||||
|
Loading…
Reference in New Issue
Block a user