Skip to content

Commit

Permalink
Merge a2ab135 into 228846f
Browse files Browse the repository at this point in the history
  • Loading branch information
sanssecours committed Oct 16, 2018
2 parents 228846f + a2ab135 commit 790f2d3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 15 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ matrix:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- g++-7
env:
- CC_COMPILER=gcc-8
- CXX_COMPILER=g++-8
- CC_COMPILER=gcc-7
- CXX_COMPILER=g++-7
- ENABLE_COVERAGE=ON

- os: linux
name: 🐧 Clang
Expand Down Expand Up @@ -352,6 +353,7 @@ before_install:
mkdir -p "$HOME/bin" && cd "$HOME/bin" && \
curl -L "https://github.com/mvdan/sh/releases/download/v2.5.1/shfmt_v2.5.1_linux_amd64" -o shfmt && \
chmod u+x shfmt && export PATH=$PATH:"$HOME/bin"
if [[ "$ENABLE_COVERAGE" == ON ]]; then pip install --user cpp-coveralls; fi
fi
#
Expand All @@ -360,7 +362,7 @@ before_install:
#
before_script:
- |
cd $TRAVIS_BUILD_DIR/..
cd $TRAVIS_BUILD_DIR
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CMAKE_OPT+=(-DCMAKE_INSTALL_PREFIX="$PWD/install")
export PATH=$PATH:"$PWD/install/bin"
Expand All @@ -376,6 +378,7 @@ before_script:
-DENABLE_ASAN="${ENABLE_ASAN:-OFF}"
-DCOMMON_FLAGS="${COMMON_FLAGS:--Werror}"
-DENABLE_DEBUG=ON
-DENABLE_COVERAGE="${ENABLE_COVERAGE:-OFF}"
-DINSTALL_SYSTEM_FILES=OFF
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DKDB_DB_SYSTEM="$SYSTEM_DIR"
Expand All @@ -392,3 +395,8 @@ before_script:
script:
- ninja
- sh -c "${TEST_COMMAND:-ninja install && ninja run_all && kdb run_all}"
- |
if [[ "$ENABLE_COVERAGE" == ON ]]; then
cd .. && coveralls -b build --gcov=gcov-7 -e benchmarks -e doc -e examples -e install -e tests \
-E '.*build/(CMakeFiles|googletest-src|src).*\.(c|cc|cpp|h|hh|hpp)'
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Release](https://img.shields.io/github/release/ElektraInitiative/libelektra.svg)](https://github.com/ElektraInitiative/libelektra/releases/latest)
[![Travis Build Status](https://travis-ci.org/ElektraInitiative/libelektra.svg?branch=master)](https://travis-ci.org/ElektraInitiative/libelektra)
[![Coverage Status](https://img.shields.io/coveralls/github/ElektraInitiative/libelektra.svg)](https://coveralls.io/github/ElektraInitiative/libelektra)

_Elektra serves as a universal and secure framework to access configuration
settings in a global, hierarchical key database._
Expand Down
5 changes: 4 additions & 1 deletion cmake/ElektraCompiling.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ endif (HAS_CFLAG_MAYBE_UNINITIALIZED)

if (ENABLE_COVERAGE)
set (COMMON_FLAGS "${COMMON_FLAGS} -fprofile-arcs -ftest-coverage")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
if (NOT APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lgcov")
endif (NOT APPLE)
endif (ENABLE_COVERAGE)

set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wno-missing-field-initializers")
Expand Down
1 change: 1 addition & 0 deletions doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ you up to date with the multi-language support provided by Elektra.
remove the source code checks from the jobs `🍏 MMap` and `🍏 Clang`, which sometimes hit the
[timeout limit for public repositories](https://docs.travis-ci.com/user/customizing-the-build#build-timeouts) before. *(René Schwaiger)*
- All Travis build jobs now use the compiler switch `-Werror`. *(René Schwaiger)*
- We added basic support for coverage analysis via [Coveralls](http://coveralls.io). *(René Schwaiger)*


## Website
Expand Down
10 changes: 0 additions & 10 deletions scripts/docker/debian/sid/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ RUN apt-get update && apt-get -y install \
&& rm -rf /var/lib/apt/lists/*

RUN cabal update && cabal install hspec QuickCheck
RUN pip install cmake-format==0.4.3 pyyaml

# Google Test
ENV GTEST_ROOT=/opt/gtest
Expand Down Expand Up @@ -98,15 +97,6 @@ RUN useradd \

USER ${JENKINS_USERID}

# shfmt
ENV SHFMT_PATH=/home/jenkins/bin
ENV SHFMT_VERSION=v2.5.1
ENV PATH="${SHFMT_PATH}:${PATH}"
RUN mkdir -p "${SHFMT_PATH}" \
&& cd "${SHFMT_PATH}" \
&& curl -L "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" -o shfmt \
&& chmod a+x shfmt

# Handle Haskell dependencies
ENV HASKELL_SHARED_SANDBOX /home/jenkins/elektra-cabal-sandbox
RUN mkdir -p $HASKELL_SHARED_SANDBOX \
Expand Down
12 changes: 12 additions & 0 deletions scripts/docker/debian/stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ USER ${JENKINS_USERID}
RUN git config --global user.email 'Jenkins <autobuilder@libelektra.org>' \
&& git config --global user.name 'Jenkins'

# shfmt
ENV SHFMT_PATH=/home/jenkins/bin
ENV SHFMT_VERSION=v2.5.1
ENV PATH="${SHFMT_PATH}:${PATH}"
RUN mkdir -p "${SHFMT_PATH}" \
&& cd "${SHFMT_PATH}" \
&& curl -L "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" -o shfmt \
&& chmod a+x shfmt

# cmake-format
RUN pip install cmake-format==0.4.3 pyyaml

# Handle Haskell dependencies
ENV HASKELL_SHARED_SANDBOX /home/jenkins/elektra-cabal-sandbox
RUN mkdir -p $HASKELL_SHARED_SANDBOX \
Expand Down

0 comments on commit 790f2d3

Please sign in to comment.