forked from onnx/sklearn-onnx
-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (101 loc) · 4.22 KB
/
windows-macos-ci.yml
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
107
108
109
110
111
112
113
name: CI Win/Mac
on: [push, pull_request]
jobs:
run:
name: ${{ matrix.os }} py==${{ matrix.python_version }} - sklearn${{ matrix.sklearn_version }} - ${{ matrix.onnxrt_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
sklearn_version: ['==1.6.0', '==1.5.2', '==1.4.2', '==1.3.2', '==1.2.2', '==1.1.3']
include:
- sklearn_version: '==1.6.0'
python_version: '3.12'
numpy_version: '>=2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx==1.17.0'
onnxrt_version: 'onnxruntime==1.20.1'
- sklearn_version: '==1.5.2'
python_version: '3.12'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx==1.17.0'
onnxrt_version: 'onnxruntime<1.20.0'
- sklearn_version: '==1.5.2'
python_version: '3.11'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx==1.16.0'
onnxrt_version: 'onnxruntime<1.19.0'
- python_version: '3.11'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx<1.16.0'
onnxrt_version: 'onnxruntime<1.18.0'
sklearn_version: '==1.3.2'
- python_version: '3.10'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx<1.15'
onnxrt_version: 'onnxruntime<1.17.0'
sklearn_version: '==1.2.2'
- python_version: '3.9'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx<1.14'
onnxrt_version: 'onnxruntime<1.16.0'
sklearn_version: '==1.2.2'
- sklearn_version: '==1.4.2'
python_version: '3.11'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx>=1.16.0'
onnxrt_version: 'onnxruntime>=1.18.0'
- sklearn_version: '==1.1.3'
python_version: '3.11'
numpy_version: '>=1.21.1,<2.0'
scipy_version: '>=1.7.0'
onnx_version: 'onnx>=1.16.0'
onnxrt_version: 'onnxruntime>=1.18.0'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- uses: tlylt/install-graphviz@v1
- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Install requirements dev
run: python -m pip install -r requirements-dev.txt
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install specific versions
run: pip install "${{ matrix.onnx_version }}" "${{ matrix.onnxrt_version }}" "numpy${{ matrix.numpy_version }}" "scikit-learn${{ matrix.sklearn_version}}" "scipy${{ matrix.scipy_version }}"
- name: Install
run: pip install -e .
- name: versions
run: |
python -c "from numpy import __version__;print('numpy', __version__)"
python -c "from pandas import __version__;print('pandas', __version__)"
python -c "from scipy import __version__;print('scipy', __version__)"
python -c "from sklearn import __version__;print('sklearn', __version__)"
python -c "from onnxruntime import __version__;print('onnxruntime', __version__)"
python -c "from onnx import __version__;print('onnx', __version__)"
python -c "from skl2onnx import __max_supported_opset__;print('__max_supported_opset__', __max_supported_opset__)"
python -c "import onnx.defs;print('onnx_opset_version', onnx.defs.onnx_opset_version())"
- name: Run tests
run: |
pytest tests --maxfail=10 --durations=10
- name: build
run: pip wheel .
- uses: actions/upload-artifact@v4
with:
path: ./dist/**