-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (55 loc) · 2.03 KB
/
ci.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
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
build:
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@master
with:
repository: gismo/gismo
ref: stable
path: ./gismo
- uses: actions/checkout@master
with:
path: ./gismo/optional/${{ github.event.repository.name }}
#token: ${{ secrets.GH_PAT }}
# Step to install preCICE
- name: Install preCICE
if: runner.os == 'Linux' # or change based on OS
run: |
sudo apt update
sudo apt install build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy
wget https://github.com/precice/precice/archive/v3.1.2.tar.gz
tar -xzvf v3.1.2.tar.gz
cd precice-3.1.2
cmake --list-presets
cmake --preset=production # Configure using the production preset
cd build
make -j
precice_DIR=$(pwd)
- name: "Run for ${{ matrix.os }}"
shell: bash
working-directory: ${{ runner.workspace }}
run: |
# Use the precice_DIR set from the environment variable
ctest -S ${{ github.event.repository.name }}/gismo/cmake/ctest_script.cmake \
-D CTEST_BUILD_NAME="${{ github.event.repository.name }}_actions_$GITHUB_RUN_NUMBER" \
-D CTEST_SITE="${{ matrix.os }}_[actions]" \
-D CMAKE_ARGS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE;-DCMAKE_CXX_STANDARD=11;-DGISMO_WITH_XDEBUG=ON;-DGISMO_BUILD_UNITTESTS=ON;-Dprecice_DIR=$precice_DIR" \
-D GISMO_OPTIONAL="${{ github.event.repository.name }}" -Q