-
Notifications
You must be signed in to change notification settings - Fork 97
59 lines (51 loc) · 1.53 KB
/
build.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
59
name: Build and Test Linux
on: [push, pull_request]
jobs:
build-linux:
name: Python (${{ matrix.python-version }})
runs-on: ubuntu-latest
env:
PROJ_DIR: /usr
PROJ_LIB: /usr/share/proj
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install gfortran libeccodes-dev
- name: Update Pip
run: |
python -m pip install --upgrade pip
- name: Install some dependencies via pip
run: |
# Install pyspharm using a few tricks
pip install numpy setuptools wheel
FFLAGS="-fallow-argument-mismatch" pip install --no-use-pep517 pyspharm
# for later building/checking
pip install build twine
pip install check-manifest
# below here only needed for mpl/cartopy based tests
pip install pytest-mpl
pip install cartopy
- name: Install pygrib
run: |
pip install -e .
- name: Test
run: |
cd test
export MPLBACKEND=agg
pytest test*py --mpl --mpl-baseline-path=baseline_images
# if no mpl/cartopy run this
#pytest test.py test_latlons.py
- name: Tarball
run: |
python -m build --sdist
check-manifest --verbose
twine check --strict dist/*