Skip to content

Commit

Permalink
Experimenting with codecov integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorks committed Feb 24, 2021
1 parent 51718da commit 1b370fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ jobs:
include:
- os: linux
compiler: gcc
script: make
script: sh ./ci_build.sh
after_success:
- bash <(curl -s https://codecov.io/bash)


- os: linux
compiler: clang
script: make
script: make



- os: osx
compiler: gcc
script: make
script: make

- os: osx
compiler: clang
script: make
script: make



Expand Down
10 changes: 10 additions & 0 deletions ci_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# a build file for delivering coverage results for the test case.
# Not really useful to anyone using tPNG!

make
cd ./tests/
./tpng_test
cd ..
gcov tpng.c
3 changes: 2 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
# just add the tpng.c and tpng.h file to your project add compile it.

all:
$(CC) tpng.c -Wall -O2 -std=c99 tests/driver.c -o ./tests/tpng_test
$(CC) tpng.c -coverage -Wall -O2 -std=c99 tests/driver.c -o ./tests/tpng_test
$(CC) tpng.c -Wall -O2 -std=c99 example/helper.c example/main.c -o ./example/example

debug:
$(CC) tpng.c -Wall -std=c99 -fsanitize=address -fsanitize=undefined -g tests/driver.c -o ./tests/tpng_test
$(CC) tpng.c -Wall -std=c99 -fsanitize=address -fsanitize=undefined -g example/helper.c example/main.c -o ./example/example


clean:
rm ./tests/tpng_test
rm ./example/example

0 comments on commit 1b370fa

Please sign in to comment.