summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorDonghee Na <donghee.na@python.org>2023-10-30 15:30:40 (GMT)
committerGitHub <noreply@github.com>2023-10-30 15:30:40 (GMT)
commit4ebf2fae9664a4042511059627f44d46dceb2e09 (patch)
tree488611307a4493054e8e71a9a84ff3bd58602229 /.github/workflows
parentc6def360d123b93efa428e7806f88bec56505a8d (diff)
downloadcpython-4ebf2fae9664a4042511059627f44d46dceb2e09.zip
cpython-4ebf2fae9664a4042511059627f44d46dceb2e09.tar.gz
cpython-4ebf2fae9664a4042511059627f44d46dceb2e09.tar.bz2
gh-111062: Reusable Windows build that supports free-threaded mode as the conditional CI (#111493)
* gh-111062 Set up free-threaded CI for windows Co-authored-by: Donghee Na <donghee.na@python.org> * Apply suggestions from code review Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * Update * Update names * Add files * Update * Revert "Update" This reverts commit 4f17e1af0dbce3b7959b93b41baaf040dee790cc. * fix --------- Co-authored-by: juanjose.tenorio <juanjose2611@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml59
-rw-r--r--.github/workflows/reusable-build-windows.yml53
2 files changed, 63 insertions, 49 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ca542d2..0febced 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -178,56 +178,19 @@ jobs:
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
run: make check-c-globals
- build_win32:
- name: 'Windows (x86)'
- runs-on: windows-latest
- timeout-minutes: 60
+ build_windows:
+ name: 'Windows'
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
- env:
- IncludeUwp: 'true'
- steps:
- - uses: actions/checkout@v4
- - name: Build CPython
- run: .\PCbuild\build.bat -e -d -p Win32
- - name: Display build info
- run: .\python.bat -m test.pythoninfo
- - name: Tests
- run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
-
- build_win_amd64:
- name: 'Windows (x64)'
- runs-on: windows-latest
- timeout-minutes: 60
- needs: check_source
- if: needs.check_source.outputs.run_tests == 'true'
- 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 x64
- - name: Display build info
- run: .\python.bat -m test.pythoninfo
- - name: Tests
- run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
+ uses: ./.github/workflows/reusable-build-windows.yml
- build_win_arm64:
- name: 'Windows (arm64)'
- runs-on: windows-latest
- timeout-minutes: 60
+ build_windows_free_threaded:
+ name: 'Windows (free-threaded)'
needs: check_source
- if: needs.check_source.outputs.run_tests == 'true'
- 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
+ if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
+ uses: ./.github/workflows/reusable-build-windows.yml
+ with:
+ free-threaded: true
build_macos:
name: 'macOS'
@@ -537,9 +500,7 @@ jobs:
- check_source # Transitive dependency, needed to access `run_tests` value
- check-docs
- check_generated_files
- - build_win32
- - build_win_amd64
- - build_win_arm64
+ - build_windows
- build_macos
- build_ubuntu
- build_ubuntu_free_threaded
diff --git a/.github/workflows/reusable-build-windows.yml b/.github/workflows/reusable-build-windows.yml
new file mode 100644
index 0000000..29e0a7e
--- /dev/null
+++ b/.github/workflows/reusable-build-windows.yml
@@ -0,0 +1,53 @@
+on:
+ workflow_call:
+ inputs:
+ free-threaded:
+ 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-threaded && '--disable-gil' || '' }}
+ - name: Display build info
+ run: .\python.bat -m test.pythoninfo
+ - name: Tests
+ run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
+
+ 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
+ run: echo "::add-matcher::.github/problem-matchers/msvc.json"
+ - name: Build CPython
+ run: .\PCbuild\build.bat -e -d -p x64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
+ - name: Display build info
+ run: .\python.bat -m test.pythoninfo
+ - name: Tests
+ run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
+
+ 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-threaded && '--disable-gil' || '' }}