-
Notifications
You must be signed in to change notification settings - Fork 31
58 lines (51 loc) · 1.73 KB
/
wheel-tests.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
# Run the unit tests against several pythons and platforms
# using a built wheel to install the package.
name: Test wheels
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
wheel-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.9", "3.10", "3.11", "3.12"]
gurobipy: ["~=11.0", "~=12.0"]
#gurobipy: ["~=10.0", "~=11.0", "~=12.0"]
exclude:
- python: "3.12"
gurobipy: "~=10.0"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install build tools
run: |
python -m pip install --upgrade pip build
- name: Build wheel
run: |
python -m build
- name: Fetch dependencies for offline install
run: |
pip wheel --wheel-dir=dist gurobipy${{ matrix.gurobipy }} pandas numpy scipy gurobipy-pandas
pip wheel --wheel-dir=dist "numpy<2"
- name: Install from built wheel
run: |
python -m pip install --find-links dist --no-index --only-binary=:all: gurobi-optimods gurobipy${{ matrix.gurobipy }}
- name: Run unit tests
run: |
python -m unittest discover -b
- name: Fetch dependencies for offline install
run: |
pip wheel --wheel-dir=dist matplotlib networkx plotly scikit-learn
- name: Install example dependencies
run: |
python -m pip install --find-links dist --no-index --only-binary=:all: gurobi-optimods[examples]
- name: Run additional tests
run: |
python -m unittest discover -b