lib/manage: Fix Resource Leak Issue in do_copy.c (#5132) #47
This file contains 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: Documentation | |
# Builds Markdown documentation for core and addons. | |
on: | |
push: | |
branches: | |
- main | |
- releasebranch_* | |
pull_request: | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
ubuntu: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
runs-on: ubuntu-22.04 | |
env: | |
PYTHONWARNINGS: always | |
# renovate: datasource=python-version depName=python | |
PYTHON_VERSION: "3.12" | |
steps: | |
- name: Checkout core | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: OSGeo/grass | |
path: grass | |
- name: Get dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y wget git gawk findutils | |
xargs -a <(awk '! /^ *(#|$)/' "grass/.github/workflows/apt.txt") -r -- \ | |
sudo apt-get install -y --no-install-recommends --no-install-suggests | |
- name: Set up Python | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: pip | |
- name: Create installation directory | |
run: | | |
mkdir "$HOME/install" | |
- name: Set number of cores for compilation | |
run: | | |
echo "MAKEFLAGS=-j$(nproc)" >> "$GITHUB_ENV" | |
- name: Set LD_LIBRARY_PATH for compilation | |
run: | | |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> "$GITHUB_ENV" | |
- name: Build core | |
run: | | |
cd grass | |
../grass/.github/workflows/build_ubuntu-22.04.sh "$HOME/install" | |
- name: Add the bin directory to PATH | |
run: | | |
echo "$HOME/install/bin" >> "$GITHUB_PATH" | |
- name: Print installed versions | |
if: always() | |
run: ./grass/.github/workflows/print_versions.sh | |
- name: Test executing of the grass command | |
run: ./grass/.github/workflows/test_simple.sh | |
- name: Set version variables | |
run: | | |
cd grass | |
eval $(./utils/update_version.py status --bash) | |
echo "MAJOR=$MAJOR" >> $GITHUB_ENV | |
echo "MINOR=$MINOR" >> $GITHUB_ENV | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "YEAR=$YEAR" >> $GITHUB_ENV | |
- name: Checkout addons | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: OSGeo/grass-addons | |
ref: grass${{ env.MAJOR }} | |
path: grass-addons | |
- name: Compile addons | |
continue-on-error: true | |
run: | | |
./grass-addons/utils/cronjobs_osgeo_lxd/compile_addons_git.sh \ | |
"$MAJOR" \ | |
"$MINOR" \ | |
$(pwd)/grass-addons/src \ | |
$(grass --config path) \ | |
$(pwd)/addons-build-dir \ | |
grass | |
- name: Get target path for Markdown files | |
run: | | |
echo MKDOCS_DIR="$(grass --config path)/docs/mkdocs" >> "$GITHUB_ENV" | |
- name: Move from build to target directory | |
continue-on-error: true | |
run: | | |
mkdir -p "$MKDOCS_DIR/source/addons" | |
mv addons-build-dir/docs/md/source/* "$MKDOCS_DIR/source/addons" | |
- name: Rebuild keywords | |
continue-on-error: true | |
run: | | |
export ARCH="linux" | |
export ARCH_DISTDIR="$(grass --config path)" | |
export TOP_DOCS_DIR="${ARCH_DISTDIR}/docs" | |
export VERSION_NUMBER="$VERSION" | |
grass --tmp-project XY --exec python grass/man/build_keywords.py "$TOP_DOCS_DIR" "$MKDOCS_DIR/source/addons" | |
- name: Get mkdocs | |
run: | | |
pip install -r "grass/man/mkdocs/requirements.txt" | |
- name: Run mkdocs | |
run: | | |
cd grass | |
eval $(./utils/update_version.py status --bash) | |
cd .. | |
export SITE_NAME="GRASS GIS $VERSION Reference Manual" | |
export COPYRIGHT="© 2003-$YEAR GRASS Development Team, GRASS GIS $VERSION Reference Manual" | |
cd $MKDOCS_DIR | |
mkdocs build | |
- name: Make logs available | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | |
with: | |
name: grass-addon-build-logs | |
if-no-files-found: warn | |
path: addons-build-dir/docs/logs | |
retention-days: 3 | |
- name: Make the result available | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | |
with: | |
name: mkdocs-site | |
if-no-files-found: error | |
path: ${{ env.MKDOCS_DIR }}/site | |
retention-days: 3 |