10
10
build : [fpm, meson]
11
11
os : [ubuntu-latest, macos-latest, windows-latest]
12
12
gcc : [10] # Version of GFortran we want to use.
13
+ build-type : [debug]
14
+ include :
15
+ - build : meson
16
+ os : ubuntu-latest
17
+ gcc : 10
18
+ build-type : coverage
19
+
13
20
defaults :
14
21
run :
15
22
shell : ${{ contains(matrix.os, 'windows') && 'powershell' || 'bash -l {0}' }}
61
68
uses : mamba-org/provision-with-micromamba@main
62
69
with :
63
70
environment-file : config/ci/${{ matrix.build }}-env.yaml
71
+ extra-specs : |
72
+ ${{ matrix.build-type == 'coverage' && 'gcovr' || '' }}
64
73
65
74
- name : Compile (fpm)
66
75
if : ${{ matrix.build == 'fpm' }}
@@ -80,14 +89,17 @@ jobs:
80
89
meson setup _build
81
90
--libdir=lib
82
91
--prefix=${{ contains(matrix.os, 'windows') && '$pwd\_dist' || '$PWD/_dist' }}
92
+ ${{ matrix.build-type == 'coverage' && '-Db_coverage=true' || '' }}
83
93
84
94
- name : Compile project (meson)
85
95
if : ${{ matrix.build == 'meson' }}
86
96
run : meson compile -C _build
87
97
88
98
- name : Run testsuite (meson)
89
99
if : ${{ matrix.build == 'meson' }}
90
- run : meson test -C _build --no-rebuild --print-errorlogs
100
+ run : |
101
+ meson test -C _build --no-rebuild --print-errorlogs
102
+ ${{ matrix.build-type == 'coverage' && 'ninja -C _build coverage' || '' }}
91
103
92
104
- name : Install project (meson)
93
105
if : ${{ matrix.build == 'meson' }}
@@ -112,12 +124,16 @@ jobs:
112
124
OUTPUT : minpack-${{ matrix.os }}.tar
113
125
114
126
- name : Upload package
115
- if : ${{ matrix.build == 'meson' }}
127
+ if : ${{ matrix.build == 'meson' && matrix.build-type != 'coverage' }}
116
128
uses : actions/upload-artifact@v2
117
129
with :
118
130
name : ${{ env.MINPACK_OUTPUT }}
119
131
path : ${{ env.MINPACK_OUTPUT }}
120
132
133
+ - name : Upload coverage report
134
+ if : ${{ matrix.build-type == 'coverage' }}
135
+ uses : codecov/codecov-action@v2
136
+
121
137
122
138
Python :
123
139
needs :
@@ -232,6 +248,9 @@ jobs:
232
248
LD_LIBRARY_PATH : ${{ env.LD_LIBRARY_PATH }}:${{ env.MINPACK_PREFIX }}/lib
233
249
DYLD_LIBRARY_PATH : ${{ env.DYLD_LIBRARY_PATH }}:${{ env.MINPACK_PREFIX }}/lib
234
250
251
+ - name : Upload coverage report
252
+ uses : codecov/codecov-action@v2
253
+
235
254
236
255
Docs :
237
256
runs-on : ubuntu-latest
0 commit comments