Skip to content

Add Windows CI

Add Windows CI #371

Workflow file for this run

# This workflow will install Basix, FFCx, DOLFINx and run the DOLFINx unit tests.
name: DOLFINx integration
on:
pull_request:
branches:
- main
workflow_dispatch:
inputs:
dolfinx_ref:
description: "DOLFINx 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:
name: Run DOLFINx tests
runs-on: ubuntu-latest
container: ghcr.io/fenics/test-env:current-openmpi
env:
PETSC_ARCH: linux-gnu-complex64-32
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
steps:
- uses: actions/checkout@v4
- name: Install UFL and Basix (default branches/tags)
if: github.event_name != 'workflow_dispatch'
run: |
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ufl.git
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/basix.git
- name: Install UFL and Basix (specified branches/tags)
if: github.event_name == 'workflow_dispatch'
run: |
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_ref }}
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/basix.git@${{ github.event.inputs.basix_ref }}
- name: Install FFCx
run: |
pip3 install --break-system-packages .
- name: Get DOLFINx source (default branch/tag)
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
with:
path: ./dolfinx
repository: FEniCS/dolfinx
ref: main
- name: Get DOLFINx source (specified branch/tag)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
path: ./dolfinx
repository: FEniCS/dolfinx
ref: ${{ github.event.inputs.dolfinx_ref }}
- name: Install DOLFINx (C++)
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx/cpp/
cmake --build build
cmake --install build
- name: Install DOLFINx (Python)
run: python3 -m pip -v install --break-system-packages --check-build-dependencies --no-build-isolation dolfinx/python/
- name: Build DOLFINx C++ unit tests
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S dolfinx/cpp/test/
cmake --build build/test
- name: Run DOLFINx C++ unit tests
run: |
cd build/test
ctest -V --output-on-failure -R unittests
- name: Run DOLFINx Python unit tests
run: python3 -m pytest -n auto dolfinx/python/test/unit
- name: Run DOLFINx Python demos
run: python3 -m pytest -n=2 -m serial dolfinx/python/demo/test.py