Skip to content

Replace IntegralType enum with something that is more expressive #1359

Replace IntegralType enum with something that is more expressive

Replace IntegralType enum with something that is more expressive #1359

Workflow file for this run

name: "CI (RHEL clone: gcc, oneAPI)"
on:
# push:
# # Uncomment the below 'push' to trigger on push
# branches:
# - "**"
pull_request:
branches:
- main
tags:
- "v*"
merge_group:
branches:
- main
workflow_dispatch:
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe
jobs:
ci-spack-build:
name: AlmaLinux build and test
runs-on: ubuntu-latest
container: ghcr.io/almalinux/almalinux:10
strategy:
matrix:
compiler: ["gcc", "oneapi"]
steps:
- name: Install Spack requirements
run: |
dnf -y install file bzip2 ca-certificates git gzip patch python3 tar \
unzip xz zstd gcc gcc-c++ gcc-gfortran
- name: Checkout Spack
uses: actions/checkout@v5
with:
repository: spack/spack
path: spack-src
- name: Checkout DOLFINx
uses: actions/checkout@v5
with:
path: dolfinx-src
- name: Create Spack environment
run: |
. ./spack-src/share/spack/setup-env.sh
spack env create . dolfinx-src/.github/workflows/spack-config/gh-actions-rh.yml
- name: Add dependencies to environment
run: |
. ./spack-src/share/spack/setup-env.sh
spack -e . add mpi petsc+mpi+shared+mumps slepc parmetis pkgconfig python hdf5+mpi boost pugixml spdlog
spack -e . add python py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py py-scikit-build-core+pyproject py-setuptools py-cffi
spack -e . add py-pip cmake catch2 py-pytest py-pytest-xdist ninja
- if: matrix.compiler == 'oneapi'
name: Add oneAPI compilers to environment
run: |
. ./spack-src/share/spack/setup-env.sh
spack -e . add intel-oneapi-compilers
- name: Install Spack packages
run: |
. ./spack-src/share/spack/setup-env.sh
spack -e . install -j4 -p2 --use-buildcache auto
- name: Push packages to Spack cache and update index
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. ./spack-src/share/spack/setup-env.sh
spack -e . buildcache push --base-image ghcr.io/almalinux/almalinux:10 --update-index local-buildcache
if: ${{ !cancelled() }}
- name: Load FEniCS testing environment variables
run: cat dolfinx-src/.github/workflows/fenicsx-refs.env >> $GITHUB_ENV
- name: Install FEniCS Python components
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
pip install git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
- name: Configure and build C++
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
cmake -Werror=dev --warn-uninitialized -G Ninja -DBUILD_TESTING=true -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx-src/cpp/
cmake --build build
- name: Run tests without install (C++, serial and MPI np=2)
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
cd build
mpirun -np 1 ctest -V --output-on-failure -R unittests
mpirun -np 2 ctest -V --output-on-failure -R unittests
- name: Install C++
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
cmake --build build --target install
- name: Build and run C++ regression tests (serial and MPI (np=2))
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
cmake -Werror=dev --warn-uninitialized -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S dolfinx-src/cpp/demo/
cmake --build build/demo
cd build/demo
ctest -V -R demo -R serial
ctest -V -R demo -R mpi_2
- name: Install gmsh and pyvista (and via package manager install dependencies)
run: |
dnf install -y mesa-libGLU libX11 libXrender mesa-libEGL libglvnd-glx libXcursor libXft libXinerama
. ./spack-src/share/spack/setup-env.sh
spack env activate .
pip install gmsh pyvista
- name: Build Python interface (editable install)
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type=Debug --config-settings=build-dir="build" -e 'dolfinx-src/python/[test]'
- name: Set default DOLFINx JIT options
run: |
mkdir -p ~/.config/dolfinx
echo '{ "cffi_extra_compile_args": ["-g0", "-O0" ] }' > ~/.config/dolfinx/dolfinx_jit_options.json
- name: Run demos (Python, serial and MPI)
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
python -m pytest -n auto -m serial --durations=10 dolfinx-src/python/demo/test.py
python -m pytest -m mpi --num-proc=2 dolfinx-src/python/demo/test.py
- name: Run Python unit tests (serial and MPI)
run: |
. ./spack-src/share/spack/setup-env.sh
spack env activate .
python -m pytest -n auto -m "not adios2" --durations=50 dolfinx-src/python/test/unit/
mpirun -np 2 python -m pytest -m "not adios2" dolfinx-src/python/test/unit/