-
Notifications
You must be signed in to change notification settings - Fork 58
111 lines (98 loc) · 3.24 KB
/
tests.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
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
name: tests
on:
push:
branches:
- master
pull_request: null
env:
PY_COLORS: "1"
jobs:
tests:
name: tests
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"]
npver: ["1.20", "1.21", "1.23", "1.26", "2.0"]
exclude:
- pyver: "3.11"
npver: "1.20"
- pyver: "3.11"
npver: "1.21"
- pyver: "3.10"
npver: "1.20"
- pyver: "3.12"
npver: "1.20"
- pyver: "3.12"
npver: "1.21"
- pyver: "3.12"
npver: "1.23"
- pyver: "3.8"
npver: "2.0"
runs-on: ${{ matrix.os }}
steps:
- name: cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.pyver }}
channels: conda-forge,conda-forge/label/numpy_rc,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
miniforge-variant: Mambaforge
- name: install conda deps
shell: bash -l {0}
run: |
conda list
mamba install numpy=${{ matrix.npver }} nose cython wget make pytest flake8
if [ "${{ matrix.pyver }}" == "3.8" ] || [ "${{ matrix.pyver }}" == "3.9" ] || [ "${{ matrix.pyver }}" == "3.10" ]; then
mamba install importlib_resources
fi
- name: build external cfitsio
shell: bash -l {0}
run: |
mkdir cfitsio-external-build
cd cfitsio-external-build
wget https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.2.0.tar.gz
tar -xzvf cfitsio-4.2.0.tar.gz
cd cfitsio-4.2.0
./configure --disable-shared --prefix=$HOME/cfitsio-static-install
make install -j 4
cd ..
cd ..
- name: test non-bundled build
shell: bash -l {0}
run: |
pip install -vv -e . \
--global-option="build_ext" \
--global-option="--use-system-fitsio" \
--global-option="--system-fitsio-includedir=$HOME/cfitsio-static-install/include" \
--global-option="--system-fitsio-libdir=$HOME/cfitsio-static-install/lib"
SKIP_BZIP_TEST=true pytest -vv fitsio
- name: test non-bundled build w/ env vars
shell: bash -l {0}
run: |
rm -rf build*
find . -name "*.so" -type f -delete
export FITSIO_USE_SYSTEM_FITSIO=1
export FITSIO_SYSTEM_FITSIO_INCLUDEDIR=$HOME/cfitsio-static-install/include
export FITSIO_SYSTEM_FITSIO_LIBDIR=$HOME/cfitsio-static-install/lib
pip install -vv -e .
SKIP_BZIP_TEST=true pytest -vv fitsio
- name: test bundled build
shell: bash -l {0}
run: |
rm -rf build*
rm -rf $HOME/cfitsio-static-install
find . -name "*.so" -type f -delete
pip install -vv -e .
SKIP_BZIP_TEST=true pytest -vv fitsio
- name: flake8
shell: bash -l {0}
run: |
flake8 fitsio