-
Notifications
You must be signed in to change notification settings - Fork 26
76 lines (73 loc) · 2.34 KB
/
test_ubuntu.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
74
75
76
name: test Ubuntu
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
name: [Ubuntu-20.04, Ubuntu-22.04]
include:
- name: Ubuntu-20.04
version: ubuntu-20.04
image: ubuntu20
- name: Ubuntu-22.04
version: ubuntu-22.04
image: ubuntu22
runs-on: ${{ matrix.version }}
container: dcodoni/lib:${{ matrix.image }}
steps:
- uses: actions/checkout@v3
- name: Build svZeroDSolver
shell: bash
run: |
conda init
source /conda/etc/profile.d/conda.sh
conda activate svfsiplus
git clone https://github.com/SimVascular/svZeroDSolver.git
cd svZeroDSolver
mkdir build
cd build
cmake ..
make -j2
- name: Build svFSIplus
run: |
if [ -d "build" ]; then
rm -rf "build"
fi
mkdir build
cd build
cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON -DSV_USE_TRILINOS:BOOL=ON ..
make -j2
cd ..
- name: Build svFSIplus (PETSc)
run: |
if [ -d "build-petsc" ]; then
rm -rf "build-petsc"
fi
mkdir build-petsc
cd build-petsc
cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON -DSV_PETSC_DIR:STRING=/petsc ..
make -j2
cd ..
- name: Run integration tests
run: |
git config --global --add safe.directory /__w/svFSIplus/svFSIplus
git lfs pull
cd tests
conda run -n svfsiplus pytest -rPv --durations=0
- name: Run unit tests
run: |
cd build/svFSIplus-build/Source/svFSI
ctest --verbose
- name: Generate code coverage
run: |
cd build/svFSIplus-build
make coverage
- name: Save coverage report
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: build/svFSIplus-build/coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}