Non Matching Multipatch #1886
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
# This workflow will install Python dependencies and run tests with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Run tests | |
on: | |
push: | |
branches: [ devel ] | |
pull_request: | |
branches: [ devel ] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
python-version: [ 3.8, 3.9, '3.10', '3.11' ] | |
isMerge: | |
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} | |
exclude: | |
- { isMerge: false, python-version: 3.9 } | |
- { isMerge: false, python-version: '3.10' } | |
include: | |
- os: macos-latest | |
python-version: 3.9 | |
name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install non-Python dependencies on Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install gfortran | |
sudo apt-get install openmpi-bin libopenmpi-dev | |
sudo apt-get install libhdf5-openmpi-dev | |
- name: Install non-Python dependencies on macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install open-mpi | |
brew install hdf5-mpi | |
brew install libomp | |
if [[ ! -f "/usr/local/bin/gfortran" ]]; then | |
gfort=$(ls /usr/local/bin/gfortran-* | tail -n 1) | |
ln -s ${gfort} /usr/local/bin/gfortran | |
fi | |
echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV | |
- name: Print information on MPI and HDF5 libraries | |
run: | | |
ompi_info | |
h5pcc -showconfig -echo || true | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
# - name: Get pip cache dir | |
# id: pip-cache-dir | |
# run: | | |
# echo "::set-output name=dir::$(python -m pip cache dir)" | |
# | |
# - name: pip cache | |
# uses: actions/cache@v2 | |
# id: pip-cache | |
# with: | |
# path: ${{ steps.pip-cache-dir.outputs.dir }} | |
# key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }} | |
# restore-keys: | | |
# ${{ matrix.os }}-${{ matrix.python-version }}-pip- | |
- name: Determine directory of parallel HDF5 library | |
run: | | |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | |
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi | |
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then | |
export HDF5_DIR=$((h5pcc -showconfig -echo || true) | grep "Installation point:" | cut -d ":" -f2 | tr -d " ") | |
fi | |
echo $HDF5_DIR | |
- name: Install Python dependencies | |
run: | | |
export CC="mpicc" HDF5_MPI="ON" | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements_extra.txt --no-build-isolation | |
python -m pip list | |
- name: Check h5py installation | |
run: | | |
python3 -c "from h5py import File; print(File)" | |
- name: Install project | |
run: | | |
python -m pip install . | |
python -m pip freeze | |
- name: Initialize test directory | |
run: | | |
mkdir pytest | |
cp mpi_tester.py pytest | |
- name: Test with pytest | |
working-directory: ./pytest | |
run: | | |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh | |
export OMP_NUM_THREADS=2 | |
python -m pytest --pyargs psydac -m "not parallel" | |
python mpi_tester.py --pyargs psydac -m "parallel and not petsc" | |
- name: Remove test directory | |
if: ${{ always() }} | |
run: | | |
rm -rf pytest |