[WIP] prototype AGORA isolated galaxy #1572
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake (macOS) | |
on: | |
push: | |
branches: [ development ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ development ] | |
concurrency: | |
group: ${{ github.ref }}-${{ github.head_ref }}-cmake-macos | |
cancel-in-progress: true | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of sonarcloud analysis | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' # caching pip dependencies | |
- name: Create Build Environment | |
# Some projects don't allow in-source building, so create a separate build directory | |
# We'll use this as our working directory for all subsequent commands | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Install Homebrew dependencies | |
run: | | |
brew install openmpi [email protected] || true | |
brew link --force [email protected] | |
- name: Output HDF5 configuration (verbose) | |
run: h5cc -showconfig | |
- name: Output HDF5 compile flags | |
run: h5cc -show | |
- name: Install pip dependencies | |
run: python3 -m pip install --user numpy matplotlib | |
- name: Configure CMake | |
# Use a bash shell so we can use the same syntax for environment variable | |
# access regardless of the host operating system | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
# Restrict to 1 build process at a time to avoid OOM kills. | |
run: cmake --build . --config $BUILD_TYPE --parallel 1 | |
- name: Create test output directory | |
run: cmake -E make_directory $GITHUB_WORKSPACE/tests | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest --output-on-failure -C $BUILD_TYPE | |
- name: Upload test output | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: ${{github.workspace}}/tests |