diff --git a/.github/workflows/apt.txt b/.github/workflows/apt.txt index 1191cf541ec..22dc672cdac 100644 --- a/.github/workflows/apt.txt +++ b/.github/workflows/apt.txt @@ -8,6 +8,7 @@ libgdal-dev libgl1-mesa-dev libglu1-mesa-dev liblapacke-dev +libncurses-dev libnetcdf-dev libpdal-dev libpng-dev diff --git a/.github/workflows/build_ubuntu-24.04.sh b/.github/workflows/build_ubuntu-24.04.sh new file mode 100755 index 00000000000..677c46d5f33 --- /dev/null +++ b/.github/workflows/build_ubuntu-24.04.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# The make step requires something like: +# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/lib" +# further steps additionally require: +# export PATH="$PATH:$PREFIX/bin" + +# fail on non-zero return code from a subprocess +set -e + +# print commands +set -x + +if [ -z "$1" ]; then + echo "Usage: $0 PREFIX" + exit 1 +fi + +# Adding -Werror to make's CFLAGS is a workaround for configuring with +# an old version of configure, which issues compiler warnings and +# errors out. This may be removed with upgraded configure.in file. +makecmd="make" +if [[ "$#" -ge 2 ]]; then + ARGS=("$@") + makecmd="make CFLAGS='$CFLAGS ${ARGS[@]:1}' CXXFLAGS='$CXXFLAGS ${ARGS[@]:1}'" +fi + +# non-existent variables as an errors +set -u + +export INSTALL_PREFIX=$1 + +./configure \ + --enable-largefile \ + --prefix="$INSTALL_PREFIX/" \ + --with-blas \ + --with-bzlib \ + --with-cxx \ + --with-fftw \ + --with-freetype \ + --with-freetype-includes="/usr/include/freetype2/" \ + --with-geos \ + --with-lapack \ + --with-libsvm \ + --with-netcdf \ + --with-openmp \ + --with-pdal \ + --with-proj-share=/usr/share/proj \ + --with-pthread \ + --with-readline \ + --with-sqlite \ + --with-tiff \ + --with-zstd + +eval $makecmd +make install diff --git a/.github/workflows/build_ubuntu-24.04_without_x.sh b/.github/workflows/build_ubuntu-24.04_without_x.sh new file mode 100755 index 00000000000..e3475f659e5 --- /dev/null +++ b/.github/workflows/build_ubuntu-24.04_without_x.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# The make step requires something like: +# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/lib" +# further steps additionally require: +# export PATH="$PATH:$PREFIX/bin" + +# fail on non-zero return code from a subprocess +set -e + +# print commands +set -x + +if [ -z "$1" ]; then + echo "Usage: $0 PREFIX" + exit 1 +fi + +# Adding -Werror to make's CFLAGS is a workaround for configuring with +# an old version of configure, which issues compiler warnings and +# errors out. This may be removed with upgraded configure.in file. +makecmd="make" +if [[ "$#" -eq 2 ]]; then + makecmd="make CFLAGS='$CFLAGS $2' CXXFLAGS='$CXXFLAGS $2'" +fi + +# non-existent variables as an errors +set -u + +export INSTALL_PREFIX=$1 + +./configure \ + --enable-largefile \ + --prefix="$INSTALL_PREFIX/" \ + --without-blas \ + --without-lapack \ + --with-bzlib \ + --with-cxx \ + --with-fftw \ + --with-freetype \ + --with-freetype-includes="/usr/include/freetype2/" \ + --with-geos \ + --with-netcdf \ + --with-pdal \ + --with-proj-share=/usr/share/proj \ + --with-readline \ + --with-sqlite \ + --with-tiff \ + --with-zstd \ + --without-openmp \ + --without-pthread + +eval $makecmd +make install diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a8f9fa0bf2e..8d54d24c9ef 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -24,7 +24,7 @@ permissions: jobs: build-cmake: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: CMAKE_VERSION: "3.22.0" steps: @@ -48,6 +48,8 @@ jobs: sudo apt-get update -y sudo apt-get install -y wget git gawk findutils ninja-build libpq-dev \ gettext unixodbc-dev libnetcdf-dev + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests - name: Print build environment variables diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a0edc4e8f60..a3430e81b31 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,7 +19,7 @@ permissions: {} jobs: analyze: name: Analyze - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: security-events: write actions: read @@ -53,6 +53,8 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y wget git gawk findutils + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 @@ -79,9 +81,9 @@ jobs: - name: Build if: ${{ matrix.language == 'c-cpp' }} env: - CFLAGS: -std=gnu11 - CXXFLAGS: -std=c++11 - run: .github/workflows/build_ubuntu-22.04.sh "${HOME}/install" + CFLAGS: -std=gnu17 + CXXFLAGS: -std=c++17 + run: .github/workflows/build_ubuntu-24.04.sh "${HOME}/install" - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 81a8d32403b..b94e6389dd4 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -14,7 +14,7 @@ permissions: # https://github.com/OSGeo/PROJ/blob/905c9a6c2da3dc6b7aa2c89d3ab78d9d1a9cd070/.github/workflows/coverity-scan.yml jobs: coverity: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.repository == 'OSGeo/grass' steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -25,6 +25,8 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y wget git gawk findutils + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index bb4d0111b8b..f9bce6399c4 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -19,7 +19,7 @@ jobs: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: PYTHONWARNINGS: always # renovate: datasource=python-version depName=python @@ -42,6 +42,8 @@ jobs: graphviz \ libpq-dev \ unixodbc-dev + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' "grass/.github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 78116f60264..b99fdd86e3c 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -20,7 +20,7 @@ jobs: matrix.c }}-${{ matrix.cpp }} cancel-in-progress: true - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: include: @@ -36,6 +36,8 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y wget git gawk findutils + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests - name: Create installation directory diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 65cd9bf8919..49a7661603d 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -21,7 +21,7 @@ jobs: strategy: matrix: os: - - ubuntu-22.04 + - ubuntu-24.04 python-version: - "3.10" - "3.13" @@ -49,6 +49,8 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y wget git gawk findutils + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests @@ -57,9 +59,10 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install -r .github/workflows/python_requirements.txt - pip install -r .github/workflows/optional_requirements.txt - pip install pytest pytest-timeout pytest-github-actions-annotate-failures pytest-xdist pytest-cov + pip install --break-system-packages -r .github/workflows/python_requirements.txt + pip install --break-system-packages -r .github/workflows/optional_requirements.txt + pip install --break-system-packages pytest pytest-timeout \ + pytest-github-actions-annotate-failures pytest-xdist pytest-cov - name: Create installation directory run: | diff --git a/.github/workflows/python-code-quality.yml b/.github/workflows/python-code-quality.yml index dd9b613d6bd..34324e6d22f 100644 --- a/.github/workflows/python-code-quality.yml +++ b/.github/workflows/python-code-quality.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: include: - - os: ubuntu-22.04 + - os: ubuntu-24.04 env: # renovate: datasource=python-version depName=python @@ -65,10 +65,10 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: pip # zizmor: ignore[cache-poisoning] Not creating release artifacts, less of a concern here - name: Upgrade pip - run: python -m pip install --upgrade pip + run: python -m pip install --break-system-packages --upgrade pip - name: Install Ruff - run: pip install "ruff==${RUFF_VERSION}" + run: pip install --break-system-packages "ruff==${RUFF_VERSION}" - name: Run Ruff (output annotations on fixable errors) run: ruff check --output-format=github . --preview --unsafe-fixes continue-on-error: true @@ -97,14 +97,16 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y wget git gawk findutils + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests - name: Install Python dependencies run: | - pip install -r .github/workflows/python_requirements.txt - pip install -r .github/workflows/optional_requirements.txt - pip install --user pipx + pip install --break-system-packages -r .github/workflows/python_requirements.txt + pip install --break-system-packages -r .github/workflows/optional_requirements.txt + pip install --break-system-packages --user pipx pipx ensurepath pipx install "flake8==${FLAKE8_VERSION}" pipx install "pylint==${PYLINT_VERSION}" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bf9db6958b3..9b8d86e71a6 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: name: - - "22.04" + - "24.04" - minimum config # Only run tests for these folders in this matrix job. @@ -50,15 +50,15 @@ jobs: testsuite utils vector visualization include: - - name: "22.04" - os: ubuntu-22.04 - config: ubuntu-22.04 + - name: "24.04" + os: ubuntu-24.04 + config: ubuntu-24.04 # This is without optional things but it still keeps things useful, # so, e.g., without OpenMP, but with PDAL. Code or tests should be written # so that test pass even when these optional things are not present. - name: minimum config - os: ubuntu-22.04 - config: ubuntu-22.04_without_x + os: ubuntu-24.04 + config: ubuntu-24.04_without_x fail-fast: false steps: @@ -108,6 +108,8 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y wget git gawk findutils + LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable + sudo apt-get update -y xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ sudo apt-get install -y --no-install-recommends --no-install-suggests