DOC: Updated ChangeLog.md and Flake8 for upcoming release #232
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: Test code functionality | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
schedule: | |
- cron: "0 2 * * 5" | |
jobs: | |
tests: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 90 | |
strategy: | |
matrix: | |
mpi: [ 'no' ] # FIXME!! error when installing netCDF, not finding mpi4py see issue #95 | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12'] | |
mpi4py-version: [ 3.1.5 ] | |
netcdf4-python-version: [ 1.6.2 ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set up python3 ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and extension module | |
run: | | |
set -x | |
sudo apt-get update -qy | |
sudo apt-get install -y python3-dev python3-venv libfftw3-dev libopenblas-dev | |
python3 -m venv venv | |
source venv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install flit numpy pip-tools setuptools wheel | |
if [ "${{ matrix.mpi }}" == "yes" ]; then | |
# We now need to recompile some modules to link with native MPI | |
sudo apt-get install openmpi-bin libopenmpi-dev libfftw3-mpi-dev libhdf5-mpi-dev libpnetcdf-dev libnetcdf-pnetcdf-dev | |
# Install mpi4py first (because netCDF4 depends on it) | |
export NETCDF4_DIR=/usr/lib/x86_64-linux-gnu/netcdf/pnetcdf | |
export CC=mpicc | |
python3 -m pip install -v --no-binary mpi4py mpi4py==${{ matrix.mpi4py-version }} | |
python3 -m pip install -v cython | |
python3 -m pip install -v --no-build-isolation --no-binary netCDF4 netCDF4==${{ matrix.netcdf4-python-version }} | |
python3 -m pip install -v --no-binary muSpectre muSpectre==${{ matrix.muspectre-version }} | |
else | |
sudo apt-get install libhdf5-dev libnetcdf-dev | |
fi | |
python3 -m pip install -v .[test] | |
# Check that NetCDF install was not overriden | |
python3 .check_netcdf_capabilities.py ${{ matrix.mpi }} | |
python3 .check_mufft_capabilities.py ${{ matrix.mpi }} | |
- name: Test with pytest | |
run: | | |
source venv/bin/activate | |
if [ "${{ matrix.mpi }}" == "yes" ]; then | |
python3 run-tests.py --no-build --verbose --full-trace | |
else | |
python3 -m pytest --verbose --full-trace -s | |
fi |