Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow using pyproject.toml for installation of dependencies #3618

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: DOLFINx CI

on:
push:
branches:
- "**"
tags:
- "v*"
pull_request:
branches:
- main
merge_group:
branches:
- main
workflow_dispatch:
inputs:
ffcx_ref:
description: "FFCx branch or tag"
default: "main"
type: string
basix_ref:
description: "Basix branch or tag"
default: "main"
type: string
ufl_ref:
description: "UFL branch or tag"
default: "main"
type: string

jobs:
build:
runs-on: ubuntu-latest
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe # Newer OpenMPI
OMPI_MCA_rmaps_base_oversubscribe: true # Older OpenMPI

name: Build and test
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt update
sudo apt install -y catch2 cmake g++ libblas-dev libboost-dev libhdf5-mpi-dev \
liblapack-dev libparmetis-dev libpugixml-dev libspdlog-dev mpi-default-dev \
ninja-build pkg-config
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install FEniCS Python components
run: |
pip install git+https://github.com/fenics/ufl.git
pip install git+https://github.com/fenics/basix.git
pip install git+https://github.com/fenics/ffcx.git

- name: Configure and install C++
run: |
cmake -G Ninja -DDOLFINX_ENABLE_PETSC=false -DCMAKE_BUILD_TYPE=Developer -B build -S cpp/
cmake --build build
sudo cmake --install build

- name: Install DOLFINx
run: pip -v install python/.[ci]

- name: Run demo
run: |
pip install pytest-xdist
python -m pytest -n auto -m serial --durations=10 python/demo/test.py