-
Notifications
You must be signed in to change notification settings - Fork 42
106 lines (106 loc) · 3.53 KB
/
Copy pathwin.yml
File metadata and controls
106 lines (106 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Windows 2025
on:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name != 'release' }}
jobs:
win_build:
name: Windows 2025 Build
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Python check
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.PYTHON_VERSION}}
- name: Set Python CP version
id: set_cp_version
run: |
pip install packaging
$cp = python -c "from packaging import tags; print(next(tags.sys_tags()).interpreter)"
echo "PYTHON_CP_VERSION=$cp"
echo "PYTHON_CP_VERSION=$cp" >> $env:GITHUB_OUTPUT
- name: Check Python CP version
run: |
echo "PYTHON_CP_VERSION=${{ steps.set_cp_version.outputs.PYTHON_CP_VERSION }}"
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Windows 2025 pre-requisites
run: |
& .\.github\workflows\scripts_new\win\1_prerequisites.ps1
- name: Windows 2025 build
run: |
& .\.github\workflows\scripts_new\win\2_build.ps1
- uses: actions/upload-artifact@v4
with:
name: win_wheel_${{ steps.set_cp_version.outputs.python_CP_VERSION }}
path: dist/*.whl
win_test:
name: Windows 2025 Test
runs-on: windows-2025
needs: win_build
strategy:
matrix:
PYTHON_VERSION: ['3.10', '3.11', '3.12', '3.13']
fail-fast: false
steps:
- name: Python check
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.PYTHON_VERSION}}
- name: Set Python CP version
id: set_cp_version
run: |
pip install packaging
$cp = python -c "from packaging import tags; print(next(tags.sys_tags()).interpreter)"
echo "PYTHON_CP_VERSION=$cp"
echo "PYTHON_CP_VERSION=$cp" >> $env:GITHUB_OUTPUT
- name: Check Python CP version
run: |
echo "PYTHON_CP_VERSION=${{ steps.set_cp_version.outputs.PYTHON_CP_VERSION }}"
- uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 1
- uses: actions/download-artifact@v4
with:
name: win_wheel_${{ steps.set_cp_version.outputs.python_CP_VERSION }}
- name: Windows 2025 install
run: |
$whl = Get-ChildItem .\*.whl | Select-Object -First 1
pip install $whl
- name: Windows 2025 test
run: |
& .\.github\workflows\scripts_new\win\3_test.ps1
publish_pypi:
uses: ./.github/workflows/publish_pypi.yml
if: github.event_name == 'release'
needs: win_test
permissions:
id-token: write
contents: read
concurrency:
# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ matrix.PYTHON_CP_VERSION }}-${{ matrix.PYTHON_CP_VERSION != 'cp310' && 'all' || github.sha }}-test
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ matrix.PYTHON_CP_VERSION }}-test
cancel-in-progress: true
strategy:
matrix:
PYTHON_CP_VERSION: ["cp310", "cp311", "cp312", "cp313"]
fail-fast: false
with:
artifact_name: win_wheel_${{ matrix.PYTHON_CP_VERSION }}
secrets: inherit