From 32ef6a7da4268e6e2f6408283d9c08329f84e340 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Wed, 4 Aug 2021 15:36:44 +0200 Subject: [PATCH] Working on Github Actions --- .github/workflows/build-and-test.yml | 46 ++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e4222d00..b145cf8e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -25,7 +25,8 @@ jobs: cc: "gcc", cxx: "g++", generators: "Ninja", - double_precision: false + double_precision: false, + coverage: false } - { name: "Linux / GCC (Release, Single Precision)", @@ -34,7 +35,28 @@ jobs: cc: "gcc", cxx: "g++", generators: "Ninja", - double_precision: false + double_precision: false, + coverage: false + } + - { + name: "Linux / GCC (Debug, Double Precision)", + os: ubuntu-latest, + build_type: "Debug", + cc: "gcc", + cxx: "g++", + generators: "Ninja", + double_precision: true, + coverage: false + } + - { + name: "Linux / GCC (Release, Double Precision)", + os: ubuntu-latest, + build_type: "Release", + cc: "gcc", + cxx: "g++", + generators: "Ninja", + double_precision: true, + coverage: false } - { name: "Linux / Clang (Debug, Single Precision)", @@ -43,7 +65,18 @@ jobs: cc: "clang", cxx: "clang++", generators: "Ninja", - double_precision: false + double_precision: false, + coverage: false + } + - { + name: "Code Coverage", + os: ubuntu-latest, + build_type: "Debug", + cc: "gcc", + cxx: "g++", + generators: "Ninja", + double_precision: false, + coverage: true } steps: @@ -92,6 +125,7 @@ jobs: -B build \ -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ -DRP3D_DOUBLE_PRECISION_ENABLED=${{ matrix.config.double_precision }} \ + -DRP3D_CODE_COVERAGE_ENABLED=${{ matrix.config.coverage }} -DRP3D_COMPILE_TESTS=True \ -G "${{ matrix.config.generators }}" \ @@ -124,3 +158,9 @@ jobs: ls -la build_hello_world ./build_hello_world/helloworld + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + path_to_write_report: ./coverage/codecov_report.txt + verbose: true +