Skip to content

Commit

Permalink
Merge branch 'osgeo-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
a0x8o committed Jun 27, 2024
2 parents 5d89269 + 5806596 commit f63bf6c
Show file tree
Hide file tree
Showing 1,424 changed files with 74,304 additions and 1,922 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Generate release notes using git log
run: |
python -m pip install PyYAML
python -m pip install PyYAML requests
# Git works without any special permissions.
# Using current branch or the branch against the PR is open.
# Using the last 30 commits (for branches, tags, and PRs).
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
formatting-check:
Expand All @@ -22,7 +22,7 @@ jobs:
- uses: DoozyX/clang-format-lint-action@11b773b1598aa4ae3b32f023701bca5201c3817d # v0.17
with:
source: "."
clangFormatVersion: 15
clangFormatVersion: 17
inplace: True
- name: Create and uploads code suggestions to apply
id: diff
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
- .github/**
- utils/**

concurrency:
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

env:
OUT_DIR: ${{ github.workspace }}/../grass_outdir
GRASS: grass-${{ github.ref_name }}
Expand Down Expand Up @@ -68,7 +73,7 @@ jobs:
sha256sum ${{ env.GRASS }}.tar.xz > ${{ env.GRASS }}.tar.xz.sha256
- name: Publish draft distribution to GitHub (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2.0.6
with:
name: GRASS GIS ${{ github.ref_name }}
body: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
with:
push: true
pull: true
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
labeler:
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: git status --ignored
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
commit-message: "config.guess + config.sub: updated from http://git.savannah.gnu.org/cgit/config.git/plain/"
branch: periodic/update-configure
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,21 @@ jobs:
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh

- name: Run pytest
- name: Run pytest with multiple workers in parallel
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --verbose --color=yes --durations=0 --durations-min=0.5 --numprocesses auto -ra .
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
--numprocesses auto -ra . \
-m 'not needs_solo_run'
- name: Run pytest with a single worker (for tests marked with needs_solo_run)
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
-ra . \
-m 'needs_solo_run'
- name: Print installed versions
if: always()
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# renovate: datasource=pypi depName=black
BLACK_VERSION: "24.4.2"
# renovate: datasource=pypi depName=flake8
FLAKE8_VERSION: "5.0.4"
FLAKE8_VERSION: "7.1.0"
# renovate: datasource=pypi depName=pylint
PYLINT_VERSION: "2.12.2"
# renovate: datasource=pypi depName=bandit
Expand Down Expand Up @@ -87,9 +87,13 @@ jobs:
run: |
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install flake8==${{ env.FLAKE8_VERSION }}
pip install pylint==${{ env.PYLINT_VERSION }} pytest-github-actions-annotate-failures
pip install bandit[sarif]==${{ env.BANDIT_VERSION }}
pip install --user pipx
pipx ensurepath
pipx install flake8==${{ env.FLAKE8_VERSION }}
pipx install pylint==${{ env.PYLINT_VERSION }}
pipx inject pylint -r .github/workflows/python_requirements.txt -r .github/workflows/optional_requirements.txt
# The extra toml is only needed before Python 3.11
pipx install bandit[sarif,toml]==${{ env.BANDIT_VERSION }}
- name: Run Flake8
run: |
Expand Down Expand Up @@ -146,7 +150,8 @@ jobs:
- name: Run Pylint on other files using pytest
run: |
pip install pytest==7.4.4 pytest-pylint==0.19
pipx inject --include-apps pylint pytest==7.4.4
pipx inject pylint pytest-pylint==0.19 pytest-github-actions-annotate-failures
echo "::warning file=.github/workflows/python-code-quality.yml,line=149,col=42,endColumn=48::\
Temporarily downgraded pytest-pylint and pytest to allow merging other PRs.\
The errors reported with a newer version seem legitimite and should be fixed \
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
DEFAULT_BRANCH: main
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# By default, super-linter expect all linters to have their config
# files inside .github/linters.
# Setting it to the root of the repo for easier configuration here.
LINTER_RULES_PATH: .
# Listed but commented out linters would be nice to have.
# (see https://github.com/github/super-linter#environment-variables)
#
Expand All @@ -52,3 +56,5 @@ jobs:
VALIDATE_POWERSHELL: true
# VALIDATE_XML: true
VALIDATE_YAML: true
MARKDOWN_CONFIG_FILE: .markdownlint.yml
YAML_CONFIG_FILE: .yamllint
28 changes: 28 additions & 0 deletions .github/workflows/titles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Validate Titles

on:
pull_request_target:
types:
- edited
# The following types are default for pull_request_target
- opened
- synchronize
- reopened

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
validate-titles:
runs-on: ubuntu-latest
steps:
- name: Checkout base repository (doesn't include the PR changes)
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Call PR title validation function
run: python utils/generate_release_notes.py check "${PR_TITLE}" "" ""
env:
PR_TITLE: ${{ github.event.pull_request.title }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/emacs.desktop
*~
*.lock
!flake.lock
*.pyc
OBJ.*
locale/scriptstrings/*
Expand Down
3 changes: 3 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---

default: true

# Fix any fixable errors (depending on the markdownlint wrapper tool used)
fix: true
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
- id: markdownlint-fix
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
Expand All @@ -49,7 +49,7 @@ repos:
python/libgrass_interface_generator/
)
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 7.1.0
hooks:
- id: flake8
exclude: |
Expand All @@ -58,7 +58,7 @@ repos:
.*/testsuite/.*
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.7
rev: v17.0.6
hooks:
- id: clang-format
types_or: [c, c++, javascript, json, objective-c]
Expand Down
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,33 @@
# Author: Ivan Mincik, ivan.mincik@gmail.com (linux)
# Rainer M. Krug, Rainer@krugs.de (osx)

