Skip to content
Draft
Show file tree
Hide file tree
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
14 changes: 11 additions & 3 deletions .github/actions/test-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
shell: sh
run: |
apt-get -y update
apt-get install -y bzip2 curl file git gzip make patch tar unzip xz-utils
apt-get install -y bzip2 curl file git gzip make patch tar unzip xz-utils build-essential

- uses: actions/setup-python@v6
with:
Expand All @@ -33,12 +33,20 @@ runs:
- name: Install gcc-13 (default)
shell: sh
if: contains(inputs.spec, 'gcc@13') || (! contains(inputs.spec, 'clang') && ! contains(inputs.spec, 'gcc'))
run: apt-get install -y g++ gcc gfortran build-essential
# run: apt-get install -y g++ gcc gfortran build-essential
run: |
spack install --cache-only gcc@13
spack compiler find $(spack location -i gcc)
spack compilers

- name: Install clang-18
shell: sh
if: contains(inputs.spec, 'clang@18')
run: apt-get install -y clang-18 gfortran
# run: apt-get install -y clang-18 gfortran
run: |
spack install --cache-only clang@13
spack compiler find $(spack location -i clang)
spack compilers

- name: Add repos
shell: spack-bash {0}
Expand Down
328 changes: 164 additions & 164 deletions .github/workflows/spack-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,172 +50,172 @@ jobs:
with:
spec: fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}

fenics-dolfinx:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
variant: ["build_type=Developer", "partitioners=kahip,parmetis,scotch", "+petsc +slepc +adios2"]
compiler: ["gcc@13", "clang@18"]
exclude:
# kahip does not support clang
- variant: "partitioners=kahip,parmetis,scotch"
compiler: "clang@18"
steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# fenics-dolfinx:
# needs: style-check
# runs-on: ubuntu-latest
# container: ubuntu:24.04
# strategy:
# fail-fast: false
# matrix:
# version: ["main", "0.10", "0.9", "0.8"]
# variant: ["build_type=Developer", "partitioners=kahip,parmetis,scotch", "+petsc +slepc +adios2"]
# compiler: ["gcc@13", "clang@18"]
# exclude:
# # kahip does not support clang
# - variant: "partitioners=kahip,parmetis,scotch"
# compiler: "clang@18"
# steps:
# - uses: actions/checkout@v5
# with:
# path: spack-fenics
# - uses: ./spack-fenics/.github/actions/test-package
# with:
# spec: fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}

fenics-ufcx:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
compiler: ["gcc@13", "clang@18"]
steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: fenics-ufcx@${{ matrix.version }} %${{ matrix.compiler }}
# fenics-ufcx:
# needs: style-check
# runs-on: ubuntu-latest
# container: ubuntu:24.04
# strategy:
# fail-fast: false
# matrix:
# version: ["main", "0.10", "0.9", "0.8"]
# compiler: ["gcc@13", "clang@18"]
# steps:
# - uses: actions/checkout@v5
# with:
# path: spack-fenics
# - uses: ./spack-fenics/.github/actions/test-package
# with:
# spec: fenics-ufcx@${{ matrix.version }} %${{ matrix.compiler }}

py-fenics-basix:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
variant: ["", "+ufl"]
compiler: ["gcc@13", "clang@18"]
steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# workaround for https://github.com/spack/spack/issues/29447
- name: Run tests (> 0.8)
if: ${{ matrix.version != '0.8' && contains(matrix.variant, '+ufl') }}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest py-sympy
spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest test/
# 0.8 holds one broken test case
- name: Run tests (0.8)
if: ${{ matrix.version == '0.8' && contains(matrix.variant, '+ufl') }}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest py-sympy
spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest test/ -k "not test_all_elements_included"
# py-fenics-basix:
# needs: style-check
# runs-on: ubuntu-latest
# container: ubuntu:24.04
# strategy:
# fail-fast: false
# matrix:
# version: ["main", "0.10", "0.9", "0.8"]
# variant: ["", "+ufl"]
# compiler: ["gcc@13", "clang@18"]
# steps:
# - uses: actions/checkout@v5
# with:
# path: spack-fenics
# - uses: ./spack-fenics/.github/actions/test-package
# with:
# spec: py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# # workaround for https://github.com/spack/spack/issues/29447
# - name: Run tests (> 0.8)
# if: ${{ matrix.version != '0.8' && contains(matrix.variant, '+ufl') }}
# shell: spack-bash {0}
# run: |
# spack env activate ./env
# spack install --add py-pytest py-sympy
# spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# pytest test/
# # 0.8 holds one broken test case
# - name: Run tests (0.8)
# if: ${{ matrix.version == '0.8' && contains(matrix.variant, '+ufl') }}
# shell: spack-bash {0}
# run: |
# spack env activate ./env
# spack install --add py-pytest py-sympy
# spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# pytest test/ -k "not test_all_elements_included"

