Update examples to support latest Psydac and Python 3.12 #36
Workflow file for this run
This file contains hidden or 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: Build IGA-Python Jupyter Book | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| deploy-book: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| python-version: '3.12' | |
| - os: macos-15 | |
| python-version: '3.12' | |
| env: | |
| FC: gfortran-14 | |
| MAKEFLAGS: -j4 | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: requirements.txt | |
| - name: Install non-Python dependencies on Ubuntu | |
| if: startsWith(matrix.os, 'ubuntu') | |
| 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: Reconfigure non-Python dependencies on Ubuntu | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --reinstall openmpi-bin libhdf5-openmpi-dev | |
| - name: Install non-Python dependencies on macOS | |
| if: startsWith(matrix.os, 'macos') | |
| run: | | |
| brew install open-mpi hdf5-mpi libomp | |
| - name: Set default gfortran | |
| run: | | |
| alias gfortran="$FC" | |
| gfortran --version | |
| - name: Install Jupyter Book and Psydac | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Build Jupyter Book | |
| run: jupyter-book build . | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/master' | |
| run: ghp-import -n -p -f _build/html | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |