Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

66 updated CI actions #67

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ runs:
shell: bash
run: |
sudo apt-get -qq update
sudo apt-get -qq install gcc-11
sudo apt-get -qq -y install g++-11
sudo apt-get -qq install gcc-13
sudo apt-get -qq -y install g++-13
sudo apt-get -qq -y install lcov
- name: Build
shell:
# ensure that the installed compiler version is used
run: |
export CC=/usr/bin/gcc-11
export CXX=/usr/bin/g++-11
export CC=/usr/bin/gcc-13
export CXX=/usr/bin/g++-13
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DGMGPOLAR_TEST_COVERAGE=ON ..
make -j4
Expand All @@ -23,7 +23,7 @@ runs:
run: |
tar -czf build.tar.gz build
- name: Upload build dir archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-cpp-linux-gmgpolar
path: build.tar.gz
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
sudo apt-get -qq -y install lcov
sudo apt-get -qq update
- name: Download build test directory
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
- name: extract build archive
Expand All @@ -35,16 +35,16 @@ runs:
# compute code coverage
run: |
cd build
cmake --build . --target coverage/fast
cmake --build . --target coverage/fast
- name: Upload test report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-report
path: build/tests/testreport.xml
if-no-files-found: error
retention-days: 3
- name: Upload coverage reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-coverage-reports
path: |
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ option(GMGPOLAR_TEST_COVERAGE "Enable GCov coverage analysis (adds a 'coverage'

if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if(GMGPOLAR_TEST_COVERAGE)
# importantly, set the path to the gcov executable
set(GCOV_PATH "/usr/bin/gcov-13")

message(STATUS "Coverage enabled")
include(CodeCoverage)
append_coverage_compiler_flags()
setup_target_for_coverage_lcov(
NAME coverage
EXECUTABLE tests/gmgpolar_tests
EXCLUDE "${CMAKE_SOURCE_DIR}/tests*" "${CMAKE_SOURCE_DIR}/src/test_cases*" "${CMAKE_BINARY_DIR}/*" "/usr*"
EXCLUDE "${CMAKE_SOURCE_DIR}/tests*" "${CMAKE_SOURCE_DIR}/src/test_cases*" "${CMAKE_SOURCE_DIR}/include/test_cases*" "${CMAKE_BINARY_DIR}/*" "/usr*"
)
endif()
endif()
Expand Down
Loading