From 0ead15be7c7085051549ce727669757457d7f902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Sat, 1 Apr 2023 17:53:37 +0200 Subject: [PATCH] Refactor github build action --- .github/workflows/build.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index deea63f..85f34f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: - main - "*" pull_request: - types: [opened, synchronize, reopened] + types: [ opened, synchronize, reopened ] jobs: build: name: Build @@ -24,17 +24,13 @@ jobs: sudo apt-get -y install gcovr - name: Tests & build-wrapper run: | - mkdir build - cmake -S . -B build -Wno-dev - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release - cd tests - mkdir build cmake -S . -B build -Wno-dev build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release cd build - ctest -C Release --output-on-failure - cd ../.. - gcovr -e "test/*" --txt --sonarqube=coverage.xml + make + ctest -C Release --output-on-failure --test-dir tests + cd .. + gcovr -f CPPFImdlp.cpp -f Metrics.cpp --merge-mode-functions=separate --txt --sonarqube=coverage.xml - name: Run sonar-scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}