Skip to content

Commit d11d4ed

Browse files
committed
Simplify build matrix
1 parent 3f01c95 commit d11d4ed

File tree

1 file changed

+27
-30
lines changed

1 file changed

+27
-30
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,17 @@ jobs:
4242
run: tox -e docs
4343
env:
4444
PYTHON_ISAL_LINK_DYNAMIC: True
45-
test:
46-
runs-on: ubuntu-20.04
45+
test-static:
46+
needs: lint
47+
runs-on: ${{ matrix.os }}
4748
strategy:
4849
matrix:
4950
python-version:
5051
- 3.6
5152
- 3.7
5253
- 3.8
5354
- 3.9
54-
linking_method:
55-
- static
56-
- dynamic
57-
needs: lint
55+
os: ["macos-latest", "ubuntu-latest"]
5856
steps:
5957
- uses: actions/[email protected]
6058
with:
@@ -63,41 +61,40 @@ jobs:
6361
uses: actions/[email protected]
6462
with:
6563
python-version: ${{ matrix.python-version }}
66-
- name: Install tox and upgrade setuptools and pip
67-
run: pip install --upgrade tox setuptools pip
68-
- name: Install isal
69-
if: ${{ matrix.linking_method == 'dynamic' }}
70-
run: sudo apt-get install libisal-dev
71-
- name: Install yasm # Yasm in pypa/manylinux images.
64+
- name: Install tox and upgrade setuptools
65+
run: pip install --upgrade tox setuptools
66+
- name: Install build dependencies (Linux) # Yasm in pypa/manylinux images.
7267
run: sudo apt install yasm
73-
if: ${{ matrix.linking_method == 'static' }}
74-
- name: Run tests (dynamic link)
75-
run: tox -e py3
76-
env:
77-
PYTHON_ISAL_LINK_DYNAMIC: True
78-
if: ${{ matrix.linking_method == 'dynamic' }}
79-
- name: Run tests (dynamic link)
68+
if: runner.os == 'Linux'
69+
- name: Install build dependencies (Macos)
70+
run: brew install yasm automake autoconf
71+
if: runner.os == 'macOS'
72+
- name: Run tests
8073
run: tox -e py3
81-
if: ${{ matrix.linking_method == 'static' }}
8274
- name: Upload coverage report
83-
if: ${{ matrix.python-version == 3.6 && matrix.linking_method == 'static'}} # Only upload coverage once
8475
uses: codecov/codecov-action@v1
8576

86-
macos:
87-
runs-on: macos-latest
77+
test-dynamic:
78+
runs-on: ${{ matrix.os }}
8879
needs: lint
80+
strategy:
81+
matrix:
82+
python-version:
83+
- 3.6
84+
os: ["ubuntu-20.04"]
8985
steps:
90-
- name: Install python 3.6
91-
uses: actions/[email protected]
86+
- uses: actions/[email protected]
9287
with:
9388
submodules: recursive
94-
- name: Set up Python 3.6
89+
- name: Set up Python ${{ matrix.python-version }}
9590
uses: actions/[email protected]
9691
with:
97-
python-version: 3.6
92+
python-version: ${{ matrix.python-version }}
93+
- name: Install isal
94+
run: sudo apt-get install libisal-dev
9895
- name: Install tox and upgrade setuptools and pip
9996
run: pip install --upgrade tox setuptools pip
100-
- name: Install build dependencies
101-
run: brew install yasm automake autoconf
102-
- name: Run tests
97+
- name: Run tests (dynamic link)
10398
run: tox -e py3
99+
env:
100+
PYTHON_ISAL_LINK_DYNAMIC: True

0 commit comments

Comments
 (0)