Skip to content

Commit 6c75452

Browse files
committed
Skip HiGHS tests for Python 3.12 and Windows (temporarily)
1 parent 8799ede commit 6c75452

File tree

2 files changed

+32
-41
lines changed

2 files changed

+32
-41
lines changed

.github/workflows/github-ci.yml

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Python
1616
uses: actions/setup-python@v4
1717
with:
18-
python-version: 3.7.14
18+
python-version: 3.11
1919

2020
- name: Upgrade pip
2121
run: python -m pip install --upgrade pip
@@ -39,20 +39,14 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
# temporarily downgraded to 3.7.9 and 3.8.10 due to a bug https://github.com/actions/setup-python/issues/402
43-
python-version: ["3.7.9", "3.8.10", "3.9.13", "3.10.9", "3.11.1", "pypy3.9-v7.3.9"]
42+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9-v7.3.15"]
4443
os: [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
4544
exclude:
4645
# temporarily exclude pypy3 on mac-os as there failing tests caused by bug on cbc side
4746
- os: macos-11
48-
python-version: "pypy3.9-v7.3.9"
47+
python-version: "pypy3.9-v7.3.15"
4948
- os: macos-12
50-
python-version: "pypy3.9-v7.3.9"
51-
# several version (3.7.9 and 3.8.10) at not available at ubuntu-22.04
52-
- os: ubuntu-22.04
53-
python-version: "3.7.9"
54-
- os: ubuntu-22.04
55-
python-version: "3.8.10"
49+
python-version: "pypy3.9-v7.3.15"
5650

5751
steps:
5852

@@ -63,41 +57,27 @@ jobs:
6357
with:
6458
python-version: ${{ matrix.python-version }}
6559
architecture: x64
60+
cache: 'pip'
6661

6762
- name: Check python version
6863
run: python -c "import sys; import platform; print('Python %s implementation %s on %s' % (sys.version, platform.python_implementation(), sys.platform))"
6964

7065
- name: Upgrade pip
7166
run: python -m pip install --upgrade pip
7267

73-
- name: Get pip cache dir
74-
id: pip-cache
75-
run: |
76-
echo "::set-output name=dir::$(pip cache dir)"
68+
- name: Install test and numpy
69+
run: python -m pip install .[test,numpy]
7770

78-
- name: pip cache
79-
uses: actions/cache@v3
80-
with:
81-
path: ${{ steps.pip-cache.outputs.dir }}
82-
key: ${{ runner.os }}-${{ matrix.python-version }}-pythonpip
83-
84-
- name: Install mip for testing (PyPy)
85-
if: ${{ matrix.python-version == 'pypy3.9-v7.3.9' }}
86-
run: python -m pip install .[test,numpy,highs]
71+
- name: Install gurobi
72+
if: ${{ matrix.python-version != 'pypy3.9-v7.3.15' }}
73+
run: python -m pip install .[gurobi]
8774

88-
- name: Install mip for testing (CPython)
89-
if: ${{ matrix.python-version != 'pypy3.9-v7.3.9' }}
90-
run: python -m pip install .[test,numpy,gurobi,highs]
75+
- name: Install highs
76+
if: ${{ !contains(matrix.os, 'windows') && !(matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9') }}
77+
run: python -m pip install .[highs]
9178

9279
- name: list installed packages
9380
run: python -m pip list
9481

95-
- name: Run tests PyPy
96-
if: ${{ matrix.python-version == 'pypy3.9-v7.3.9'}}
97-
run: |
98-
python -m pytest test --verbose --color=yes --doctest-modules --ignore="test/test_gurobi.py"
99-
10082
- name: Run tests
101-
if: ${{ matrix.python-version != 'pypy3.9-v7.3.9'}}
102-
run: |
103-
python -m pytest test --verbose --color=yes --doctest-modules -Werror
83+
run: python -m pytest test --verbose --color=yes --doctest-modules -Werror

pyproject.toml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ build-backend = "setuptools.build_meta"
66
name = "mip"
77
description = "Python tools for Modeling and Solving Mixed-Integer Linear Programs (MIPs)"
88
readme = "README.md"
9-
requires-python = ">=3.7,<3.12"
9+
requires-python = ">=3.7,<3.13"
1010
license = {file = "LICENSE"}
1111
authors = [
12-
{name="T.A.M. Toffolo", email="haroldo.santos@gmail.com"},
13-
{name="H.G. Santos", email="tulio@toffolo.com.br"}
12+
{name="Tulio A.M. Toffolo", email="tulio@toffolo.com.br"},
13+
{name="Haroldo G. Santos", email="haroldo.santos@gmail.com"}
1414
]
1515
maintainers = [
1616
{name="S. Heger", email="[email protected]"}
@@ -32,13 +32,24 @@ classifiers = [
3232
]
3333
dynamic = ["version"]
3434

35-
dependencies = ["cffi==1.15.*"]
35+
dependencies = ["cffi>=1.15"]
3636

3737
[project.optional-dependencies]
38-
numpy = ["numpy==1.24.*; python_version >= '3.8'", "numpy==1.21.6; python_version == '3.7'"]
38+
numpy = [
39+
"numpy>=1.25; python_version>='3.9'",
40+
"numpy==1.24.*; python_version=='3.8'",
41+
"numpy==1.21.*; python_version=='3.7'"
42+
]
3943
gurobi = ["gurobipy>=8"]
40-
highs = ["highspy>=1.5.3"]
41-
test = ["pytest==7.2.0", "networkx==2.8.8; python_version >= '3.8'", "networkx==2.6.3; python_version == '3.7'", "matplotlib==3.6.2; python_version >= '3.8'", "matplotlib==3.5.3; python_version == '3.7'"]
44+
highs = ["highspy>=1.5.3; python_version<='3.11'"]
45+
test = [
46+
"pytest>=7.4",
47+
"networkx==2.8.8; python_version>='3.8'",
48+
"networkx==2.6.3; python_version=='3.7'",
49+
"matplotlib>=3.7; python_version>='3.9'",
50+
"matplotlib==3.6.2; python_version=='3.8'",
51+
"matplotlib==3.5.3; python_version=='3.7'"
52+
]
4253

4354
[project.urls]
4455
"Homepage" = "https://www.python-mip.com"

0 commit comments

Comments
 (0)