Skip to content

Commit

Permalink
Add mac os fast ci pipeline
Browse files Browse the repository at this point in the history
based on brew packages
  • Loading branch information
schnellerhase committed Jul 18, 2024
1 parent 830a9e9 commit fe7f279
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/macos-fast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: DOLFINx CI (macOS)

on:
pull_request:
branches:
- main
push:
branches:
- "main"
tags:
- "v*"
merge_group:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: macos-14
strategy:
matrix:
with-petsc: [true, false]
name: Build and test (with-petsc=${{ matrix.with-petsc }})

steps:
- name: Install Homebrew dependencies
run: brew install adios2 boost cmake hdf5-mpi make ninja open-mpi pkg-config pugixml spdlog bison flex gfortran scotch

- name: Install petsc
if: ${{ matrix.with-petsc }}
run: brew install petsc

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install cffi cppimport cython numba numpy pytest pytest-xdist scipy
- name: Install FEniCSx dependencies
run: |
python -m pip install git+https://github.com/FEniCS/basix.git
python -m pip install git+https://github.com/FEniCS/ufl.git
python -m pip install git+https://github.com/FEniCS/ffcx.git
- uses: actions/checkout@v4
with:
path: dolfinx

- name: Build and install DOLFINx C++ library
working-directory: dolfinx
run: |
cmake -G Ninja -B build -S cpp/
cmake --build build
sudo cmake --install build
- name: Build C++ unit tests
working-directory: dolfinx
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S cpp/test/
cmake --build build/test --parallel 3
- name: Run C++ unit tests (serial)
working-directory: dolfinx/build/test
run: ctest -V --output-on-failure -R unittests

- name: Run C++ unit tests (MPI)
working-directory: dolfinx/build/test
run: mpiexec -np 3 ctest -V --output-on-failure -R unittests

- name: Build and install DOLFINx Python interface
if: ${{ ! matrix.with-petsc }}
working-directory: dolfinx/python
run: |
python -m pip install -r ./build-requirements.txt
python -m pip install --check-build-dependencies --no-build-isolation .
- name: Run Python unit tests (serial)
if: ${{ ! matrix.with-petsc }}
working-directory: dolfinx/python/test/unit/
run: python -m pytest -n auto -m "not petsc4py" .

- name: Run Python unit tests (MPI, np=3)
if: ${{ ! matrix.with-petsc }}
working-directory: dolfinx/python/test/unit/
run: mpirun -np 3 python -m pytest -m "not petsc4py" .

0 comments on commit fe7f279

Please sign in to comment.