Skip to content

Add macOS CI

Add macOS CI #2

Workflow file for this run

#=============================================================================
# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the names of CEA, nor the names of the contributors may be used to
# endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
name: tests on macOS
on:
workflow_dispatch:
pull_request:
jobs:
test-macos:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14, macos-15]
cxx_std: ['17']
build_type: ['Debug']
runs-on: ${{matrix.os}}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
CC: clang
CXX: clang++
CMAKE_BUILD_TYPE: ${{matrix.build_type}}
steps:
- run: brew install hdf5-mpi
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build PDI
run: |
cmake \
-D BUILD_BENCHMARKING=OFF \
-D BUILD_DECL_HDF5_PLUGIN=ON \
-D BUILD_DECL_NETCDF_PLUGIN=OFF \
-D BUILD_DEISA_PLUGIN=OFF \
-D BUILD_DOCUMENTATION=OFF \
-D BUILD_HDF5_PARALLEL=ON \
-D BUILD_FORTRAN=OFF \
-D BUILD_MPI_PLUGIN=ON \
-D BUILD_NETCDF_PARALLEL=ON \
-D BUILD_PYCALL_PLUGIN=OFF \
-D BUILD_SERIALIZE_PLUGIN=ON \
-D BUILD_SET_VALUE_PLUGIN=ON \
-D BUILD_TESTING=ON \
-D BUILD_TRACE_PLUGIN=ON \
-D BUILD_USER_CODE_PLUGIN=ON \
-D USE_HDF5=SYSTEM \
-D USE_NetCDF=SYSTEM \
-D CMAKE_CXX_STANDARD=${{matrix.cxx_std}} \
-B build
cmake --build build
ctest --test-dir build --output-on-failure
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: ( success() || failure() ) # always run even if the previous step fails
with:
report_paths: '${{github.workspace}}/tests.xml'