Skip to content
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
43 changes: 42 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
runs-on: ubuntu-22.04
env:
CMakeVersion: "3.22.0"
CC: clang-${{ matrix.llvm-version }}
CXX: clang++-${{ matrix.llvm-version }}
strategy:
matrix:
llvm-version: [19]
steps:
- name: Checkout GRASS
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -41,10 +46,19 @@ jobs:
echo "$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_PATH
- run: |
cmake --version
- name: Apt LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.llvm-version }}
sudo apt-get update
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils ninja-build libpq-dev \
clang-${{ matrix.llvm-version }} clang-tools-${{ matrix.llvm-version }} \
libomp-${{ matrix.llvm-version }}-dev lld-${{ matrix.llvm-version }} \
llvm-${{ matrix.llvm-version }} \
gettext unixodbc-dev libnetcdf-dev
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
Expand All @@ -61,11 +75,16 @@ jobs:
run: |
cmake ${CMAKE_OPTIONS} -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -G Ninja \
-DCMAKE_INSTALL_PREFIX=$HOME/install -DWITH_NLS=ON -DWITH_GUI=OFF -DWITH_DOCS=OFF \
-DWITH_READLINE=ON -DWITH_ODBC=ON -DWITH_NETCDF=ON -DWITH_BZLIB=ON
-DWITH_READLINE=ON -DWITH_ODBC=ON -DWITH_NETCDF=ON -DWITH_BZLIB=ON \
-DCODE_COVERAGE=ON \
-DLLVM_PROFDATA_PATH=llvm-profdata-${{ matrix.llvm-version }} \
-DLLVM_COV_PATH=llvm-cov-${{ matrix.llvm-version }} \
-DCMAKE_C_COMPILER=clang-${{ matrix.llvm-version }} -DCMAKE_CXX_COMPILER=clang++-${{ matrix.llvm-version }}
- name: Print CMakeCache.txt
shell: bash -el {0}
run: |
cat ${GITHUB_WORKSPACE}/build/CMakeCache.txt
- run: cmake --build build --target help
- name: Build
run: |
cmake --build build --verbose -j$(nproc)
Expand All @@ -89,3 +108,25 @@ jobs:
name: testreport-CMake
path: testreport
retention-days: 3
- run: |
cmake --build build --target ccov
if: ${{ !cancelled() }}
- name: Make profile data available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: >-
profile-data-${{ 'cmake' }}
path: |
*.prof*
*coverage*
llvm_coverage*/**
retention-days: 1
- name: Upload coverage reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
verbose: true
flags: linux-cmake
name: linux-cmake
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 5 additions & 0 deletions .gunittest.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ exclude =
vector/v.in.pdal/testsuite/test_v_in_pdal_basic.py
vector/v.in.pdal/testsuite/test_v_in_pdal_filter.py
vector/v.out.lidar/testsuite/test_v_out_lidar.py
./temporal/*
*.sh
raster/*
python/grass/gunittest/*
vector/*

# Maximum time for execution of one test file (not a test function)
# after which test is terminated (which may not terminate child processes
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ repo_status("${CMAKE_CURRENT_LIST_DIR}")

enable_testing()

include(code-coverage)

include(build_module)
include(build_program)
include(build_program_in_subdir)
Expand Down Expand Up @@ -329,3 +331,4 @@ endif()
if(WITH_X11)
build_program_in_subdir(visualization/ximgview DEPENDS grass_gis X11::X11)
endif()
add_code_coverage()
Loading
Loading