Merge pull request #4092 from stanmoore1/comm_tiled #433
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
# GitHub action to build LAMMPS on MacOS and run unit tests | |
name: "Unittest for MacOS" | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
build: | |
name: MacOS Unit Test | |
if: ${{ github.repository == 'lammps/lammps' }} | |
runs-on: macos-latest | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install ccache | |
run: brew install ccache | |
- name: Create Build Environment | |
run: mkdir build | |
- name: Set up ccache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: macos-ccache-${{ github.sha }} | |
restore-keys: macos-ccache- | |
- name: Building LAMMPS via CMake | |
shell: bash | |
working-directory: build | |
run: | | |
ccache -z | |
python3 -m pip install numpy | |
python3 -m pip install pyyaml | |
cmake -C ../cmake/presets/clang.cmake \ | |
-C ../cmake/presets/most.cmake \ | |
-D DOWNLOAD_POTENTIALS=off \ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-D CMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-D ENABLE_TESTING=on \ | |
-D BUILD_SHARED_LIBS=on \ | |
-D LAMMPS_EXCEPTIONS=on \ | |
../cmake | |
cmake --build . --parallel 2 | |
ccache -s | |
- name: Run Tests | |
working-directory: build | |
shell: bash | |
run: ctest -V |