Skip to content

Commit

Permalink
Merge b39041f into 5898636
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Nov 1, 2019
2 parents 5898636 + b39041f commit 99b7a96
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 30 deletions.
20 changes: 20 additions & 0 deletions .github/scripts/run-cmake-coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -euo pipefail

WORKSPACE=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && /bin/pwd -P)
PATH=$HOME/.local/bin:$PATH

pip install --user cpp-coveralls

# Build with coverage

mkdir "${WORKSPACE}/_build_coverage" && cd $_
CFLAGS="--coverage" CXXFLAGS="--coverage" LDFLAGS="--coverage" cmake ..
make -j$(nproc)
ctest -V -LE Benchmark

# Collect coverage data

export TRAVIS_BRANCH=${GITHUB_REF}
coveralls --root .. --build-root . --gcov-options '\-lp' -E ".*/3rdparty/.*" -E ".*/_.*" -E ".*/tests/.*" -E ".*/benchmarks/.*" -E "./CMake.*CompilerId.c"
12 changes: 2 additions & 10 deletions .github/scripts/run-cmake-test
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,11 @@ cmake "${WORKSPACE}/3rdparty/googletest" -DCMAKE_INSTALL_PREFIX="${THIRDPARTY_PR
make -j$(nproc)
make install

# Build with external dependencies and test coverage
# Build with external dependencies

mkdir "${WORKSPACE}/_build_coverage" && cd $_
CFLAGS="--coverage" CXXFLAGS="--coverage" LDFLAGS="--coverage" cmake .. -DCMAKE_INSTALL_PREFIX="${THIRDPARTY_PREFIX_DIR}" -DUSE_THIRDPARTY_LIBRARIES=OFF
cmake .. -DCMAKE_INSTALL_PREFIX="${THIRDPARTY_PREFIX_DIR}" -DUSE_THIRDPARTY_LIBRARIES=OFF
make -j$(nproc)
ctest -V -LE Benchmark
mkdir -p deploy
make DESTDIR="${PWD}/deploy" install

# Collect coverage data

#if [[ "${OS_ARG}" == "ubuntu"* ]]
#then
# pip install --user cpp-coveralls
# coveralls --root .. --build-root . -E ".*/3rdparty/.*" -E ".*/_.*" -E ".*/tests/.*" -E ".*/benchmarks/.*"
#fi
2 changes: 1 addition & 1 deletion .github/scripts/run-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ case "${OS_ARG}" in
packages+=(bazel)
;;
cmake)
packages+=(libcurl4-openssl-dev)
packages+=(libcurl4-openssl-dev python-pip python-wheel)
;;
esac

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Continuous Integration
on: [push, pull_request]
on: [] #[push, pull_request]

jobs:
build:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Coverage
on: [push, pull_request]

jobs:
build:
name: Coverage ${{ matrix.buildsystem }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
buildsystem: [cmake]
os: [ubuntu-18.04]
steps:
- uses: actions/checkout@master
with:
submodules: true
- name: Prepare
run: .github/scripts/run-prepare ${{ matrix.buildsystem }} ${{ matrix.os }}
- name: Test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: .github/scripts/run-cmake-coverage
18 changes: 0 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,9 @@ env:
addons:
apt:
packages:
- cmake
- curl
- doxygen
- g++
- gcc
- git
- lcov
- libcurl4-openssl-dev
- python-pip

script:
- pushd .
- mkdir _build_coverage
- cd _build_coverage
- CFLAGS="--coverage" CXXFLAGS="--coverage" LDFLAGS="--coverage" cmake .. -DUSE_THIRDPARTY_LIBRARIES=ON
- make -j 4
- ctest -V -LE Benchmark
- pip install --user cpp-coveralls
- coveralls --root .. --build-root . -E ".*/3rdparty/.*" -E ".*/_.*" -E ".*/tests/.*" -E ".*/benchmarks/.*"
- popd

- pushd .
- cd doc
- doxygen
Expand Down

0 comments on commit 99b7a96

Please sign in to comment.