2023-10-30 12:30:40 -03:00
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
2024-07-14 18:22:35 -03:00
|
|
|
arch:
|
|
|
|
description: CPU architecture
|
|
|
|
required: true
|
|
|
|
type: string
|
2024-01-01 20:16:53 -04:00
|
|
|
free-threading:
|
2024-07-16 09:50:30 -03:00
|
|
|
description: Whether to compile CPython in free-threading mode
|
2023-10-30 12:30:40 -03:00
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
|
2024-07-14 18:22:35 -03:00
|
|
|
env:
|
|
|
|
IncludeUwp: >-
|
|
|
|
true
|
2023-10-30 12:30:40 -03:00
|
|
|
|
2024-07-14 18:22:35 -03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: >-
|
|
|
|
build${{ inputs.arch != 'arm64' && ' and test' || '' }}
|
|
|
|
(${{ inputs.arch }})
|
2023-10-30 12:30:40 -03:00
|
|
|
runs-on: windows-latest
|
|
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Register MSVC problem matcher
|
2024-07-14 18:22:35 -03:00
|
|
|
if: inputs.arch != 'Win32'
|
2023-10-30 12:30:40 -03:00
|
|
|
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
|
|
|
|
- name: Build CPython
|
2024-07-14 18:22:35 -03:00
|
|
|
run: >-
|
|
|
|
.\PCbuild\build.bat
|
|
|
|
-e -d -v
|
|
|
|
-p ${{ inputs.arch }}
|
|
|
|
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
|
2023-10-30 12:30:40 -03:00
|
|
|
- name: Display build info
|
2024-07-14 18:22:35 -03:00
|
|
|
if: inputs.arch != 'arm64'
|
2023-10-30 12:30:40 -03:00
|
|
|
run: .\python.bat -m test.pythoninfo
|
|
|
|
- name: Tests
|
2024-07-14 18:22:35 -03:00
|
|
|
if: inputs.arch != 'arm64'
|
|
|
|
run: >-
|
|
|
|
.\PCbuild\rt.bat
|
|
|
|
-p ${{ inputs.arch }}
|
|
|
|
-d -q --fast-ci
|
|
|
|
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
|