os: linux
dist: jammy
language: c
cache: ccache

matrix:
# safelist
branches:
only:
- main
- releasebranch*

jobs:
include:
- os: linux
dist: focal
compiler: gcc
sudo: required
env: CC=gcc CXX=g++

- os: linux
dist: focal
compiler: clang
sudo: required
env: CC=clang CXX=clang++

env:
global:
- CFLAGS="-Werror=implicit-function-declaration"
- CXXFLAGS="-std=c++11"
- CXXFLAGS="-std=c++17"
- GRASS_EXTRA_CFLAGS="-Werror -fPIC -Wfatal-errors"
- GRASS_EXTRA_CXXFLAGS="-Werror -fPIC -Wfatal-errors"

before_install:
- ./.travis/$TRAVIS_OS_NAME.before_install.sh
Expand All @@ -32,9 +38,3 @@ install:

script:
- ./.travis/$TRAVIS_OS_NAME.script.sh

after_success:
- bash < (curl -s https://codecov.io/bash)

notifications:
irc: chat.freenode.net#grass
2 changes: 1 addition & 1 deletion .travis/linux.before_install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# Author: Ivan Mincik, ivan.mincik@gmail.com

set -e
Expand Down
54 changes: 5 additions & 49 deletions .travis/linux.install.sh
Original file line number Diff line number Diff line change
@@ -1,53 +1,9 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# Author: Ivan Mincik, ivan.mincik@gmail.com

set -e

sudo apt-get install --no-install-recommends \
libcairo2-dev \
libfftw3-dev \
libfreetype6-dev \
libgdal-dev \
libgeos-dev \
libglu1-mesa-dev \
libgsl-dev \
libjpeg-dev \
liblapack-dev \
libncurses5-dev \
libnetcdf-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpdal-dev \
libpdal-plugin-python \
libpng-dev \
libmysqlclient-dev \
libpq-dev \
libproj-dev \
libreadline-dev \
libsqlite3-dev \
libtiff-dev \
libxmu-dev \
libzstd-dev \
python3 \
python3-dateutil \
python3-dev \
python3-numpy \
python3-pil \
python3-pip \
python3-ply \
python-wxgtk3.0 \
unixodbc-dev \
libnetcdf-dev \
autoconf2.13 \
autotools-dev \
debhelper \
ccache \
fakeroot \
flex \
bison \
netcdf-bin \
dpatch \
libblas-dev \
pdal \
proj-bin \
proj-data
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
12 changes: 8 additions & 4 deletions .travis/linux.script.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# Author: Ivan Mincik, ivan.mincik@gmail.com

set -e

export CC="ccache $CC"
export CXX="ccache $CXX"
export MAKEFLAGS="-j $(nproc) --no-keep-going"

echo "MAKEFLAGS is '$MAKEFLAGS'"

./configure --host=x86_64-linux-gnu \
--build=x86_64-linux-gnu \
--prefix=/usr/lib \
Expand All @@ -28,7 +32,7 @@ export CXX="ccache $CXX"
--with-freetype-includes=/usr/include/freetype2/ \
--with-postgres-includes=/usr/include/postgresql/ \
--with-proj-share=/usr/share/proj \
--with-python \
--with-cairo
--with-cairo \
--with-pdal

make -j2
make CFLAGS="$CFLAGS $GRASS_EXTRA_CFLAGS" CXXFLAGS="$CXXFLAGS $GRASS_EXTRA_CXXFLAGS"
Loading

0 comments on commit f63bf6c

Please sign in to comment.