59
59
name : Run gcov & upload coverage.
60
60
command : |
61
61
cd build-gcc
62
- # TODO should be able to do this with 'find', but it's tricky and opaque.
63
- gcov -pb libtskit.a.p/tskit_core.c.gcno ../c/tskit/core.c
64
- gcov -pb libtskit.a.p/tskit_tables.c.gcno ../c/tskit/tables.c
65
- gcov -pb libtskit.a.p/tskit_trees.c.gcno ../c/tskit/trees.c
66
- gcov -pb libtskit.a.p/tskit_genotypes.c.gcno ../c/tskit/genotypes.c
67
- gcov -pb libtskit.a.p/tskit_core.c.gcno ../c/tskit/core.c
68
- gcov -pb libtskit.a.p/tskit_convert.c.gcno ../c/tskit/convert.c
69
- gcov -pb libtskit.a.p/tskit_stats.c.gcno ../c/tskit/stats.c
70
- gcov -pb libtskit.a.p/tskit_haplotype_matching.c.gcno ../c/tskit/haplotype_matching.c
71
- gcov -pb libtskit.a.p/tskit_file_format.c.gcno ../c/tskit/file_format.c
62
+ find ../c/tskit/*.c -type f -printf "%f\n" | xargs -i gcov -pb libtskit.a.p/tskit_{}.gcno ../c/tskit/{}
72
63
cd ..
73
- bash <(curl -s https://codecov.io/bash) -X gcov -n c_tests
64
+ bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -F c-tests
74
65
75
66
- run :
76
67
name : Valgrind for C tests.
@@ -110,28 +101,41 @@ jobs:
110
101
command : |
111
102
make -C c/examples
112
103
104
+ - run :
105
+ name : Build example LWT interface code and test
106
+ command : |
107
+ # We're assuming that the tskit C module has already
108
+ # been built, as we're testing against the local tskit version.
109
+ cd python/lwt_interface
110
+ make allchecks
111
+ python -m pytest
112
+
113
+ - run :
114
+ name : Upload LWT coverage
115
+ command : |
116
+ # Make sure the C coverage reports aren't lying around
117
+ rm -fR build-gcc
118
+ ls -R
119
+ cd python/lwt_interface
120
+ gcov -pb -o ./build/temp.linux*/*.gcno example_c_module.c
121
+ bash <(curl -s https://codecov.io/bash) -X gcov -F lwt-tests
122
+
113
123
- run :
114
124
name : Run Python tests
115
125
command : |
116
126
cd python
117
- python -m pytest --cov=tskit --cov-report=xml --cov-branch -n8 tests
127
+ python -m pytest --cov=tskit --cov-report=xml --cov-branch -n16 tests
118
128
119
129
- run :
120
130
name : Upload Python coverage
121
131
command : |
122
132
# Make sure the C coverage reports aren't lying around
123
133
rm -fR build-gcc
124
- bash <(curl -s https://codecov.io/bash) -X gcov -n python_tests
125
- # Clean up reports so we don't upload them twice.
126
- rm -f coverage.xml
127
-
128
- # Upload coverage for the Python C API.
129
134
cd python
130
135
gcov -pb -o ./build/temp.linux*/*.gcno _tskitmodule.c
131
- cd ..
132
- bash <(curl -s https://codecov.io/bash) -X gcov -n python_c_tests
133
- # Clean up reports so we don't upload them twice.
134
- rm -f python/*.gcov
136
+ bash <(curl -s https://codecov.io/bash) -f coverage.xml -F python-tests
137
+ rm -f coverage.xml
138
+ bash <(curl -s https://codecov.io/bash) -X gcov -F python-c-tests
135
139
136
140
- run :
137
141
name : Build Python package
@@ -149,12 +153,3 @@ jobs:
149
153
python setup.py bdist_wheel
150
154
pip install dist/*.tar.gz
151
155
tskit --help
152
-
153
- - run :
154
- name : Build example LWT interface code and test
155
- command : |
156
- # We're assuming that the tskit C module has already
157
- # been built, as we're testing against the local tskit version.
158
- cd python/lwt_interface
159
- make allchecks
160
- python -m pytest
0 commit comments