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