Skip to content

Update TSFC workflow #775

Update TSFC workflow

Update TSFC workflow #775

Workflow file for this run

# This workflow will test the UFL branch against the latest Firedrake container
name: TSFC integration
on:
pull_request:
branches:
- main
jobs:
tsfc-tests:
name: Run TSFC tests
runs-on: ubuntu-latest
container:
# UNDO ME
# image: firedrakeproject/firedrake-vanilla-default:latest
image: firedrakeproject/firedrake-vanilla-default:pip
# Github hosted runners require running as root user:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem
options: --user root
env:
# Since we are running as root we need to set PYTHONPATH to be able to find the installed
# packages
PYTHONPATH: /home/firedrake/firedrake:/home/firedrake/.local/lib/python3.12/site-packages
steps:
- uses: actions/checkout@v4
with:
# Download UFL into a subdirectory not called 'ufl' to make sure
# that the package installs correctly. Otherwise 'import ufl' may
# work even if the installation failed because it is a subdirectory.
path: ufl-repo
- name: Uninstall existing UFL
run: |
python3 -m pip uninstall -y ufl
- name: Create virtual environment
run: |
python3 -m venv venv-ufl
- name: Install UFL
run: |
. venv-ufl/bin/activate
pip install ./ufl-repo
pip list
- name: Run TSFC tests
run: |
. venv-ufl/bin/activate
python -m pytest /home/firedrake/firedrake/tests/tsfc