Add macOS CI for ASTE #1
Workflow file for this run
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: ASTE macOS CI | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
branches: [master, develop] | |
schedule: | |
- cron: '0 8 * * 2' # run once in a week (here Tue at 8am) | |
concurrency: | |
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{github.event_name == 'pull_request'}} | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
timeout-minutes: 20 | |
env: | |
CXX_FLAGS: "-Werror -Wall -Wextra -Wno-unused-parameter" | |
CTEST_OUTPUT_ON_FAILURE: "Yes" | |
steps: | |
- name: Setup system | |
run: | | |
brew update | |
brew install cmake eigen libxml2 boost petsc openmpi pkg-config ninja vtk | |
python3 -m pip install --upgrade pip | |
- name: Install preCICE | |
run: | | |
git clone https://github.com/precice/precice.git | |
cd precice | |
mkdir build && cd build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DPRECICE_FEATURE_MPI_COMMUNICATION=ON \ | |
-DPRECICE_FEATURE_PETSC_MAPPING=OFF \ | |
-G Ninja .. | |
ninja | |
sudo ninja install | |
cd ../.. | |
- uses: actions/checkout@v4 | |
- name: Install example dependencies | |
run: | | |
python3 -m pip install -r requirements.txt | |
- name: Prepare build directory | |
run: mkdir build | |
- name: Build project with clang | |
working-directory: build | |
env: | |
CC: clang | |
CXX: clang++ | |
run: | | |
cmake .. | |
cmake --build . | |
- name: Run tests | |
working-directory: build | |
run: | | |
ctest |