Skip to content

Commit c6ec455

Browse files
committed
Reactivate nearly all os / python version combinations in CI
1 parent cdbf376 commit c6ec455

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

.github/workflows/test.yml renamed to .github/workflows/github-ci.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010

1111
steps:
1212

13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v1
16+
uses: actions/setup-python@v3
1717
with:
1818
python-version: 3.7
1919

@@ -36,28 +36,25 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
python-version: ["3.7", "3.8", "3.9", "3.10", pypy3]
40-
os: [macos-latest, ubuntu-18.04, ubuntu-20.04, windows-2019, windows-2022]
39+
# temporarily downgraded to 3.7.9 and 3.8.10 due to a bug https://github.com/actions/setup-python/issues/402
40+
python-version: ["3.7.9", "3.8.10", "3.9.13", "3.10.4", "pypy-3.9"]
41+
os: [macos-10.15, macos-11, ubuntu-18.04, ubuntu-20.04, windows-2019, windows-2022]
4142
exclude:
42-
# excludes pypy Windows because only 32 bit pypy is supported.
43-
- os: windows-2019
44-
python-version: pypy3
45-
- os: windows-2022
46-
python-version: pypy3
47-
# temporarily exclude pypy3 on macos
48-
- os: macos-latest
49-
python-version: pypy3
50-
- os: macos-latest
51-
python-version: "3.10"
43+
# temporarily exclude pypy3 on mac-os as there failing tests caused by bug on cbc side
44+
- os: macos-10.15
45+
python-version: "pypy-3.9"
46+
- os: macos-11
47+
python-version: "pypy-3.9"
5248

5349
steps:
5450

55-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
5652

5753
- name: Set up Python ${{ matrix.python-version }}
58-
uses: actions/setup-python@v1
54+
uses: actions/setup-python@v3
5955
with:
6056
python-version: ${{ matrix.python-version }}
57+
architecture: x64
6158

6259
- name: Check python version
6360
run: python -c "import sys; import platform; print('Python %s implementation %s on %s' % (sys.version, platform.python_implementation(), sys.platform))"
@@ -71,37 +68,33 @@ jobs:
7168
echo "::set-output name=dir::$(pip cache dir)"
7269
7370
- name: pip cache
74-
uses: actions/cache@v2
71+
uses: actions/cache@v3
7572
with:
7673
path: ${{ steps.pip-cache.outputs.dir }}
7774
key: ${{ runner.os }}-${{ matrix.python-version }}-pythonpip
7875

7976
- name: Install dependencies CPython
80-
if: ${{ matrix.python-version != 'pypy3' }}
77+
if: ${{ matrix.python-version != 'pypy-3.9' }}
8178
run: python -m pip install cffi pytest networkx numpy matplotlib gurobipy
8279

8380
- name: Install dependencies PyPy
84-
if: ${{ matrix.python-version == 'pypy3' && matrix.os != 'macos-latest' }}
81+
if: ${{ matrix.python-version == 'pypy-3.9' }}
8582
run: python -m pip install cffi pytest networkx numpy
8683

87-
- name: Install dependencies PyPy (macOS)
88-
if: ${{ matrix.python-version == 'pypy3' && matrix.os == 'macos-latest' }}
89-
run: python -m pip install cffi pytest networkx "numpy<=1.18.5"
90-
9184
- name: Install mip
9285
run: python -m pip install .
9386

9487
- name: list installed packages
9588
run: python -m pip list
9689

9790
- name: Run tests PyPy
98-
if: ${{ matrix.python-version == 'pypy3'}}
91+
if: ${{ matrix.python-version == 'pypy-3.9'}}
9992
run: |
10093
python -m pytest test --verbose --color=yes --doctest-modules --ignore="test/test_gurobi.py"
10194
python -m pytest mip --verbose --color=yes --doctest-modules --ignore="mip/gurobi.py"
10295
10396
- name: Run tests
104-
if: ${{ matrix.python-version != 'pypy3'}}
97+
if: ${{ matrix.python-version != 'pypy-3.9'}}
10598
run: |
10699
python -m pytest test --verbose --color=yes --doctest-modules
107100
python -m pytest mip --verbose --color=yes --doctest-modules --ignore="mip/gurobi.py"

examples/plant_location.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# by using a different backend.
2323
if sys.platform == "darwin": # OS X
2424
import matplotlib as mpl
25-
mpl.use('TkAgg')
25+
mpl.use('Agg')
2626
del mpl
2727

2828
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)