py-fenics-dolfinx:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
variant: ["build_type=Developer", "+petsc4py +slepc4py"]
compiler: ["gcc@13", "clang@18"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
python-version: ${{ matrix.python-version }}
# workaround for https://github.com/spack/spack/issues/29447
# pytest@8.4 required for collision of [tool.pytest] and [tool.pytest.ini_options] since @9.0 (at least for dolfinx @:0.9)
- name: Run tests
if: ${{ matrix.version == '0.8' || matrix.version == '0.9'}}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest@8.4 py-scipy
spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest python/test/unit -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_cube_distance"
- name: Run tests
if: ${{ matrix.version != '0.8' && matrix.version != '0.9'}}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest@8.4 py-scipy
spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest python/test/unit -m "not petsc4py and not adios2" -k "not test_cffi_expression"
# py-fenics-dolfinx:
# needs: style-check
# runs-on: ubuntu-latest
# container: ubuntu:24.04
# strategy:
# fail-fast: false
# matrix:
# version: ["main", "0.10", "0.9", "0.8"]
# variant: ["build_type=Developer", "+petsc4py +slepc4py"]
# compiler: ["gcc@13", "clang@18"]
# python-version: ["3.10", "3.11", "3.12", "3.13"]
# steps:
# - uses: actions/checkout@v5
# with:
# path: spack-fenics
# - uses: ./spack-fenics/.github/actions/test-package
# with:
# spec: py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# python-version: ${{ matrix.python-version }}
# # workaround for https://github.com/spack/spack/issues/29447
# # pytest@8.4 required for collision of [tool.pytest] and [tool.pytest.ini_options] since @9.0 (at least for dolfinx @:0.9)
# - name: Run tests
# if: ${{ matrix.version == '0.8' || matrix.version == '0.9'}}
# shell: spack-bash {0}
# run: |
# spack env activate ./env
# spack install --add py-pytest@8.4 py-scipy
# spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# pytest python/test/unit -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_cube_distance"
# - name: Run tests
# if: ${{ matrix.version != '0.8' && matrix.version != '0.9'}}
# shell: spack-bash {0}
# run: |
# spack env activate ./env
# spack install --add py-pytest@8.4 py-scipy
# spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# pytest python/test/unit -m "not petsc4py and not adios2" -k "not test_cffi_expression"

py-fenics-ffcx:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-ffcx@${{ matrix.version }}
# workaround for https://github.com/spack/spack/issues/29447
# we do not run numba based tests here due to disk-space constraints
# 0.8 broken
- name: Run tests
if: ${{ matrix.version != '0.8' }}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest py-sympy
spack stage py-fenics-ffcx@${{ matrix.version }}
spack cd py-fenics-ffcx@${{ matrix.version }}
pytest test/
# py-fenics-ffcx:
# needs: style-check
# runs-on: ubuntu-latest
# container: ubuntu:24.04
# strategy:
# fail-fast: false
# matrix:
# version: ["main", "0.10", "0.9", "0.8"]
# steps:
# - uses: actions/checkout@v5
# with:
# path: spack-fenics
# - uses: ./spack-fenics/.github/actions/test-package
# with:
# spec: py-fenics-ffcx@${{ matrix.version }}
# # workaround for https://github.com/spack/spack/issues/29447
# # we do not run numba based tests here due to disk-space constraints
# # 0.8 broken
# - name: Run tests
# if: ${{ matrix.version != '0.8' }}
# shell: spack-bash {0}
# run: |
# spack env activate ./env
# spack install --add py-pytest py-sympy
# spack stage py-fenics-ffcx@${{ matrix.version }}
# spack cd py-fenics-ffcx@${{ matrix.version }}
# pytest test/

py-fenics-ufl:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "2025.2", "2025.1", "2024.2", "2024.1"]
steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-ufl@${{ matrix.version }}
# workaround for https://github.com/spack/spack/issues/29447
- name: Run tests
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest
spack stage py-fenics-ufl@${{ matrix.version }}
spack cd py-fenics-ufl@${{ matrix.version }}
pytest test/
# py-fenics-ufl:
# needs: style-check
# runs-on: ubuntu-latest
# container: ubuntu:24.04
# strategy:
# fail-fast: false
# matrix:
# version: ["main", "2025.2", "2025.1", "2024.2", "2024.1"]
# steps:
# - uses: actions/checkout@v5
# with:
# path: spack-fenics
# - uses: ./spack-fenics/.github/actions/test-package
# with:
# spec: py-fenics-ufl@${{ matrix.version }}
# # workaround for https://github.com/spack/spack/issues/29447
# - name: Run tests
# shell: spack-bash {0}
# run: |
# spack env activate ./env
# spack install --add py-pytest
# spack stage py-fenics-ufl@${{ matrix.version }}
# spack cd py-fenics-ufl@${{ matrix.version }}
# pytest test/
Loading