Skip to content

Commit eda38ff

Browse files
committed
Handle netcdf source builds in GitHub Actions
1 parent 11e35ac commit eda38ff

File tree

5 files changed

+34
-1
lines changed

5 files changed

+34
-1
lines changed

.github/workflows/mypy.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,25 @@ jobs:
4242
with:
4343
python-version: "3.8"
4444

45-
- name: Install dependencies 🔧
45+
- name: Install dependencies (Linux) 🔧
46+
if: ${{ matrix.os == 'ubuntu-20.04' && steps.changes.outputs.code == 'true' }}
4647
run: |
4748
python -VV
4849
python -m site
4950
python -m pip install --upgrade pip setuptools wheel
5051
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
52+
sudo add-apt-repository universe
53+
sudo apt update
54+
sudo apt install libhdf5-dev netcdf-bin libnetcdf-dev
55+
56+
- name: Install dependencies (Windows) 🔧
57+
if: ${{ matrix.os != 'ubuntu-20.04' && steps.changes.outputs.code == 'true' }}
58+
run: |
59+
python -VV
60+
python -m site
61+
python -m pip install --upgrade pip setuptools wheel
62+
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
63+
pip config set global.prefer-binary true
5164
5265
- name: "Run mypy"
5366
if: steps.changes.outputs.code == 'true'

.github/workflows/python_ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
python -m site
6262
python -m pip install --upgrade pip setuptools wheel
6363
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
64+
pip config set global.prefer-binary true
6465
6566
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
6667
if: steps.setup-python.outcome == 'success'

.github/workflows/python_ci_linux.yml

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ jobs:
6262
python -m site
6363
python -m pip install --upgrade pip setuptools wheel
6464
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
65+
sudo add-apt-repository universe
66+
sudo apt update
67+
sudo apt install libhdf5-dev netcdf-bin libnetcdf-dev
6568
6669
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
6770
if: steps.setup-python.outcome == 'success'

.github/workflows/python_ci_macos.yml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
python -m site
6262
python -m pip install --upgrade pip setuptools wheel
6363
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
64+
pip config set global.prefer-binary true
6465
6566
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
6667
if: steps.setup-python.outcome == 'success'

repo_helper.yml

+15
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,18 @@ sphinx_conf_epilogue:
4848
# additional_ignore:
4949
# - old/*
5050
# - .vscode/*
51+
52+
github_ci_requirements:
53+
Linux:
54+
post:
55+
- sudo add-apt-repository universe
56+
- sudo apt update
57+
- sudo apt install libhdf5-dev netcdf-bin libnetcdf-dev
58+
Windows:
59+
post:
60+
# Prefery binary wheels for older versions over sdists for newer ones
61+
- pip config set global.prefer-binary true
62+
macOS:
63+
post:
64+
# Prefery binary wheels for older versions over sdists for newer ones
65+
- pip config set global.prefer-binary true

0 commit comments

Comments
 (0)