-
Notifications
You must be signed in to change notification settings - Fork 21
125 lines (98 loc) · 3.07 KB
/
Copy pathci.yml
File metadata and controls
125 lines (98 loc) · 3.07 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: CI
on:
push:
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PAMTRA_DATADIR: ""
jobs:
pip-build:
name: pip install (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y gfortran libopenblas-dev libfftw3-dev libnetcdff-dev
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install openblas pkgconf netcdf netcdf-fortran fftw
- name: Install pyPamtra
run: pip install ".[test]"
- name: Smoke test import
run: python -c "import pyPamtra; print(pyPamtra.__file__)"
- name: Smoke test standalone pamtra binary
run: command -v pamtra && pamtra -h
- name: Run pytest with coverage
run: pytest tests/ -v --cov --cov-report=term
- name: Upload coverage to Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
pip install coveralls
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
conda-build:
name: pixi/conda-forge build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.10.1
- name: pixi run install
run: pixi run install
- name: pixi run test
run: pixi run test
- name: pixi run build-cli
run: pixi run build-cli
- name: Smoke test standalone pamtra binary
run: ./build/pamtra -h
make-build:
name: make pamtra (legacy/HPC-deployment build path)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gfortran liblapack-dev libfftw3-dev libnetcdf-dev libnetcdff-dev
- name: make pamtra
run: make pamtra
- name: Check binary exists
run: test -x bin/pamtra
docs:
name: Build Sphinx docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gfortran libopenblas-dev libfftw3-dev libnetcdff-dev
- name: Install pyPamtra and Sphinx
run: |
pip install .
pip install sphinx
- name: Build docs
run: |
cd doc
make html