forked from SAP-archive/fedem-mdb
-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (39 loc) · 1.28 KB
/
run-test.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
# SPDX-FileCopyrightText: 2023 SAP SE
#
# SPDX-License-Identifier: Apache-2.0
#
# This file is part of FEDEM - https://openfedem.org
name: Unit testing
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-and-test:
name: Build and execute unit tests
runs-on: ubuntu-latest
steps:
- name: Install googletest
uses: Bacondish2023/setup-googletest@v1
- name: Silence some advice and hint
run: |
git config --global advice.detachedHead false
git config --global init.defaultBranch main
- name: Check out source repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure pFUnit-3
run: >
PFUNIT=./pFUnit3 cmake
-B ./pFUnit3-build -S ./fedem-foundation/pFUnit/pFUnit-3.3.3
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./pFUnit3
- name: Build and install pFUnit-3
run: cmake --build ./pFUnit3-build --target install
- name: Configure main build
run: >
GTEST_ROOT=/usr/local PFUNIT=./pFUnit3 cmake -B ./build
-DCMAKE_BUILD_TYPE=Release -DUSE_FORTRAN=ON -DUSE_CHSHAPE=ON
- name: Build binaries and execute tests
run: cmake --build ./build --target check