Files
mt-st/.github/workflows/ci.yml
2021-06-05 23:51:01 +02:00

68 lines
1.4 KiB
YAML

on:
# Trigger the workflow on push or
# pull request, but only for the
# master branch.
push:
branches:
- master
pull_request:
branches:
- master
# Weekly run to account for
# changed dependencies.
schedule:
- cron: '17 04 * * 0'
name: CI
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
compiler: ['gcc', 'clang']
fail-fast: false
env:
CC: ${{ matrix.compiler }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build the code
run: make
- name: Test creating the release archive
run: make distcheck
coverage:
name: Check code coverage
runs-on: ubuntu-latest
env:
CC: gcc
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build the code
run: make CFLAGS=-coverage
- name: Run tests under coverage
run: make check
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
name: codecov-gcc
#fail_ci_if_error: true
path_to_write_report: ./codecov-report.txt
#verbose: true
- name: Archive code coverage result
uses: 'actions/upload-artifact@v2'
with:
name: code-coverage-gcc
path: codecov-report.txt