Raster store refactoring #116
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_MAXSIZE: 1G | |
| jobs: | |
| build-and-test: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: gcc-14-normal | |
| cc: gcc-14 | |
| cxx: g++-14 | |
| build_type: Release | |
| sanitizer: normal | |
| warnings_as_errors: OFF | |
| cmake_flags: "" | |
| - name: gcc-16-normal | |
| cc: gcc-16 | |
| cxx: g++-16 | |
| build_type: Release | |
| sanitizer: normal | |
| warnings_as_errors: ON | |
| cmake_flags: "" | |
| - name: clang-23-asan | |
| cc: clang-23 | |
| cxx: clang++-23 | |
| build_type: RelWithDebInfo | |
| sanitizer: asan | |
| warnings_as_errors: ON | |
| cmake_flags: -DALP_ENABLE_ADDRESS_SANITIZER=ON | |
| - name: clang-23-tsan | |
| cc: clang-23 | |
| cxx: clang++-23 | |
| build_type: RelWithDebInfo | |
| sanitizer: tsan | |
| warnings_as_errors: ON | |
| cmake_flags: -DALP_ENABLE_THREAD_SANITIZER=ON | |
| - name: clang-23-unity | |
| cc: clang-23 | |
| cxx: clang++-23 | |
| build_type: Release | |
| sanitizer: normal | |
| warnings_as_errors: ON | |
| cmake_flags: -DALP_ENABLE_UNITY_BUILD=ON | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| ccache \ | |
| extra-cmake-modules \ | |
| libcurl4-openssl-dev \ | |
| libegl1-mesa-dev \ | |
| libgl1-mesa-dev \ | |
| libglm-dev \ | |
| libgmp-dev \ | |
| libjpeg-dev \ | |
| libmpfr-dev \ | |
| libpng-dev \ | |
| libsqlite3-dev \ | |
| libtbb-dev \ | |
| libtiff-dev \ | |
| libwayland-bin \ | |
| libwayland-dev \ | |
| libxkbcommon-dev \ | |
| ninja-build \ | |
| pkg-config \ | |
| sqlite3 \ | |
| wayland-protocols \ | |
| xorg-dev \ | |
| zlib1g-dev | |
| - name: Install LLVM 23 | |
| if: matrix.cxx == 'clang++-23' | |
| run: | | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc > /dev/null | |
| echo "deb https://apt.llvm.org/noble/ llvm-toolchain-noble-23 main" | sudo tee /etc/apt/sources.list.d/llvm-23.list | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends clang-23 lld-23 llvm-23 libclang-rt-23-dev | |
| - name: Install GCC ${{ matrix.cxx }} | |
| if: matrix.cxx == 'g++-16' | |
| run: | | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ${{ matrix.cc }} ${{ matrix.cxx }} | |
| - name: Restore installed CMake dependencies | |
| id: cmake_dependency_cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: | | |
| build/alp_external/boost | |
| build/alp_external/proj | |
| build/alp_external/gdal | |
| build/alp_external/cgal | |
| build/alp_external/opencv | |
| key: ${{ runner.os }}-alp-installs-${{ matrix.name }}-${{ matrix.build_type }}-${{ matrix.sanitizer }}-${{ hashFiles('CMakeLists.txt', 'src/CMakeLists.txt', 'cmake/*.cmake') }} | |
| restore-keys: | | |
| ${{ runner.os }}-alp-installs-${{ matrix.name }}-${{ matrix.build_type }}-${{ matrix.sanitizer }}- | |
| - name: Restore ccache | |
| id: ccache_cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ${{ runner.os }}-ccache-${{ matrix.name }}-${{ matrix.sanitizer }}-${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache-${{ matrix.name }}-${{ matrix.sanitizer }}-${{ github.ref_name }}- | |
| ${{ runner.os }}-ccache-${{ matrix.name }}-${{ matrix.sanitizer }}- | |
| - name: Configure ccache | |
| run: | | |
| ccache --max-size="${CCACHE_MAXSIZE}" | |
| ccache --zero-stats | |
| - name: Configure CMake | |
| run: > | |
| cmake | |
| -S "${{ github.workspace }}" | |
| -B "${{ github.workspace }}/build" | |
| -G Ninja | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_C_COMPILER=${{ matrix.cc }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| -DALP_WARNINGS_AS_ERRORS=${{ matrix.warnings_as_errors }} | |
| ${{ matrix.cmake_flags }} | |
| - name: Save installed CMake dependencies | |
| if: steps.cmake_dependency_cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: | | |
| build/alp_external/boost | |
| build/alp_external/proj | |
| build/alp_external/gdal | |
| build/alp_external/cgal | |
| build/alp_external/opencv | |
| key: ${{ runner.os }}-alp-installs-${{ matrix.name }}-${{ matrix.build_type }}-${{ matrix.sanitizer }}-${{ hashFiles('CMakeLists.txt', 'src/CMakeLists.txt', 'cmake/*.cmake') }} | |
| - name: Build all targets | |
| run: cmake --build "${{ github.workspace }}/build" --config ${{ matrix.build_type }} --parallel --target all | |
| - name: ccache stats | |
| if: always() | |
| run: ccache --show-stats | |
| - name: Save ccache | |
| if: always() | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ${{ runner.os }}-ccache-${{ matrix.name }}-${{ matrix.sanitizer }}-${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Cache unit test data | |
| id: terrain_builder_unittest_data | |
| uses: actions/cache@v6 | |
| with: | |
| path: unittests/data | |
| key: terrain-builder-unittest-data-v1 | |
| - name: Download unit test data | |
| if: steps.terrain_builder_unittest_data.outputs.cache-hit != 'true' | |
| run: wget -qO- https://gataki.cg.tuwien.ac.at/raw/terrain_builder_unittest_data.tar.gz | tar xz -C unittests | |
| - name: Run unit tests | |
| working-directory: ${{ github.workspace }}/build | |
| run: | | |
| export PROJ_DATA="${{ github.workspace }}/build/alp_external/proj/share/proj" | |
| export PROJ_LIB="${PROJ_DATA}" | |
| export GDAL_DATA="${{ github.workspace }}/build/alp_external/gdal/share/gdal" | |
| if [[ "${{ matrix.sanitizer }}" == "asan" ]]; then | |
| export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-23 | |
| fi | |
| if [[ "${{ matrix.sanitizer }}" == "tsan" ]]; then | |
| export TSAN_OPTIONS="suppressions=${{ github.workspace }}/extern/tbb/cmake/suppressions/tsan.suppressions" | |
| fi | |
| status=0 | |
| ./unittests/unittests_terrainlib "~mesh::clip_on_bounds benchmark" || status=$? | |
| ./unittests/unittests_tilebuilder || status=$? | |
| ./unittests/unittests_sfbuilder || status=$? | |
| ./unittests/unittests_dagbuilder || status=$? | |
| ./unittests/unittests_sfmerger || status=$? | |
| exit $status |