MBX testing suite #654
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MBX testing suite | |
on: | |
push: | |
branches: | |
- "master" | |
- "master-dev" | |
pull_request: | |
branches: | |
- "master" | |
- "master-dev" | |
schedule: | |
# Nightly tests run on master by default: | |
# Scheduled workflows run on the latest commit on the default or base branch. | |
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) | |
- cron: "0 0 * * *" | |
jobs: | |
compile-and-test-mbx: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: install-dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y fftw3-dev | |
sudo apt-get install libgsl-dev | |
sudo apt-get install lcov -y | |
sudo apt-get install autoconf -y | |
sudo apt-get install g++-9 gcc-9 -y | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "The workflow is now ready to test your code on the runner." | |
- name: run-install | |
run: | | |
ls ${{ github.workspace }} | |
rm -rf install | |
autoreconf -fi | |
./configure --disable-optimization --enable-coverage | |
make install | |
- run: echo "This job's status is ${{ job.status }}." | |
- run: echo "Running unittests" | |
- run: ls ${{ github.workspace }} | |
- name: unittests | |
run: make check | |
- name: Submit to codecov.io | |
run: | | |
export CODECOV_TOKEN=c788f6e4-7b04-4a7a-a8dc-41c0a45811d2 | |
cd ${{ github.workspace }} | |
lcov --directory . --capture --output-file coverage.info # capture coverage info | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system | |
lcov --list coverage.info #debug info | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov -t ${CODECOV_TOKEN} | |