#!/bin/bash
#
# 2020-10-29 - slg - compile for codecov, run self-test, and upload results.
#
bash bootstrap.sh
./configure CFLAGS='-g -O0 -fprofile-arcs -ftest-coverage' \
            CXXFLAGS='-g -O0 -fprofile-arcs -ftest-coverage' \
            LIBS='-lgcov'
make clean \
     && cd src \
     && make check \
     && gcov-9 -n -o . *cpp \
     && bash <(curl -s https://codecov.io/bash)
make distclean
