-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
compiler: [clang, gcc] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install LCOV | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y lcov | ||
- name: Install coveralls-lcov | ||
run: | | ||
gem install coveralls-lcov | ||
- name: Set up compiler ${{ matrix.compiler }} | ||
run: sudo apt-get install -y ${{ matrix.compiler }} | ||
|
||
- name: Zero counters | ||
run: lcov --directory . --zerocounters | ||
|
||
- name: Build and run tests | ||
run: | | ||
make | ||
./test-library.out | ||
- name: Capture coverage info | ||
run: lcov --directory . --capture --output-file coverage.info | ||
|
||
- name: Filter out system and test code | ||
run: lcov --remove coverage.info 'tests/*' '/usr/*' 'test-library*' --output-file coverage.info | ||
|
||
- name: List coverage info | ||
run: lcov --list coverage.info | ||
|
||
- name: Upload coverage to Coveralls | ||
run: coveralls-lcov coverage.info |
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