Seed dithering #247
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
- pyver: "3.8" | |
npver: "1.26" | |
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/label/numpy_rc,conda-forge,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.4.0.tar.gz | |
tar -xzvf cfitsio-4.4.0.tar.gz | |
cd cfitsio-4.4.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: test install sdist .gz with no unit tests | |
shell: bash -l {0} | |
run: | | |
rm -rf build* | |
rm -rf $HOME/cfitsio-static-install | |
find . -name "*.so" -type f -delete | |
rm -rf dist | |
python setup.py sdist | |
pip install -vv --no-deps --no-build-isolation dist/*.tar.gz | |
cd .. | |
python -c "import fitsio; assert fitsio.__version__ != '0.0.0'" | |
cd - | |
pip uninstall fitsio --yes | |
- name: test sdist | |
shell: bash -l {0} | |
run: | | |
rm -rf build* | |
rm -rf $HOME/cfitsio-static-install | |
find . -name "*.so" -type f -delete | |
rm -rf dist | |
python setup.py sdist | |
pushd dist/ | |
fname=$(ls fitsio*.gz) | |
tar xvfz "$fname" | |
dname=$(echo "$fname" | sed 's/\.tar\.gz//') | |
pushd $dname | |
pip install -vv -e . | |
SKIP_BZIP_TEST=true pytest -vv fitsio | |
popd | |
popd | |
- name: flake8 | |
shell: bash -l {0} | |
run: | | |
flake8 fitsio |