Skip to content

spatially variable hyperresistivity #730

spatially variable hyperresistivity

spatially variable hyperresistivity #730

Workflow file for this run

name: CMake MacOS
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-12, macos-13, macos-latest]
include:
- os: macos-12
dylib_path: /usr/local/lib/gcc/current
- os: macos-13
dylib_path: /usr/local/lib/gcc/current
- os: macos-latest # https://github.com/actions/runner/issues/3337
dylib_path: /opt/homebrew/Cellar/gcc/14.2.0/lib/gcc/current
steps:
- name: Build Info
run: |
uname -a
gcc -v
clang -v
- name: CCache
id: cache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('hashFile.txt') }}
restore-keys: ${{ runner.os }}-ccache-
- name: Cache PIP (OSX)
uses: actions/cache@v3
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Clone PHARE
uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-python@v4
with:
python-version: '3.12.3'
- name: Install system deps (openmpi, hdf5, ccache,...)
run: |
brew reinstall gcc
brew install open-mpi hdf5-mpi ccache
echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
- name: Ensure ccache uses ~/.ccache
run: |
mkdir -p ~/.ccache
ccache --set-config=cache_dir=~/.ccache
ccache --get-config=cache_dir
- name: Install python deps
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
env:
LIBRARY_PATH: ${{ matrix.dylib_path }} # used by clang, needed to find libquadmath - else link error
run: |
[ -d /opt/homebrew/Cellar/gcc ] && ls -l /opt/homebrew/Cellar/gcc
[ ! -d "${{matrix.dylib_path}}" ] && echo dylib_path not found && find / -name "libquadmath.0.dylib" && exit 1
cmake $GITHUB_WORKSPACE -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_SAMRAI_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DlowResourceTests=ON \
-DCMAKE_CXX_FLAGS="-DPHARE_DIAG_DOUBLES=1 "
- name: Build
working-directory: ${{runner.workspace}}/build
env:
LIBRARY_PATH: ${{ matrix.dylib_path }} # used by clang, needed to find libquadmath - else link error
run: cmake --build . -j 2
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest -j 2 --output-on-failure