Skip to content

Make const what can be const #67

Make const what can be const

Make const what can be const #67

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
image:
- "ubuntu:22.04" # gcc 12.2.0, clang 15.0.7, cmake 3.24.2
- "ubuntu:24.04" # gcc 14.2.0, clang 18.1.3, cmake 3.28.3
- "debian:bookworm" # gcc 12.2.0, clang 15.0.6, cmake 3.25.1
- "debian:trixie" # gcc 14.2.0, clang 19.1.7, cmake 3.31.6
- "debian:testing"
- "debian:experimental"
- "fedora:40"
- "fedora:41"
- "fedora:42"
- "fedora:43"
build_type: [Dev]
cpp_compiler: [g++]
cpp_version: [c++14]
include:
- image: "ubuntu:22.04"
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "ubuntu:24.04"
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "debian:bookworm"
cpp_version: c++20
- image: "debian:bookworm"
c_compiler: clang
cpp_compiler: clang++
- image: "debian:bookworm"
c_compiler: clang
cpp_compiler: clang++
cpp_version: c++20
- image: "debian:bookworm"
build_type: RelWithDebInfo
- image: "debian:trixie"
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "debian:trixie"
cpp_version: c++20
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "debian:trixie"
c_compiler: clang
cpp_compiler: clang++
- image: "debian:trixie"
c_compiler: clang
cpp_compiler: clang++
cpp_version: c++20
- image: "debian:trixie"
build_type: RelWithDebInfo
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "debian:testing"
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
- image: "debian:testing"
c_compiler: clang
cpp_compiler: clang++
- image: "debian:experimental"
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
- image: "debian:experimental"
c_compiler: clang
cpp_compiler: clang++
- image: "fedora:40"
CMAKE_OPTS: -DRUN_TESTS_WITH_BINARY_COMPARE=OFF
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "fedora:41"
CMAKE_OPTS: -DRUN_TESTS_WITH_BINARY_COMPARE=OFF
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
- image: "fedora:42"
CMAKE_OPTS: -DRUN_TESTS_WITH_BINARY_COMPARE=OFF
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
- image: "fedora:43"
CMAKE_OPTS: -DRUN_TESTS_WITH_BINARY_COMPARE=OFF
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
container:
image: ${{ matrix.image }}
env:
LANG: en_US.UTF-8
BUILD_TYPE: ${{ matrix.build_type }}
CC: ${{ matrix.c_compiler }}
CXX: ${{ matrix.cpp_compiler }}
CXXFLAGS: -Werror ${{ matrix.CXXFLAGS }}
LDFLAGS: ${{ matrix.LDFLAGS }}
CPP_VERSION: ${{ matrix.cpp_version }}
WITH_PROJ: ON
APT_LISTCHANGES_FRONTEND: none
DEBIAN_FRONTEND: noninteractive
steps:
- name: Prepare container (apt)
shell: bash
if: startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:')
run: |
apt-get update -qq
apt-get install -yq \
clang \
cmake \
g++ \
git \
libbz2-dev \
libexpat1-dev \
libgdal-dev \
libgeos-dev \
liblz4-dev \
make \
spatialite-bin \
zlib1g-dev
- name: Prepare container (dnf)
shell: bash
if: startsWith(matrix.image, 'fedora:')
run: |
dnf install --quiet --assumeyes \
bzip2-devel \
cmake \
expat-devel \
gcc-c++ \
gdal-devel \
geos-devel \
git \
lz4-devel \
make \
proj-devel \
spatialite-tools \
zlib-devel
- uses: actions/checkout@v4
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
ubuntu-latest:
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
CC: clang-18
CXX: clang++-18
BUILD_TYPE: Dev
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-ubuntu
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
macos:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- macos-14
- macos-15
build_type: [Dev]
include:
- os: macos-15
build_type: Release
env:
CC: clang
CXX: clang++
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-macos
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest