-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous integration through Travis CI, and code coverage through CodeCov have been set up. An integration build target has been developed that can be used by Travis CI and CodeCov to perform continuous integration and code coverage reporting on the GitHub repository of the Sol Library. Support for Clang was attempted, but failed the integration build owing to a mismatch between Clang and Gcov. This will need to be addressed in a subsequent issue. This commit was squashed from the issue/14 branch.
- Loading branch information
1 parent
a0f54ba
commit 96eb3fc
Showing
5 changed files
with
215 additions
and
1 deletion.
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
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,76 @@ | ||
################################################################################ | ||
# SOL LIBRARY v1.0.0+41 | ||
# | ||
# File: sol/.travis.yml | ||
# | ||
# Description: | ||
# This YAML file is part of the Sol Library. It defines the Travis-CI | ||
# build matrix. | ||
# | ||
# Authors: | ||
# Abhishek Chakravarti <abhishek@taranjali.org> | ||
# | ||
# Copyright: | ||
# (c) 2019, Abhishek Chakravarti. | ||
# <abhishek@taranjali.org> | ||
# | ||
# License: | ||
# Released under the GNU General Public License version 3 (GPLv3). | ||
# <http://opensource.org/licenses/GPL-3.0> | ||
# See the accompanying README.md file for complete licensing details. | ||
# | ||
# By continuing to use and/or distribute this file, you acknowledge that | ||
# you have understood these license terms and accept them. | ||
################################################################################ | ||
|
||
|
||
|
||
|
||
# Set programming language | ||
language: c | ||
|
||
|
||
|
||
|
||
# Set compilers; we're using only GCC for the time being | ||
compiler: | ||
- gcc | ||
|
||
|
||
|
||
|
||
# Update GCC and GCov to version 8; this is needed for gcov to work | ||
# properly; refer to the following site: | ||
# https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91 | ||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get install build-essential software-properties-common -y | ||
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
- sudo apt-get update | ||
- sudo apt-get install gcc-snapshot -y | ||
- sudo apt-get update | ||
- sudo apt-get install gcc-8 -y | ||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/gcov gcov /usr/bin/gcov-8 | ||
|
||
|
||
|
||
|
||
# Build target | ||
script: | ||
- make integration | ||
|
||
|
||
|
||
|
||
# Generate coverage statistics for CodeCov | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
|
||
|
||
|
||
|
||
################################################################################ | ||
# EOF | ||
# Built on hyperion [Tue Jan 29 02:37:24 UTC 2019] | ||
################################################################################ | ||
|
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,119 @@ | ||
################################################################################ | ||
# SOL LIBRARY v1.0.0+41 | ||
# | ||
# File: sol/Makefile | ||
# | ||
# Description: | ||
# This Makefile is part of the Sol Library. It defines the build rules | ||
# | ||
# Authors: | ||
# Abhishek Chakravarti <abhishek@taranjali.org> | ||
# | ||
# Copyright: | ||
# (c) 2018, Abhishek Chakravarti. | ||
# <abhishek@taranjali.org> | ||
# | ||
# License: | ||
# Released under the GNU General Public License version 3 (GPLv3). | ||
# <http://opensource.org/licenses/GPL-3.0> | ||
# See the accompanying README.md file for complete licensing details. | ||
# | ||
# By continuing to use and/or distribute this file, you acknowledge that | ||
# you have understood these license terms and accept them. | ||
################################################################################ | ||
|
||
|
||
|
||
|
||
# Set directory paths | ||
DIR_BLD = bld | ||
DIR_SRC = src | ||
DIR_TEST = test | ||
|
||
|
||
|
||
|
||
# Set commands | ||
CMD_CC = $(CC) | ||
CMD_SO = $(CC) | ||
CMD_LD = $(CC) | ||
CMD_COV = gcov | ||
|
||
|
||
|
||
|
||
# Set command options | ||
OPT_CC = -c -fPIC -std=c99 -Wall -g -O0 -coverage | ||
OPT_SO = -shared -g -O0 -coverage | ||
OPT_LD = -std=c99 -Wall -g -O0 -coverage | ||
OPT_COV = -o $(DIR_BLD) | ||
|
||
|
||
|
||
|
||
# Set command inputs | ||
INP_SO = $(DIR_BLD)/test.o | ||
INP_LD = $(DIR_TEST)/runner.c | ||
INP_COV = $(DIR_BLD)/runner.gcda $(DIR_BLD)/test.gcda | ||
|
||
|
||
|
||
|
||
# Set command dependencies | ||
DEP_LD = $(OUT_SO) -lgcov | ||
DEP_COV = *.gcno *.gcda | ||
|
||
|
||
|
||
|
||
# Set command outputs | ||
OUT_SO = $(DIR_BLD)/libsol.so | ||
OUT_LD = $(DIR_BLD)/runner | ||
OUT_COV = *.gcov | ||
|
||
|
||
|
||
|
||
# Set rule to build test runner | ||
$(OUT_LD): $(OUT_SO) $(INP_LD) | ||
$(CMD_LD) $(OPT_LD) $(INP_LD) $(DEP_LD) -o $@ | ||
|
||
|
||
|
||
|
||
# Set rule to build shared library | ||
$(OUT_SO): $(INP_SO) | ||
$(CMD_SO) $(OPT_SO) $(INP_SO) -o $@ | ||
|
||
|
||
|
||
|
||
# Set rule to build objects for shared library | ||
$(DIR_BLD)/%.o: $(DIR_SRC)/%.c | ||
mkdir -p $(DIR_BLD); $(CMD_CC) $(OPT_CC) $< -o $@ | ||
|
||
|
||
|
||
|
||
# Rule to generate integration build | ||
integration: $(OUT_LD) | ||
./$(OUT_LD) | ||
mv $(DEP_COV) $(DIR_BLD) | ||
$(CMD_COV) $(OPT_COV) $(INP_COV) | ||
mv $(OUT_COV) $(DIR_BLD) | ||
|
||
|
||
|
||
|
||
# Rule to clean build artefacts | ||
clean: | ||
rm -rf $(DIR_BLD) | ||
|
||
|
||
|
||
|
||
################################################################################ | ||
# EOF | ||
# Built on hyperion [Tue Jan 29 02:37:24 UTC 2019] | ||
################################################################################ | ||
|
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
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,10 @@ | ||
#include <stdio.h> | ||
|
||
#include "../inc/error.h" | ||
#include "../inc/test.h" | ||
|
||
int main(void) | ||
{ | ||
return 0; | ||
} | ||
|