diff --git a/.github/workflows/deploy-book.yml b/.github/workflows/deploy-book.yml index a1c487e..3132e75 100644 --- a/.github/workflows/deploy-book.yml +++ b/.github/workflows/deploy-book.yml @@ -1,4 +1,4 @@ -name: Build and Deploy Jupyter Book +name: Build IGA-Python Jupyter Book on: push: @@ -20,8 +20,28 @@ jobs: cache-dependency-path: | requirements.txt + - name: Install non-Python dependencies on Ubuntu + if: matrix.os == 'ubuntu-latest' + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: gfortran openmpi-bin libopenmpi-dev libhdf5-openmpi-dev + version: 1.0 + execute_install_scripts: true + + # When loading cached apt packages, the default MPI compiler isn't set. + # Workaround is to 'reinstall' openmpi-bin, which doesn't actually perform + # installation (since openmpi-bin already exists), but instead reruns + # `update-alternatives` which fixes the symlinks to mpicc/mpif90. + - name: Set default MPI and HDF5 C compilers on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install --reinstall openmpi-bin libhdf5-openmpi-dev + - name: Install Jupyter Book and Psydac - run: pip3 install -r requirements.txt + run: | + pip3 install --upgrade pip + pip3 install -r requirements.txt - name: Build Jupyter Book run: jupyter-book build .