-
-
Notifications
You must be signed in to change notification settings - Fork 119
162 lines (140 loc) · 4.39 KB
/
code-cov.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Code coverage
on:
# run tests on push events
push:
# run tests on PR events
pull_request:
types: [opened, synchronize]
jobs:
coverage:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-20.04
strategy:
fail-fast: true
matrix:
pattern: [on,off]
pointmap: [off]
scotch: [on,off]
vtk: [off]
int: [int32_t]
include:
# test vtk only without scotch and with delaunay insertion (more
# tests are useless)
- pattern: off
pointmap: off
scotch: off
vtk: on
int: int32_t
# Test pointmap with scotch, with and without patterns
- pattern: off
pointmap: on
scotch: on
vtk: off
int: int32_t
- pattern: on
pointmap: on
scotch: on
vtk: off
int: int32_t
# Add builds for int64
- pattern: on
pointmap: on
scotch: on
vtk: on
int: int64_t
- pattern: off
pointmap: off
scotch: on
vtk: on
int: int64_t
steps:
- name: Print options and set environment variables
run: |
echo "Job parameters:
Pattern: ${{ matrix.pattern }},
Pointmap: ${{ matrix.pointmap }},
Scotch: ${{ matrix.scotch }},
VTK: ${{ matrix.vtk }},
int: ${{ matrix.int }}"
- name: Install VTK
# Download vtk only if used
if: matrix.vtk == 'on'
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y libvtk7-dev
- name: Install Sctoch
# Download scotch only if used
if: matrix.scotch == 'on'
run: |
git clone https://gitlab.inria.fr/scotch/scotch.git
cd scotch
git checkout v6.1.3
cd src
cp Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc
make scotch -j 4
make install scotch -j 4
- name: Install LibCommons
run: |
git clone https://github.com/ISCDtoolbox/Commons.git
cd Commons
mkdir build
cd build
cmake ..
make install
- name: Install LinearElasticity
run: |
git clone https://github.com/ISCDtoolbox/LinearElasticity.git
cd LinearElasticity
mkdir build
cd build
cmake ..
make install
# checkout the provided branch name if workflow is manually run
- uses: actions/checkout@v3
if: inputs.branch_name
with:
ref: ${{github.event.inputs.branch}}
path: mmg
# checkout the event branch for automatic workflows
- uses: actions/checkout@v3
if: inputs.branch_name == ''
with:
path: mmg
- name: Configure Mmg with static libs (default behaviour)
run: |
cmake -Smmg -Bbuild \
-DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage" \
-DCMAKE_Fortran_COMPILER=gfortran-9 \
-DCMAKE_INSTALL_PREFIX=mmg-install \
-DCI_CONTEXT=ON \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DMMG_PATTERN=${{ matrix.pattern }} \
-DUSE_SCOTCH=${{ matrix.scotch }} \
-DSCOTCH_DIR=scotch \
-DUSE_VTK=${{ matrix.vtk }} \
-DMMG5_INT=${{ matrix.int }} \
-DTEST_LIBMMG=ON \
-DTEST_LIBMMGS=ON \
-DTEST_LIBMMG2D=ON \
-DTEST_LIBMMG3D=ON \
-DONLY_VERY_SHORT_TESTS=ON
shell: bash
- name: Build Mmg
run: |
cmake --build build --config Debug -j 4
- name: Install Mmg
run: |
cmake --build build --target install --config Debug -j 4
- name: Test Mmg
run: |
cd build
ctest --timeout 7200 -VV -C Debug -j 4
- name: Upload coverage to Codecov
#if: inputs.CODE_COVERAGE
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}