@@ -33,12 +33,18 @@ jobs:
33
33
# https://github.com/actions/setup-python/issues/855
34
34
python-version : " 3.9"
35
35
dependency-set : minimum
36
+ - os : windows-latest
37
+ python-version : " 3.9"
38
+ dependency-set : minimum
36
39
- os : ubuntu-latest
37
40
python-version : " 3.12"
38
41
dependency-set : maximum
39
42
- os : macos-latest
40
43
python-version : " 3.12"
41
44
dependency-set : maximum
45
+ - os : windows-latest
46
+ python-version : " 3.12"
47
+ dependency-set : maximum
42
48
runs-on : ${{ matrix.os }}
43
49
44
50
steps :
@@ -58,64 +64,20 @@ jobs:
58
64
- name : Generate requirements file for minimum dependencies
59
65
if : matrix.dependency-set == 'minimum'
60
66
run : |
61
- python << EOF
62
- import re
63
-
64
- with open('pyproject.toml', 'r') as f:
65
- content = f.read()
66
-
67
- # Find dependencies section using regex
68
- deps_match = re.search(r'dependencies\s*=\s*\[(.*?)\]', content, re.DOTALL)
69
- if deps_match:
70
- deps = [d.strip(' "\'') for d in deps_match.group(1).strip().split('\n') if d.strip()]
71
- min_reqs = []
72
- for dep in deps:
73
- match = re.match(r'([^>=<\s]+)\s*>=\s*([^,\s"\']+)', dep)
74
- if match:
75
- package, min_ver = match.groups()
76
- min_reqs.append(f"{package}=={min_ver}")
77
-
78
- with open('requirements.txt', 'w') as f:
79
- f.write('\n'.join(min_reqs))
80
- EOF
67
+ python scripts/get_min_dependencies.py
81
68
82
69
- name : Generate requirements file for maximum dependencies
83
70
if : matrix.dependency-set == 'maximum'
84
71
run : |
85
- python << EOF
86
- import re
87
-
88
- with open('pyproject.toml', 'r') as f:
89
- content = f.read()
90
-
91
- # Find dependencies section using regex
92
- deps_match = re.search(r'dependencies\s*=\s*\[(.*?)\]', content, re.DOTALL)
93
- if deps_match:
94
- deps = [d.strip(' "\'') for d in deps_match.group(1).strip().split('\n') if d.strip()]
95
- max_reqs = []
96
- for dep in deps:
97
- # Check for maximum version constraint
98
- max_version_match = re.search(r'([^>=<\s]+).*?<\s*([^,\s"\']+)', dep)
99
- if max_version_match:
100
- # If there's a max version, use the version just below it
101
- package, max_ver = max_version_match.groups()
102
- max_reqs.append(f"{package}<{max_ver}")
103
- else:
104
- # If no max version, just use the package name
105
- package = re.match(r'([^>=<\s]+)', dep).group(1)
106
- max_reqs.append(package)
107
-
108
- with open('requirements.txt', 'w') as f:
109
- f.write('\n'.join(max_reqs))
110
- EOF
72
+ python scripts/get_max_dependencies.py
111
73
112
74
- name : Install dependencies
113
75
run : |
114
76
uv pip install --system --no-deps .
115
77
# onnx is required for onnx export tests
116
78
# we don't install all dev dependencies here for speed
117
79
uv pip install --system -r requirements.txt
118
- uv pip install --system pytest onnx
80
+ uv pip install --system pytest onnx psutil
119
81
120
82
- name : Initialize submodules
121
83
run : git submodule update --init --recursive
0 commit comments