-
-
Notifications
You must be signed in to change notification settings - Fork 13
73 lines (68 loc) · 2.15 KB
/
aste_ci_mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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 boost openmpi pkg-config ninja gnu-time vtk
- 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 \
-DPRECICE_FEATURE_PYTHON_ACTIONS=OFF \
-DBUILD_TESTING=OFF \
-G Ninja ..
ninja
sudo ninja install
cd ../..
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
- name: Set up environment and install dependencies
run: |
python3 -m venv --system-site-packages venv
source venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements.txt
pip install numpy polars vtk
echo "VIRTUAL_ENV=$(pwd)/venv" >> $GITHUB_ENV
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
- 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: |
source ${{ env.VIRTUAL_ENV }}/bin/activate
ctest