diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index a338983ca6c9..000000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: ♻ Backport -on: - pull_request_target: - types: - - closed - - labeled - -permissions: - contents: read - -jobs: - backport: - runs-on: ubuntu-22.04 - name: Backport - - permissions: - pull-requests: write - - steps: - - name: Backport Bot - id: backport - if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( join( github.event.pull_request.labels.*.name ), 'backport') ) || contains( github.event.label.name, 'backport' ) ) - uses: m-kuhn/backport@v1.2.7 - with: - github_token: ${{ secrets.GH_TOKEN_BOT }} diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml deleted file mode 100644 index a49d28af767d..000000000000 --- a/.github/workflows/build-docker.yml +++ /dev/null @@ -1,184 +0,0 @@ -name: 🐳 Build Docker images for current branches - -# on commits to this file, schedule and dispatch runs, the workflow will build the 3 different Docker images (master, PR, LTR) -# on tags, it will build only the image of the given tag -# this is made by using a matrix defined in a dedicated job -on: - push: - tags: - - final-* - branches: - - master - paths: - - .github/workflows/build-docker.yml - schedule: - # runs every day - - cron: '0 0 * * *' - workflow_dispatch: - # POST https://api.github.com/repos/qgis/QGIS/actions/workflows/2264135/dispatches: - -permissions: - contents: read - -jobs: - define-strategy: - permissions: - contents: none - if: github.repository_owner == 'qgis' - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.matrix.outputs.matrix }} - steps: - - id: matrix - run: | - if [[ "${GITHUB_REF}" =~ ^refs/tags ]]; then - echo "matrix={\"branch\":[\"${GITHUB_REF##*/}\"]}" >> $GITHUB_OUTPUT - else - echo "matrix={\"branch\":[\"master\", \"release-3_34\", \"release-3_36\"]}" >> $GITHUB_OUTPUT - fi - - build-docker: - if: github.repository_owner == 'qgis' - runs-on: ubuntu-latest - needs: define-strategy - - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - CC: /usr/lib/ccache/gcc - CXX: /usr/lib/ccache/g++ # Building SIP binding freezes with Clang in Docker, maybe a SIP issue, maybe not - DOCKER_BUILD_DEPS_FILE: qgis3-qt5-build-deps.dockerfile - - strategy: - fail-fast: false - matrix: ${{ fromJSON( needs.define-strategy.outputs.matrix ) }} - - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: true - large-packages: true - docker-images: false - swap-storage: true - - - name: Free additional space - run: | - df -h - rm -rf /tmp/workspace - rm -rf /usr/share/dotnet/sdk - sudo apt remove llvm-* ghc-* google-chrome-* dotnet-sdk-* - dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 - du -a /usr/share | sort -n -r | head -n 10 - du -a /usr/local/share | sort -n -r | head -n 10 - df -h - sudo apt clean - df -h - - - name: Cache - id: cache - uses: actions/cache@v4 - with: - path: ~/.ccache - key: docker-build-${{ matrix.branch }}-${{ github.sha }} - restore-keys: | - docker-build-${{ matrix.branch }}- - docker-build-master- - - - name: checkout ${{ matrix.branch }} - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - - - name: Define vars - env: - branch: ${{ matrix.branch }} - run: | - export DOCKER_TAG=${branch//master/latest} - export DOCKER_DEPS_TAG=${DOCKER_TAG} - - # add vars for next steps - echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV - echo "DOCKER_DEPS_TAG=${DOCKER_DEPS_TAG}" >> $GITHUB_ENV - - echo "branch: ${branch}" - echo "docker tag: ${DOCKER_TAG}" - echo "docker deps tag: ${DOCKER_DEPS_TAG}" - - - name: Copy cache - run: | - [[ -d ~/.ccache ]] && echo "cache directory (~/.ccache) exists" || mkdir -p ~/.ccache - # copy ccache dir within QGIS source so it can be accessed from docker - cp -r ~/.ccache/. ./.ccache_image_build - - - name: QGIS deps Docker pull/rebuild - run: | - cd .docker - docker --version - docker pull "qgis/qgis3-build-deps:${DOCKER_DEPS_TAG}" || true - docker build --cache-from "qgis/qgis3-build-deps:${DOCKER_DEPS_TAG}" -t "qgis/qgis3-build-deps:${DOCKER_DEPS_TAG}" -f ${DOCKER_BUILD_DEPS_FILE} . - echo "push to qgis/qgis3-build-deps:${DOCKER_DEPS_TAG}" - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - docker push "qgis/qgis3-build-deps:${DOCKER_DEPS_TAG}" - - - name: Docker QGIS build - run: | - cd .docker - DOCKER_BUILD_ARGS="--build-arg DOCKER_DEPS_TAG --build-arg CC --build-arg CXX" - docker build ${DOCKER_BUILD_ARGS} \ - --cache-from "qgis/qgis:${DOCKER_TAG}" \ - -t "qgis/qgis:BUILDER" \ - -f qgis.dockerfile .. - - - name: Tag container and copy cache - run: | - docker run --name qgis_container qgis/qgis:BUILDER /bin/true - docker cp qgis_container:/QGIS/build_exit_value ./build_exit_value - - if [[ $(cat ./build_exit_value) != "OK" ]]; then - echo "Build failed, not pushing image" - exit 1 - fi - - echo "Copy build cache from Docker container to Travis cache directory" - rm -rf ~/.ccache/* - mkdir -p ~/.ccache - docker cp qgis_container:/QGIS/.ccache_image_build/. ~/.ccache - echo "Cache size: "$(du -sh ~/.ccache) - - - name: Finalize image - run: | - cd .docker - # enable experimental features in Docker to squash - echo '{ "experimental": true}' | sudo tee /etc/docker/daemon.json - sudo service docker restart - docker build ${DOCKER_BUILD_ARGS} \ - --cache-from "qgis/qgis:BUILDER" \ - --squash \ - -t "qgis/qgis:${DOCKER_TAG}" \ - -f qgis.dockerfile .. - - - name: Pushing image to docker hub - run: | - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - docker push "qgis/qgis:${DOCKER_TAG}" - - - name: Trigger PyQGIS API docs build for ${{ matrix.branch }} - if: success() && !startsWith(github.ref, 'refs/tags/') - env: - branch: ${{ matrix.branch }} - run: | - body='{ - "ref": "master", - "inputs": {"qgis_branch": "__QGIS_VERSION_BRANCH__"} - }' - body=$(sed "s/__QGIS_VERSION_BRANCH__/${branch}/;" <<< $body) - curl -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${GH_TOKEN}" \ - https://api.github.com/repos/qgis/pyqgis/actions/workflows/2246440/dispatches \ - -d "${body}" - - - diff --git a/.github/workflows/build_artifact_comment.yml b/.github/workflows/build_artifact_comment.yml deleted file mode 100644 index cfc6692772f1..000000000000 --- a/.github/workflows/build_artifact_comment.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Write build artifact comments - -on: - workflow_run: - workflows: [🪟 MingW64 Windows 64bit Build] - types: - - completed - branches-ignore: - - 'master' - - 'release*' - -permissions: - contents: read - -jobs: - on-success: - - permissions: - pull-requests: write - - runs-on: ubuntu-latest - steps: - - name: 'Download artifact' - id: download_artifact - uses: actions/github-script@v7 - with: - script: | - let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id, - }); - let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => { - return artifact.name == "QGIS for Windows 64bit" - }); - if (matchArtifacts.length>0) - { - let download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifacts[0].id, - archive_format: 'zip', - }); - let fs = require('fs'); - fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/QGIS for Windows 64bit.zip`, Buffer.from(download.data)); - core.setOutput('artifact_id', matchArtifacts[0].id); - } - else - { - core.setOutput('artifact_id', 0); - } - let matchArtifactsDebugSymbols = allArtifacts.data.artifacts.filter((artifact) => { - return artifact.name == "QGIS for Windows 64bit Debug Symbols" - }); - if (matchArtifactsDebugSymbols.length>0) - { - core.setOutput('debug_symbols_artifact_id', matchArtifactsDebugSymbols[0].id); - } - else - { - core.setOutput('debug_symbols_artifact_id', 0); - } - - - name: 'Unzip artifact' - if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0 - run: | - unzip "QGIS for Windows 64bit.zip" - unzip -j qgis-portable-win64.zip pr_number git_commit - - - name: 'Post artifact download link as comment on PR' - if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0 - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - let fs = require('fs'); - let issue_number = Number(fs.readFileSync('./pr_number')); - let git_sha = String(fs.readFileSync('./git_commit')).trim(); - const prComments = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue_number, - }); - const PREFIX = "## 🪟 Windows builds ready!"; - let body = PREFIX + "\n\n" + - "Windows builds of this PR are available for testing [here](https://github.com/" + context.repo.owner + "/" + context.repo.repo + "/suites/" + context.payload.workflow_run.check_suite_id + "/artifacts/${{steps.download_artifact.outputs.artifact_id}})."; - if ( ${{steps.download_artifact.outputs.debug_symbols_artifact_id}} > 0 ) - { - body += " Debug symbols for this build are available [here](https://github.com/" + context.repo.owner + "/" + context.repo.repo + "/suites/" + context.payload.workflow_run.check_suite_id + "/artifacts/${{steps.download_artifact.outputs.debug_symbols_artifact_id}})."; - } - body += "\n\n*(Built from commit " + git_sha + ")*"; - - const winBuildComment = prComments.data?.find(c => c.body.startsWith(PREFIX)); - if (!!winBuildComment) { - // update the existing comment - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: winBuildComment.id, - body: body - }); - } else { - // submit a new comment - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue_number, - body: body - }); - } diff --git a/.github/workflows/code_layout.yml b/.github/workflows/code_layout.yml index 337d31b49ead..64817189e46e 100644 --- a/.github/workflows/code_layout.yml +++ b/.github/workflows/code_layout.yml @@ -27,7 +27,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install requirements run: | wget https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz @@ -65,8 +65,8 @@ jobs: uses: actions/checkout@v4 - name: Install Requirements run: | - sudo apt install -y \ - shellcheck + sudo apt install -y \ + shellcheck - name: Run Shellcheck run: ./tests/code_layout/test_shellcheck.sh @@ -154,25 +154,41 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Install Requirements run: | sudo apt install -y \ expect \ silversearcher-ag - - uses: tj-actions/changed-files@v42 + + - name: Retrieve changed files + uses: tj-actions/changed-files@v43 id: changed_files with: - separator: ' ' - files_ignore: | - **/*.sip.in - **/*.png - **/*.svg - **/*.tif* - **/*.gpkg - **/*.qgz - **/*.qgs + separator: " " + # files_ignore: | + # **/*.sip.in + # **/*.png + # **/*.svg + # **/*.tif* + # **/*.gpkg + # **/*.qgz + # **/*.qgs + + - name: Echo list + if: steps.changed_files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + run: | + echo "=============================================================================" >/dev/stderr \ + && echo "$ALL_CHANGED_FILES" >/dev/stderr \ + && echo "=============================================================================" >/dev/stderr + - name: Spell Test - run: ./scripts/spell_check/check_spelling.sh -r "${{ steps.changed_files.outputs.all_changed_files }}" + if: steps.changed_files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + run: echo "$ALL_CHANGED_FILES" | ./scripts/spell_check/check_spelling.sh sip_check: runs-on: ubuntu-latest diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml deleted file mode 100644 index 2f6cf6fc72fd..000000000000 --- a/.github/workflows/flake8.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: ❄ Flake8 - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - push: - paths: - - '**.py' - pull_request: - paths: - - '**.py' - -permissions: - contents: read - -jobs: - flake8_py3: - name: Python Lint - runs-on: ubuntu-latest - steps: - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.7 - architecture: x64 - - name: Checkout - uses: actions/checkout@v4 - - name: Run flake8 - uses: julianwachholz/flake8-action@v2.0.2 - with: - checkName: 'Python Lint' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml deleted file mode 100644 index 97776a563129..000000000000 --- a/.github/workflows/macos-build.yml +++ /dev/null @@ -1,138 +0,0 @@ -name: 🍏 Mac OS build - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - release-** - - queued_ltr_backports - paths: - pull_request: - branches: - - master - - release-** - - queued_ltr_backports - paths: - -permissions: - contents: read - -env: - QT_VERSION: 5.15.2 - QGIS_DEPS_VERSION: 0.9 - QGIS_DEPS_PATCH_VERSION: 0 - CCACHE_DIR: /Users/runner/work/ccache - BUILD_DIR: /Users/runner/work/QGIS/build-QGIS - # apparently we cannot cache /opt directory as it fails to restore - # so we copy the deps in the home directory - DEPS_CACHE_DIR: /Users/runner/work/deps-cache - -jobs: - mac_os_build: - if: github.repository == 'qgis/QGIS' - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Restore build cache - uses: actions/cache/restore@v4 - with: - path: ${{ env.CCACHE_DIR }} - key: build-ccache-mac-${{ github.event.pull_request.base.ref || github.ref_name }} - restore-keys: | - build-ccache-mac-master - - - name: Cache Qt - id: cache-qt - uses: actions/cache@v4 - with: - path: ${{ env.DEPS_CACHE_DIR }}/Qt/${{ env.QT_VERSION }} - key: mac-qt-${{ env.QT_VERSION }} - - - name: Restore Qt - if: steps.cache-qt.outputs.cache-hit == 'true' - run: | - sudo mkdir -p /opt - sudo mkdir -p /opt/Qt - sudo cp -r ${DEPS_CACHE_DIR}/Qt/${QT_VERSION} /opt/Qt/${QT_VERSION} - - - name: Download Qt - if: steps.cache-qt.outputs.cache-hit != 'true' - run: | - wget https://qgis.org/downloads/macos/deps/qt-${QT_VERSION}.tar.gz - mkdir -p ${DEPS_CACHE_DIR} - mkdir -p ${DEPS_CACHE_DIR}/Qt - - - # QGIS-deps caching - - name: Cache qgis-deps - id: cache-deps - uses: actions/cache@v4 - with: - path: ${{ env.DEPS_CACHE_DIR }}/QGIS/qgis-deps-${{ env.QGIS_DEPS_VERSION }}.${{ env.QGIS_DEPS_PATCH_VERSION }} - key: mac-qgis-deps-${{ env.QGIS_DEPS_VERSION }}.${{ env.QGIS_DEPS_PATCH_VERSION }} - - - name: Restore qgis-deps - if: steps.cache-deps.outputs.cache-hit == 'true' - run: | - sudo mkdir -p /opt - sudo mkdir -p /opt/QGIS - sudo cp -r ${DEPS_CACHE_DIR}/QGIS/qgis-deps-${QGIS_DEPS_VERSION}.${QGIS_DEPS_PATCH_VERSION} /opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION} - - - name: Download qgis-deps - if: steps.cache-deps.outputs.cache-hit != 'true' - run: | - wget https://qgis.org/downloads/macos/deps/qgis-deps-${QGIS_DEPS_VERSION}.${QGIS_DEPS_PATCH_VERSION}.tar.gz - mkdir -p ${DEPS_CACHE_DIR} - mkdir -p ${DEPS_CACHE_DIR}/QGIS - - - name: Install Qt and deps - env: - QT_ALREADY_CACHED: ${{ steps.cache-qt.outputs.cache-hit }} - QGIS_DEPS_ALREADY_CACHED: ${{ steps.cache-deps.outputs.cache-hit }} - run: | - wget https://qgis.org/downloads/macos/deps/install_qgis_deps-${QGIS_DEPS_VERSION}.${QGIS_DEPS_PATCH_VERSION}.bash - chmod +x ./install_qgis_deps-${QGIS_DEPS_VERSION}.${QGIS_DEPS_PATCH_VERSION}.bash - echo ::group::Install deps - sudo ./install_qgis_deps-${QGIS_DEPS_VERSION}.${QGIS_DEPS_PATCH_VERSION}.bash - echo ::endgroup:: - [[ ${QT_ALREADY_CACHED} != "true" ]] && cp -r /opt/Qt/${QT_VERSION} ${DEPS_CACHE_DIR}/Qt/${QT_VERSION} || true - [[ ${QGIS_DEPS_ALREADY_CACHED} != "true" ]] && cp -r /opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION} ${DEPS_CACHE_DIR}/QGIS/qgis-deps-${QGIS_DEPS_VERSION}.${QGIS_DEPS_PATCH_VERSION} || true - - - name: Install ccache - run: | - mkdir -p ${CCACHE_DIR} - brew install ccache - ccache --set-config=max_size=2.0G - ccache -s - - - name: Run cmake - run: | - mkdir -p ${BUILD_DIR} - cd ${BUILD_DIR} - - PATH=/opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION}/stage/bin:$PATH \ - cmake -DQGIS_MAC_DEPS_DIR=/opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION}/stage \ - -DCMAKE_PREFIX_PATH=/opt/Qt/${QT_VERSION}/clang_64 \ - -DWITH_BINDINGS=TRUE \ - -DWITH_3D=TRUE \ - -DWITH_DRACO=FALSE \ - -DWITH_PDAL=TRUE \ - -DWITH_EPT=TRUE \ - ../QGIS - - - name: Build QGIS - run: | - cd ${BUILD_DIR} - make -j $(sysctl -n hw.ncpu) - - - name: Save build cache for push only - uses: actions/cache/save@v4 - if: ${{ github.event_name == 'push' }} - with: - path: ${{ env.CCACHE_DIR }} - key: build-ccache-mac-${{ github.ref_name }}-${{ github.run_id }} diff --git a/.github/workflows/mingw-w64-msys2.yml b/.github/workflows/mingw-w64-msys2.yml deleted file mode 100644 index 9c6d2f1429e6..000000000000 --- a/.github/workflows/mingw-w64-msys2.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: MSYS2 MinGW-w64 Windows 64bit Build - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - release-** - - queued_ltr_backports - paths: - - 'src/**' - - 'external/**' - - 'python/**' - - 'tests/**' - - 'ms-windows/**' - - 'CMakeLists.txt' - - '.github/workflows/mingw-w64-msys2.yml' - pull_request: - workflow_dispatch: - -permissions: - contents: read - -jobs: - mingw-w64-msys2-build: - name: MSYS2 MinGW-w64 Windows Build - runs-on: windows-latest - #strategy: - # fail-fast: false - # matrix: - # QT_VERSION: [qt5, qt6] - # MSYSTEM: [UCRT64, CLANG64] - env: - CCACHE_DIR: build/ccache - defaults: - run: - shell: msys2 {0} - steps: - - - uses: actions/checkout@v4 - - - name: Install core & build dependencies - uses: msys2/setup-msys2@v2 - with: - msystem: UCRT64 - install: base-devel - pacboy: >- - draco:p exiv2:p gdal:p gsl:p hdf5:p libxml2:p libzip:p netcdf:p opencl-icd:p pdal:p - protobuf:p proj:p qca-qt5:p qscintilla-qt5:p qt5-3d:p qt5-base:p qt5-declarative:p - qt5-gamepad:p qt5-location:p qt5-serialport:p qt5-svg:p qtkeychain-qt5:p qtwebkit:p - qwt-qt5:p spatialindex:p cc:p cmake:p ninja:p opencl-clhpp:p qt5-tools:p python:p ccache:p - update: true - release: false - - - name: Restore build cache - uses: actions/cache/restore@v4 - with: - path: build - key: build-ccache-mingw64-msys2-${{ github.event.pull_request.base.ref || github.ref_name }} - restore-keys: | - build-ccache-mingw64-msys2-master - - - name: Configure QGIS - run: | - CXXFLAGS="-DQWT_POLAR_VERSION=0x060200" \ - cmake \ - -G"Ninja" \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \ - -DWITH_3D=ON \ - -DWITH_DRACO=ON \ - -DWITH_PDAL=OFF \ - -DWITH_CUSTOM_WIDGETS=ON \ - -DWITH_QWTPOLAR=OFF \ - -DWITH_BINDINGS=OFF \ - -DWITH_GRASS=OFF \ - -DUSE_CCACHE=ON \ - -S . \ - -B build - - - name: Build QGIS - run: | - cmake --build build - ccache -s - - - name: Save build cache for push only - uses: actions/cache/save@v4 - if: ${{ github.event_name == 'push' }} - with: - path: build - key: build-ccache-mingw64-msys2-${{ github.ref_name }}-${{ github.run_id }} diff --git a/.github/workflows/mingw64.yml b/.github/workflows/mingw64.yml deleted file mode 100644 index 1815b1ee4769..000000000000 --- a/.github/workflows/mingw64.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: 🪟 MingW64 Windows 64bit Build - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - release-** - - queued_ltr_backports - paths: - - 'src/**' - - 'external/**' - - 'python/**' - - 'tests/**' - - 'ms-windows/**' - - 'CMakeLists.txt' - - '.github/workflows/mingw64.yml' - pull_request: - workflow_dispatch: - -permissions: - contents: read - -jobs: - mingw64-build: - name: MinGW64 Windows Build - runs-on: ubuntu-latest - container: - image: fedora:39 - options: --security-opt seccomp=unconfined - volumes: - - ${{ github.workspace }}:/w - steps: - - - uses: actions/checkout@v4 - - # To be removed - # Workaround a bug where the initial /etc/dnf/dnf.conf file contains - # just the "tsflags=nodocs" line - - name: Replace broken dnf.conf - run: printf '[main]\ngpgcheck=True\ninstallonly_limit=3\nclean_requirements_on_remove=True\nbest=False\nskip_if_unavailable=True\ntsflags=nodocs' > /etc/dnf/dnf.conf - - - name: Update system - run: dnf -y update - - - name: Install core dependencies - run: dnf -y install zip - - - name: Install build dependencies - run: ./ms-windows/mingw/mingwdeps.sh - - # Node.js and Yarn for server landingpage webapp - - uses: actions/setup-node@v4 - with: - node-version: '17' - - - name: Make yarn available - run: corepack enable - - - name: Create ccache dir - run: mkdir -p /w/.ccache/QGIS - - - name: Restore build cache - uses: actions/cache/restore@v4 - with: - path: /w/.ccache/QGIS - key: build-ccache-mingw64-${{ github.event.pull_request.base.ref || github.ref_name }} - restore-keys: | - build-ccache-mingw64-master - - - name: Build QGIS Application - run: CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4 - - - name: Save build cache for push only - uses: actions/cache/save@v4 - if: ${{ github.event_name == 'push' }} - with: - path: /w/.ccache/QGIS - key: build-ccache-mingw64-${{ github.ref_name }}-${{ github.run_id }} - - - name: Create Portable zip - run: | - DISTROOT=build_mingw64/dist/usr/x86_64-w64-mingw32/sys-root/mingw - DEBUGROOT=dist_debug - for file in $(find $DISTROOT -name '*.debug' \( -type l -or -type f \)); do - DEST=${file/$DISTROOT/$DEBUGROOT} - mkdir -p "$(dirname $DEST)" - sudo mv "$file" "$DEST" - done - sudo mv $DISTROOT QGIS-Portable - zip -r qgis-portable-win64.zip QGIS-Portable - (cd $DEBUGROOT && zip -r - *) > qgis-portable-win64-debugsym.zip - - - name: Save PR number to zips - run: | - echo ${{ github.event.number }} | tee pr_number - zip -u qgis-portable-win64.zip pr_number - zip -u qgis-portable-win64-debugsym.zip pr_number - echo ${{ github.event.pull_request.head.sha }} | tee git_commit - zip -u qgis-portable-win64.zip git_commit - zip -u qgis-portable-win64-debugsym.zip git_commit - - - name: Upload QGIS for Windows 64bit - uses: actions/upload-artifact@v4 - with: - name: QGIS for Windows 64bit - path: qgis-portable-win64.zip - - - name: Upload QGIS for Windows 64bit Debug Symbols - uses: actions/upload-artifact@v4 - with: - name: QGIS for Windows 64bit Debug Symbols - path: qgis-portable-win64-debugsym.zip diff --git a/.github/workflows/ogc.yml b/.github/workflows/ogc.yml deleted file mode 100644 index ecf941d38fa9..000000000000 --- a/.github/workflows/ogc.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: 🗺 OGC tests for QGIS Server - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - release-** - - queued_ltr_backports - paths: - - 'src/core/**' - - 'src/auth/**' - - 'src/providers/**' - - 'src/server/**' - - 'src/CMakeLists.txt' - - 'external/**' - - 'CMakeLists.txt' - - '.github/workflows/ogc.yml' - pull_request: - branches: - - master - - release-** - paths: - - 'src/core/**' - - 'src/auth/**' - - 'src/providers/**' - - 'src/server/**' - - 'src/CMakeLists.txt' - - 'external/**' - - 'CMakeLists.txt' - - '.github/workflows/ogc.yml' - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Restore build cache - uses: actions/cache/restore@v3 - with: - path: /home/runner/QGIS/.ccache - key: build-ccache-ogc-${{ github.event.pull_request.base.ref || github.ref_name }} - restore-keys: | - build-ccache-ogc-master - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker Container - id: docker-build - uses: docker/build-push-action@v5 - with: - tags: qgis/qgis-deps-ogc:${{ github.event.pull_request.base.ref || github.ref_name }} - context: .ci/ogc - file: .ci/ogc/Dockerfile - cache-from: type=gha - cache-to: type=gha,mode=max - load: true - - - name: Run build - run: | - docker run -v $(pwd):/usr/src/qgis -v /home/runner/QGIS/.ccache:/root/.ccache ${DOCKER_IMAGE} /usr/src/qgis/.ci/ogc/build.sh - env: - DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }} - - - name: Save build cache for push only - uses: actions/cache/save@v3 - if: ${{ github.event_name == 'push' }} - with: - path: /home/runner/QGIS/.ccache - key: build-ccache-ogc-${{ github.ref_name }}-${{ github.run_id }} - - - name: Install pyogctest - run: | - sudo apt-get update && sudo apt-get install python3-virtualenv virtualenv git - git clone https://github.com/pblottiere/pyogctest - cd pyogctest && git checkout 1.1.1 && cd - - virtualenv -p /usr/bin/python3 venv && source venv/bin/activate && pip install -e pyogctest/ - - - name: Run WMS 1.3.0 OGC tests - run: | - source venv/bin/activate && ./pyogctest/pyogctest.py -s wms130 -e - docker-compose -f .ci/ogc/docker-compose.yml up -d - source venv/bin/activate && ./pyogctest/pyogctest.py -n ogc_qgis -s wms130 -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_wms130 - env: - DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }} - - - name: Run OGC API Features 1.0 tests - run: | - cd data && git clone https://github.com/qgis/QGIS-Training-Data && cd - - docker-compose -f .ci/ogc/docker-compose.yml up -d - source venv/bin/activate && ./pyogctest/pyogctest.py -n ogc_qgis -s ogcapif -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_ogcapif - env: - DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }} diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml deleted file mode 100644 index 33613dacd281..000000000000 --- a/.github/workflows/pr-auto-label.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: "🌈 Triage" - -on: - pull_request_target: - types: [ opened, synchronize, reopened ] - -permissions: - contents: read - -jobs: - triage: - name: "Set on PR" - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pr-auto-milestone.yml b/.github/workflows/pr-auto-milestone.yml deleted file mode 100644 index 7884b86246a6..000000000000 --- a/.github/workflows/pr-auto-milestone.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: 📅 Auto set milestone on PR - -on: - pull_request_target: - types: - - opened - -permissions: - contents: read - -env: - QGIS_MAJOR_VERSION: 3 - -jobs: - pr-without-milestones: - runs-on: ubuntu-latest - if: github.repository == 'qgis/QGIS' - permissions: - issues: write - pull-requests: write - steps: - # list the tags and milestones - - uses: octokit/graphql-action@v2.x - id: graphql_request - with: - query: | - query { - repository(owner: "qgis", name: "QGIS") { - pullRequests(states: OPEN, last: 100) { - edges { - node { - number - title - milestone { - number - } - baseRef { - name - } - } - } - } - milestones(orderBy: {field: CREATED_AT, direction: DESC}, first: 50) { - edges { - node { - title - number - } - } - } - refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 30) { - edges { - node { - name - } - } - } - } - } - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # take the first unprocessed PR and determine if some remain - - name: Filter PR to check - id: extract_data - env: - JSON_DATA: ${{ steps.graphql_request.outputs.data }} - run: | - # get PRs without milestones - PRS_TO_PROCESS=$(echo "${JSON_DATA}" | jq '.repository.pullRequests.edges[] | select( .node.milestone.number | not ) | .node.number') - - NUMBER_OF_PRS=$(echo "${PRS_TO_PROCESS}" | jq -s '. | length') - echo "NUMBER_OF_PRS: ${NUMBER_OF_PRS}" - # early exit - [[ ${NUMBER_OF_PRS} == 0 ]] && echo "has_milestone_to_set=0" >> $GITHUB_OUTPUT && exit 0 - - # Take the first - PR_NUMBER=$(echo "${PRS_TO_PROCESS}" | jq -s '. | first') - echo "PR_NUMBER: ${PR_NUMBER}" - - # Not used for now - RE_RUN_JOB=$(echo "${JSON_DATA}" | jq -s '. | length > 1') - echo "RE_RUN_JOB: ${RE_RUN_JOB}" - - # Get the base branch - BASE_BRANCH=$(echo "${JSON_DATA}" | jq -r ".repository.pullRequests.edges[] | select( .node.number == ${PR_NUMBER} ) | .node.baseRef.name") - echo "BASE_BRANCH: ${BASE_BRANCH}" - - # master => NOTHING, release_3-10 => _10 - MINOR_VERSION=$(echo ${BASE_BRANCH} | sed -r -e 's/^release-[0-9]_([0-9]+)/_\1/;t;d') - echo "MINOR_VERSION: ${MINOR_VERSION}" - - # get the max release from the tags - MAX_RELEASE=$(echo "${JSON_DATA}" | jq ".repository.refs.edges[].node.name | select( . | test(\"^final-${QGIS_MAJOR_VERSION}${MINOR_VERSION}\") ) | sub(\"^final-${QGIS_MAJOR_VERSION}_(?[0-9]+)_(?

.)\"; .m+\".\"+.p) | tonumber" | jq -s '. | max') - echo "MAX_RELEASE: ${MAX_RELEASE}" - - # increase the number to get milestone: round+2 for master, +0.1 for release_xxx branches - INCREASE_OPERATION=$([[ -z ${MINOR_VERSION} ]] && echo "${MAX_RELEASE%.*} + 2.0" || echo "${MAX_RELEASE} + 0.1" ) - echo "INCREASE_OPERATION: ${INCREASE_OPERATION}" - MILESTONE_TITLE="${QGIS_MAJOR_VERSION}."$(echo "${INCREASE_OPERATION}" | bc) - echo "MILESTONE_TITLE: ${MILESTONE_TITLE}" - - MILESTONE_NUMBER=$(echo "${JSON_DATA}" | jq ".repository.milestones.edges[] | select( .node.title == \"${MILESTONE_TITLE}\" ) | .node.number") - echo "MILESTONE_NUMBER: ${MILESTONE_NUMBER}" - - HAS_MILESTONE_TO_CREATE=$([[ -z ${MILESTONE_NUMBER} ]] && echo "1" || echo "0" ) - echo "HAS_MILESTONE_TO_CREATE: ${HAS_MILESTONE_TO_CREATE}" - - echo "has_milestone_to_set=1" >> $GITHUB_OUTPUT - echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT - echo "milestone_title=${MILESTONE_TITLE}" >> $GITHUB_OUTPUT - echo "milestone_number=${MILESTONE_NUMBER}" >> $GITHUB_OUTPUT - echo "has_milestone_to_create=${HAS_MILESTONE_TO_CREATE}" >> $GITHUB_OUTPUT - - # create the milestone if needed - - name: Create milestone if needed - id: create_milestone - if: steps.extract_data.outputs.has_milestone_to_set == 1 && steps.extract_data.outputs.has_milestone_to_create == 1 - uses: octokit/request-action@v2.x - with: - route: POST /repos/qgis/QGIS/milestones - title: ${{ steps.extract_data.outputs.milestone_title }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Compute the milestone number - - name: Compute milestone number from existing or created - id: compute_milestone - if: always() && steps.extract_data.outputs.has_milestone_to_set == 1 - env: - MILESTONE_NUMBER_EXISTING: ${{ steps.extract_data.outputs.milestone_number }} - MILESTONE_NUMBER_CREATED_JSON: ${{ steps.create_milestone.outputs.data }} - run: | - FINAL_MILESTONE_NUMBER=$([[ -n ${MILESTONE_NUMBER_EXISTING} ]] && echo "${MILESTONE_NUMBER_EXISTING}" || echo $(echo "${MILESTONE_NUMBER_CREATED_JSON}" | jq .number )) - echo "FINAL_MILESTONE_NUMBER: ${FINAL_MILESTONE_NUMBER}" - echo "milestone_number=${FINAL_MILESTONE_NUMBER}" >> $GITHUB_OUTPUT - - # update PR with milestone - - name: update PR milestone - if: steps.extract_data.outputs.has_milestone_to_set == 1 - uses: octokit/request-action@v2.x - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - route: PATCH /repos/qgis/QGIS/issues/:pull_number - pull_number: ${{ steps.extract_data.outputs.pr_number }} - milestone: ${{ steps.compute_milestone.outputs.milestone_number }} diff --git a/.github/workflows/pr-needs-documentation.yml b/.github/workflows/pr-needs-documentation.yml deleted file mode 100644 index fb3c4ff8a5c9..000000000000 --- a/.github/workflows/pr-needs-documentation.yml +++ /dev/null @@ -1,162 +0,0 @@ - -name: 📖 PR needs documentation - -# a message will be added to the PR to ping the author about her/his responsibility to handle the documentation issue -# an issue is automatically created in the QGIS-Documentation repository when the PR gets merged - -on: - pull_request_target: - types: - - opened - - closed - - labeled - -permissions: - contents: read - -jobs: - ping-author-message: - permissions: - issues: write # for peter-evans/create-or-update-comment to create or update comment - pull-requests: write # for peter-evans/create-or-update-comment to create or update comment - if: github.event.action != 'closed' - runs-on: ubuntu-latest - name: Write comment to ping author about the pull request description - steps: - - - name: Create comment about documentation - if: github.event.label.name == 'Needs Documentation' - uses: peter-evans/create-or-update-comment@v4 - with: - token: ${{ secrets.GH_TOKEN_BOT }} - issue-number: ${{ github.event.pull_request.number }} - body: | - @${{ github.event.pull_request.user.login }} - This pull request has been tagged as **requiring documentation**. - - A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation **when this PR is merged**. - - **Please update the description** (not the comments) with helpful description and screenshot to help the work from documentors. - Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can. - - Thank you! - reactions: 'rocket' - - - name: Create comment about changelog - if: github.event.label.name == 'Changelog' - uses: peter-evans/create-or-update-comment@v4 - with: - token: ${{ secrets.GH_TOKEN_BOT }} - issue-number: ${{ github.event.pull_request.number }} - body: | - @${{ github.event.pull_request.user.login }} - - This pull request has been tagged for the [changelog](https://www.qgis.org/en/site/forusers/visualchangelogs.html). - - * The description will be harvested so please provide a "nearly-ready" text for the final changelog - * If possible, add a nice illustration of the feature. Only the **first** one in the description will be harvested (GIF accepted as well) - * If you can, it's better to give credits to your sponsor, see below for different formats. - - You can edit the description. - -

- Format available for credits -
- - - `Funded by NAME` - - `Funded by URL` - - `Funded by NAME URL` - - `Sponsored by NAME` - - `Sponsored by URL` - - `Sponsored by NAME URL` - -
- - Thank you! - reactions: '+1' - - - create-doc-issue: - if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'Needs Documentation') ) || github.event.label.name == 'Needs Documentation' ) - runs-on: ubuntu-latest - name: Create issue on doc repo for labeled issue - steps: - - # transform the milestone (e.g. 3.10.4) to a doc label (3.10) - - name: QGIS milestone to Doc label - id: milestone2label - env: - MILESTONE: ${{ github.event.pull_request.milestone.title }} - run: | - LABEL=$(sed -r 's/^([[:digit:]]\.[[:digit:]]+)(\.[[:digit:]]+)?$/\1/' <<< ${MILESTONE}) - echo ${LABEL} - echo "label=${LABEL}" >> $GITHUB_OUTPUT - - # get the PR body - - name: Get PR body as text - id: get_pr_body - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_BODY: "${{ github.event.pull_request.body }}" - run: | - echo 'body<> $GITHUB_OUTPUT - echo "$PR_BODY" >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT - - # get commits from the PR - - name: Get PR commits - uses: octokit/request-action@v2.x - id: get_pr_commits - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - route: GET /repos/qgis/QGIS/pulls/:pull_number/commits - pull_number: ${{ github.event.pull_request.number }} - - # extracts the matching commits - - name: Filter commits with \[needs?.doc(umentation)?s?\] - id: filtered_commits - env: - JSON_DATA: ${{ steps.get_pr_commits.outputs.data }} - run: | - COMMITS_MESSAGES=$(echo ${JSON_DATA} | jq '.[].commit.message | select( . |test("\\[(feature|needs?.doc(umentation)?s?)\\]"; "i")) | sub("\\[needs?.doc(umentation)?s?\\]"; "\n\n\n\n"; "i")') - echo "commits=$(echo ${COMMITS_MESSAGES} | tr -d '\n' )" >> $GITHUB_OUTPUT - - # create the documentation issue - - name: Create Documentation issue - id: doc_issue - uses: dacbd/create-issue-action@v2.0.0 - with: - token: ${{ secrets.GH_TOKEN_BOT }} - owner: qgis - repo: QGIS-Documentation - title: ${{ format('{0} (Request in QGIS)', github.event.pull_request.title) }} - # do not modify the QGIS version, an action automatically creates a label in the doc repo - # this is not possible to set labels directly due to security reasons - # the token is in clear, so no rights are given to qgis-bot - body: | - ### Request for documentation - From pull request qgis/QGIS#${{ github.event.pull_request.number }} - Author: @${{ github.event.pull_request.user.login }} - QGIS version: ${{ steps.milestone2label.outputs.label }} - - **${{ github.event.pull_request.title }}** - - ### PR Description: - ${{ steps.get_pr_body.outputs.body }} - - ### Commits tagged with [need-docs] or [FEATURE] - ${{ steps.filtered_commits.outputs.commits }} - - # write comment to ping the PR author - - name: Create comment - uses: peter-evans/create-or-update-comment@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body: | - @${{ github.event.pull_request.user.login }} - A documentation ticket has been opened at https://github.com/qgis/QGIS-Documentation/issues/${{ steps.doc_issue.outputs.number }} - It is **your** responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change. - Thank you! - reactions: 'rocket' diff --git a/.github/workflows/pr_unstale_commit.yml b/.github/workflows/pr_unstale_commit.yml deleted file mode 100644 index 1f830adb66eb..000000000000 --- a/.github/workflows/pr_unstale_commit.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Remove Labels PR Commit - -on: pull_request_target - -permissions: - contents: read - -jobs: - remove_labels: - permissions: - pull-requests: write # for actions-ecosystem/action-remove-labels to remove PR labels - if: contains(github.event.pull_request.labels.*.name, 'stale') - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-remove-labels@v1 - if: ${{ github.event.comment.user.url != 'https://github.com/apps/github-actions' }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - labels: | - stale diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ba262b4ddbc5..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: 🚀 Release - -on: - push: - tags: - - 'final-*_*_*' - -permissions: - contents: read - -jobs: - build: - permissions: - contents: none - name: Create Release - runs-on: ubuntu-latest - steps: - - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Version URL - run: | - VERSION=$(echo ${RELEASE_VERSION} | cut -d '-' -f 2 ) - - if [ ${VERSION: -1} = "0" ] - then - VERSION=$(echo ${VERSION} | cut -d '_' -f1,2 | sed 's/_/\./g') - echo "version_url=https://changelog.qgis.org/en/qgis/version/${VERSION}" >> $GITHUB_ENV - else - PREVIOUS=$(echo ${VERSION} | sed 's/_/\./g' | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF-1)%(10^length($NF))); print}' | sed 's/\./_/g') - echo "version_url=https://github.com/qgis/QGIS/compare/final-${PREVIOUS}%5E...final-${VERSION}" >> $GITHUB_ENV - fi - - - name: Version name - run: | - VERSION_NAME=$(echo ${{ env.RELEASE_VERSION }} | cut -d '-' -f 2 | sed 's/_/\./g') - echo "version_name=${VERSION_NAME}" >> $GITHUB_ENV - - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN_BOT }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ env.version_name }} - body: ${{ env.version_url }} - draft: false - prerelease: false diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml deleted file mode 100644 index 85278b3bad8e..000000000000 --- a/.github/workflows/run-tests.yml +++ /dev/null @@ -1,501 +0,0 @@ -name: 🧪 QGIS tests - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - release-** - - queued_ltr_backports - paths: - - 'src/**' - - 'external/**' - - 'python/**' - - 'tests/**' - - 'CMakeLists.txt' - - '.github/workflows/run-tests.yml' - - '.docker/**' - - '.ci/**' - pull_request: - branches: - - master - - release-** - - queued_ltr_backports - # paths cannot be filtered on this workflow on pull request as it is a required one in the branch protection - # feature request and hacks: https://github.community/t/feature-request-conditional-required-checks/16761 - -permissions: - contents: read - -jobs: - build: - env: - QGIS_WORKSPACE: ${{ github.workspace }} # used in docker compose - RUN_FLAKY_TESTS: ${{ contains( github.event.pull_request.labels.*.name, 'run flaky tests') }} - - runs-on: ubuntu-latest - continue-on-error: ${{ matrix.experimental }} - - strategy: - matrix: - include: - - distro-version: '22.04' - qt-version: 5 - run-tests: true - with-qt6: OFF - with-qt5: ON - with-3d: ON - with-quick: ON - with-clazy: ON - with-grass7: OFF - with-grass8: OFF - with-webengine: OFF - with-pdf4qt: OFF - with-compile-commands: ON - # LD_PRELOAD: /lib/x86_64-linux-gnu/libSegFault.so - experimental: false - - - distro-version: '39' - qt-version: 6 - run-tests: true - with-qt6: ON - with-qt5: OFF - with-3d: ON - with-quick: ON - with-clazy: OFF - with-grass7: OFF - with-grass8: ON - with-webengine: ON - with-pdf4qt: ON - with-compile-commands: OFF - LD_PRELOAD: '' - experimental: false - - - fail-fast: false - - outputs: - compile_outcome: ${{ steps.compile.outcome }} - tests_failing: ${{ steps.tests.outputs.TESTS_FAILING }} - cdash_url: ${{ steps.tests.outputs.CDASH_URL }} - runners_outcome: ${{ steps.runners.outcome }} - - steps: - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: true - large-packages: false - docker-images: false - swap-storage: true - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set vars - env: - GITHUB_EVENT_NAME: ${{ github.event_name }} - GITHUB_REF: ${{ github.ref }} - GITHUB_PR_NUMBER: ${{github.event.number}} - run: | - # Be aware that these instructions are duplicated in run-tests job - DOCKER_TAG=$(echo $( [[ ${GITHUB_EVENT_NAME} == pull_request ]] && echo ${GITHUB_BASE_REF} || echo ${GITHUB_REF##*/} ) | sed 's/^master$/latest/') - CTEST_BUILD_NAME=$( [[ ${GITHUB_EVENT_NAME} == pull_request ]] && echo "PR${GITHUB_PR_NUMBER}" || echo ${GITHUB_REF##*/} )"_${GITHUB_SHA}" - echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV - echo "CTEST_BUILD_NAME=${CTEST_BUILD_NAME}" >> $GITHUB_ENV - echo "QT_VERSION=${{ matrix.qt-version }}" >> $GITHUB_ENV - - - name: Print vars - run: | - echo DOCKER_TAG: ${DOCKER_TAG} - echo CTEST_BUILD_NAME: ${CTEST_BUILD_NAME} - echo QT_VERSION: ${QT_VERSION} - - - name: Login to Docker Hub - if: ${{ github.event_name == 'push' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Docker Container with Build Environment - id: docker-build - uses: docker/build-push-action@v5 - with: - context: . - file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile - tags: qgis/qgis3-build-deps-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}:${{ github.event.pull_request.base.ref || github.ref_name }} - push: ${{ github.event_name == 'push' }} - pull: true - build-args: - DISTRO_VERSION=${{ matrix.distro-version }} - - - name: Tag image - run: docker tag ${{ steps.docker-build.outputs.imageid }} qgis3-build-deps - - - name: Restore build cache - uses: actions/cache/restore@v4 - with: - path: /home/runner/QGIS/.ccache - key: build-ccache-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}-${{ github.event.pull_request.base.ref || github.ref_name }} - restore-keys: | - build-ccache-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}-master - - - name: Compile QGIS - id: compile - run: | - docker run -t --name qgis_container \ - -v $(pwd):/root/QGIS \ - -v /home/runner/QGIS/.ccache:/root/.ccache \ - --env-file .docker/docker-variables.env \ - --env CCACHE_DIR=/root/.ccache \ - --env PUSH_TO_CDASH=true \ - --env WITH_QT5=${{ matrix.with-qt5 }} \ - --env BUILD_WITH_QT6=${{ matrix.with-qt6 }} \ - --env WITH_QUICK=${{ matrix.with-quick }} \ - --env WITH_3D=${{ matrix.with-3d }} \ - --env WITH_GRASS7=${{ matrix.with-grass7 }} \ - --env WITH_GRASS8=${{ matrix.with-grass8 }} \ - --env WITH_QTWEBENGINE=${{ matrix.with-webengine }} \ - --env WITH_PDF4QT=${{ matrix.with-pdf4qt }} \ - --env LD_PRELOAD=${{ matrix.LD_PRELOAD }} \ - --env WITH_CLAZY=${{ matrix.with-clazy }} \ - --env WITH_COMPILE_COMMANDS=${{ matrix.with-compile-commands }} \ - qgis3-build-deps \ - /root/QGIS/.docker/docker-qgis-build.sh - - - name: Save build cache for push only - uses: actions/cache/save@v4 - if: ${{ github.event_name == 'push' }} - with: - path: /home/runner/QGIS/.ccache - key: build-ccache-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}-${{ github.ref_name }}-${{ github.run_id }} - - - name: Push artifact - id: push_artifact - if: ${{ matrix.run-tests }} - run: tar --exclude='*.o' -cvzf build.tgz build - - - uses: actions/upload-artifact@v4 - if: ${{ matrix.run-tests }} - with: - name: build-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}.tgz - path: ./build.tgz - retention-days: 1 - -# - name: Test QGIS runners -# id: runners -# if: ${{ matrix.distro-version == env.DEFAULT_DISTRO_VERSION }} -# run: | -# docker run -d --name qgis-testing-environment \ -# -v $(pwd):/root/QGIS \ -# -v $(pwd)/tests/src/python:/tests_directory \ -# -v $(pwd)/.docker/qgis_resources/test_runner:/usr/bin/test_runner \ -# -v $(pwd)/.docker/qgis_resources/supervisor:/etc/supervisor \ -# -e QGIS_BUILD_PATH=/root/QGIS/build/output/bin/qgis \ -# -e TEST_RUNNER_PATH=/usr/bin/test_runner/qgis_testrunner.py \ -# -e DISPLAY=:99 \ -# qgis_image \ -# /usr/bin/supervisord -c /etc/supervisor/supervisord.conf -# # Wait for xvfb to finish starting -# printf "Waiting for the docker...🐳..." -# sleep 10 -# echo " done 🥩" -# -# declare -A testrunners -# # Passing cases: -# testrunners["test_testrunner.run_passing"]=0 -# testrunners["test_testrunner.run_skipped_and_passing"]=0 -# # Failing cases: -# testrunners["test_testrunner"]=1 -# testrunners["test_testrunner.run_all"]=1 -# testrunners["test_testrunner.run_failing"]=1 -# set +e # do not exit on error -# # Run tests in the docker -# for i in "${!testrunners[@]}" -# do -# echo "::group::docker_test_runner_${i}" -# echo "test ${i}..." -# docker exec -i qgis-testing-environment sh -c "cd /tests_directory && /usr/bin/test_runner/qgis_testrunner.sh ${i}" -# [[ $? -eq "${testrunners[$i]}" ]] && echo "success" || exit 1 -# echo "::endgroup::" -# done -# set -e # switch back -# docker stop qgis-testing-environment - - -# tests-report-comment: -# name: Write tests report in a comment -# needs: build -# runs-on: ubuntu-latest -# if: always() && ( needs.build.result == 'failure' || needs.build.result == 'success' ) && github.event_name == 'pull_request' -# steps: -# - name: Find Comment -# uses: peter-evans/find-comment@v1 -# id: find-comment -# with: -# issue-number: ${{ github.event.pull_request.number }} -# comment-author: 'github-actions[bot]' -# body-includes: Tests report -# -# - name: Create comment -# if: ${{ steps.find-comment.outputs.comment-id == 0 }} -# uses: peter-evans/create-or-update-comment@v1 -# id: create-comment -# with: -# issue-number: ${{ github.event.pull_request.number }} -# body: | -# **Tests report** -# -# - name: Process -# id: process-vars -# env: -# COMMENT_FOUND: ${{ steps.find-comment.outputs.comment-id }} -# COMMENT_CREATED: ${{ steps.create-comment.outputs.comment-id }} -# COMMIT_SHA: ${{ github.event.pull_request.head.sha }} -# CDASH_URL: ${{ needs.build.outputs.cdash_url }} -# COMPILE_OUTCOME: ${{ needs.build.outputs.compile_outcome }} -# TESTS_FAILING: ${{ needs.build.outputs.tests_failing }} -# RUNNERS_OUTCOME: ${{ needs.build.outputs.runners_outcome }} -# run: | -# echo "::set-output name=COMMENT_ID::"$([[ "${COMMENT_FOUND}" -eq "0" ]] && echo ${COMMENT_CREATED} || echo ${COMMENT_FOUND}) -# if [[ ${COMPILE_OUTCOME} != "success" ]]; then -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :scream: compilation failed" -# elif [[ ${TESTS_FAILING} != "0" ]]; then -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :fire: ${TESTS_FAILING} unit-tests are failing ${CDASH_URL}" -# elif [[ ${RUNNERS_OUTCOME} != "success" ]]; then -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :broken_heart: QGIS runners test failed" -# else -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :sunglasses: unit-tests succeeded" -# fi -# -# - name: Update comment -# uses: peter-evans/create-or-update-comment@v1 -# with: -# comment-id: ${{ steps.process-vars.outputs.COMMENT_ID }} -# edit-mode: append -# body: ${{ steps.process-vars.outputs.COMMENT_BODY }} - - run-tests: - name: Run tests - env: - QGIS_WORKSPACE: ${{ github.workspace }} # used in docker compose - - runs-on: ubuntu-latest - - needs: build - if: always() - - strategy: - matrix: - qt-version: [5, 6] - test-batch: [ALL_BUT_PROVIDERS, POSTGRES, HANA] - - include: - - qt-version: 5 - distro-version: 22.04 - docker-target: binary-only - - - qt-version: 6 - distro-version: 39 - docker-target: binary-only - - - qt-version: 5 - distro-version: 22.04 - test-batch: ORACLE - docker-target: binary-for-oracle - - exclude: - - qt-version: 6 - test-batch: HANA - - - qt-version: 6 - test-batch: POSTGRES - - fail-fast: false - - steps: - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: true - large-packages: false - docker-images: false - swap-storage: true - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set vars - env: - GITHUB_EVENT_NAME: ${{ github.event_name }} - GITHUB_REF: ${{ github.ref }} - GITHUB_PR_NUMBER: ${{github.event.number}} - run: | - # Be aware that these instructions are duplicated in build job - CTEST_BUILD_NAME=$( [[ ${GITHUB_EVENT_NAME} == pull_request ]] && echo "PR${GITHUB_PR_NUMBER}" || echo ${GITHUB_REF##*/} )"_${GITHUB_SHA}_${{ matrix.test-batch }}" - echo "CTEST_BUILD_NAME=${CTEST_BUILD_NAME}" >> $GITHUB_ENV - echo "QT_VERSION=${{ matrix.qt-version }}" >> $GITHUB_ENV - - - name: Print vars - run: | - echo CTEST_BUILD_NAME: ${CTEST_BUILD_NAME} - - - name: Login to Docker Hub - if: ${{ github.event_name == 'push' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Docker Container with Testing Environment - id: docker-build - uses: docker/build-push-action@v5 - with: - context: . - file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile - tags: qgis/qgis3-qt${{ matrix.qt-version }}-build-deps-bin-only:${{ github.event.pull_request.base.ref || github.ref_name }} - push: ${{ github.event_name == 'push' }} - pull: true - target: ${{ matrix.docker-target }} - build-args: - DISTRO_VERSION=${{ matrix.distro-version }} - - - name: Tag image - run: docker tag ${{ steps.docker-build.outputs.imageid }} qgis3-build-deps-binary-image - - - name: Print disk space - run: | - echo "DOCKER IMAGES" - docker images - echo "DF -H" - sudo df -h - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - name: build-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}.tgz - path: . - - - name: Extract build artifact - run: | - tar xvzf build.tgz - rm -Rf build.tgz - - - name: Print disk space - run: | - echo "DF -H" - sudo df -h - - - name: Run tests - id: tests - env: - TEST_BATCH: ${{matrix.test-batch}} - QGIS_COMMON_GIT_DIR: ${{ github.workspace }} - GITHUB_SHA: ${{ github.sha }} - run: | - DOCKERFILE=$( ( [[ ${{ matrix.test-batch }} == "ORACLE" ]] && echo "docker-compose-testing-oracle.yml" ) \ - || ( [[ ${{ matrix.test-batch }} == "POSTGRES" ]] && echo "docker-compose-testing-postgres.yml" ) \ - || echo "docker-compose-testing.yml" ) - [[ ${{ matrix.test-batch }} == "ORACLE" ]] && sudo rm -rf /usr/share/dotnet/sdk - echo "TEST_BATCH=$TEST_BATCH" - echo "DOCKERFILE=$DOCKERFILE" - mkdir -p /tmp/webdav_tests && chmod 777 /tmp/webdav_tests - mkdir -p /tmp/minio_tests/test-bucket && chmod -R 777 /tmp/minio_tests - docker-compose -f .docker/$DOCKERFILE run -e GITHUB_SHA=$GITHUB_SHA qgis-deps /root/QGIS/.docker/docker-qgis-test.sh $TEST_BATCH - - - name: Fix permissions on test report - if: ${{ failure() }} - run: | - sudo chmod -R 777 qgis_test_report - - - name: Dump report contents - if: ${{ failure() }} - run: | - MD_REPORT_FILE="qgis_test_report/summary.md"; [ -f "$MD_REPORT_FILE" ] && cat "$MD_REPORT_FILE" || true - - - name: Save PR number to test report - if: ${{ failure() }} - run: | - echo ${{ github.event.number }} | tee qgis_test_report/pr_number - echo ${{ github.event.pull_request.head.sha }} | tee qgis_test_report/git_commit - - - name: Archive test results report - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: test-results-qt${{ matrix.qt-version }} - path: qgis_test_report - - clang-tidy: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - needs: build - - strategy: - matrix: - include: - - distro-version: '22.04' - qt-version: 5 - - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: true - large-packages: false - docker-images: false - swap-storage: true - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - name: Login to Docker Hub - if: ${{ github.event_name == 'push' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Docker Container with Testing Environment - id: docker-build - uses: docker/build-push-action@v5 - with: - context: . - file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile - tags: qgis/qgis3-qt${{ matrix.qt-version }}-build-deps-bin-only:${{ github.event.pull_request.base.ref || github.ref_name }} - push: ${{ github.event_name == 'push' }} - pull: true - target: ${{ matrix.docker-target }} - build-args: - DISTRO_VERSION=${{ matrix.distro-version }} - - - name: Tag image - run: docker tag ${{ steps.docker-build.outputs.imageid }} qgis3-build-deps-binary-image - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - name: build-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}.tgz - path: . - - - name: Extract build artifact - run: | - tar xvzf build.tgz - rm -Rf build.tgz - - - name: Run Clang-Tidy - run: | - docker run -t --name qgis_container \ - -v $(pwd):/root/QGIS \ - -v /home/runner/QGIS/.ccache:/root/.ccache \ - --env-file .docker/docker-variables.env \ - qgis3-build-deps-binary-image \ - /root/QGIS/.docker/docker-qgis-clangtidy.sh diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 670c275872b9..000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: 👓 Handle stale issues -on: - schedule: - - cron: "30 2 * * *" - -permissions: - contents: read - -jobs: - stale: - permissions: - issues: write # for actions/stale to close stale issues - pull-requests: write # for actions/stale to close stale PRs - if: github.repository_owner == 'qgis' - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: > - The QGIS project highly values your contribution and would love to see - this work merged! - Unfortunately this PR has not had any activity in the last 14 days and - is being automatically marked as "stale". - If you think this pull request should be merged, please check - - - that all unit tests are passing - - - that all comments by reviewers have been addressed - - - that there is enough information for reviewers, in particular - - - link to any issues which this pull request fixes - - - add a description of workflows which this pull request fixes - - - add screenshots if applicable - - - that you have written unit tests where possible - - In case you should have any uncertainty, please leave a comment and we will - be happy to help you proceed with this pull request. - - If there is no further activity on this pull request, it will be closed in a - week. - - - close-pr-message: > - While we hate to see this happen, this PR has been automatically closed because - it has not had any activity in the last 21 days. If this pull request should be - reconsidered, please follow the guidelines in the previous comment and reopen - this pull request. Or, if you have any further questions, just ask! We love to - help, and if there's anything the QGIS project can do to help push this PR forward - please let us know how we can assist. - - - stale-pr-label: 'stale' - exempt-pr-labels: 'Merge After Thaw,Frozen' - days-before-pr-stale: 14 - days-before-pr-close: 7 - - stale-issue-message: > - The QGIS project highly values your report and would love to see it addressed. - However, this issue has been left in feedback mode for the last 14 days and is - being automatically marked as "stale". - - If you would like to continue with this issue, please provide any missing information - or answer any open questions. If you could resolve the issue yourself meanwhile, - please leave a note for future readers with the same problem and close the issue. - - In case you should have any uncertainty, please leave a comment and we will be - happy to help you proceed with this issue. - - If there is no further activity on this issue, it will be closed in a week. - - - close-issue-message: > - While we hate to see this happen, this issue has been automatically closed because - it has not had any activity in the last 42 days despite being marked as feedback. - If this issue should be reconsidered, please follow the guidelines in the previous - comment and reopen this issue. - - Or, if you have any further questions, there are also - [further support channels](https://www.qgis.org/en/site/forusers/support.html) - that can help you. - - - stale-issue-label: 'stale' - only-issue-labels: 'feedback' - days-before-issue-stale: 14 - days-before-issue-close: 28 - - operations-per-run: 1000 diff --git a/.github/workflows/unstale.yml b/.github/workflows/unstale.yml deleted file mode 100644 index 0e18393352f9..000000000000 --- a/.github/workflows/unstale.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Remove Labels - -on: [issue_comment, pull_request] - -permissions: - contents: read - -jobs: - remove_labels: - permissions: - issues: write # for actions-ecosystem/action-remove-labels to remove issue labels - pull-requests: write # for actions-ecosystem/action-remove-labels to remove PR labels - if: contains(github.event.issue.labels.*.name, 'stale') - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-remove-labels@v1 - if: ${{ github.event.comment.user.url != 'https://github.com/apps/github-actions' }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - labels: | - stale diff --git a/.github/workflows/write_failure_comment.yml b/.github/workflows/write_failure_comment.yml deleted file mode 100644 index 9e85208e6407..000000000000 --- a/.github/workflows/write_failure_comment.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Write test failure comment - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -on: - workflow_run: - workflows: [🧪 QGIS tests] - types: - - completed - branches-ignore: - - 'master' - - 'release*' - -permissions: - contents: read - -jobs: - on-failure: - strategy: - matrix: - qt-version: [ 5, 6 ] - - permissions: - pull-requests: write - - runs-on: ubuntu-latest - steps: - - name: 'Download artifact' - id: download_artifact - uses: actions/github-script@v7 - with: - script: | - let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id, - }); - let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => { - return artifact.name == "test-results-qt${{ matrix.qt-version }}" - }); - if (matchArtifacts.length>0) - { - let download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifacts[0].id, - archive_format: 'zip', - }); - let fs = require('fs'); - fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/test-results-qt${{ matrix.qt-version }}.zip`, Buffer.from(download.data)); - core.setOutput('artifact_id', matchArtifacts[0].id); - } - else - { - core.setOutput('artifact_id', 0); - } - - - name: 'Unzip artifact' - if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0 - run: unzip -j test-results-qt${{ matrix.qt-version }}.zip *.md pr_number git_commit || ( e=$? && if [ $e -ne 11 ]; then exit $e; fi ) - - - name: 'Post test report markdown summary as comment on PR' - if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0 - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - let fs = require('fs'); - if (fs.existsSync('./summary.md')) - { - const issue_number = Number(fs.readFileSync('./pr_number')); - const git_sha = String(fs.readFileSync('./git_commit')).trim(); - const prComments = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue_number, - }); - - const PREFIX = "# Tests failed for Qt ${{ matrix.qt-version }}"; - - let body = PREFIX + "\n\n"; - body += "*One or more tests failed using the build from commit " + git_sha + "*\n\n"; - - body += String(fs.readFileSync('./summary.md')) + - "\n\n**The full test report (included comparison of rendered vs expected images) can be found [here](https://github.com/qgis/QGIS/suites/" + context.payload.workflow_run.check_suite_id + "/artifacts/${{steps.download_artifact.outputs.artifact_id}}).**\n\n" + - "Further documentation on the QGIS test infrastructure can be found in the [Developer's Guide](https://docs.qgis.org/latest/en/docs/developers_guide/unittesting.html)."; - - const failureComment = prComments.data?.find(c => c.body.startsWith(PREFIX)); - if (!!failureComment) { - // update the existing comment - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: failureComment.id, - body: body - }); - } else { - // submit a new comment - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue_number, - body: body - }); - } - } diff --git a/scripts/spell_check/check_spelling.sh b/scripts/spell_check/check_spelling.sh index e549d645c9c2..0b798f84d95d 100755 --- a/scripts/spell_check/check_spelling.sh +++ b/scripts/spell_check/check_spelling.sh @@ -61,14 +61,26 @@ while getopts ":rdl:" opt; do done shift $((OPTIND - 1)) -if [ $# -ne 0 ]; then +# check pipe or command line +if [ -p /dev/stdin ]; then + # with pipe input + read SCRIPT_INPUT +else + # no pipe input + SCRIPT_INPUT="$@" +fi + +if [ -n "$SCRIPT_INPUT" ]; then EXCLUDE=$(${GP}sed -e 's/\s*#.*$//' -e '/^\s*$/d' $AGIGNORE | tr '\n' '|' | ${GP}sed -e 's/|$//') - INPUTFILES=$(echo "$@" | tr -s '[[:blank:]]' '\n' | ${GP}grep -Eiv "$EXCLUDE" | tr '\n' ' ' ) + INPUTFILES=$(echo "$SCRIPT_INPUT" | tr -s '[[:blank:]]' '\n' | ${GP}grep -Eiv "$EXCLUDE" | tr '\n' ' ' ) if [[ -z $INPUTFILES ]]; then exit 0 fi echo "Running spell check on files: $INPUTFILES" else + if [ -p /dev/stdin ]; then + exit 0 + fi INPUTFILES="." fi diff --git a/src/3d/qgsframegraph.h b/src/3d/qgsframegraph.h index 566f53938a49..cb9a1ff723ff 100644 --- a/src/3d/qgsframegraph.h +++ b/src/3d/qgsframegraph.h @@ -50,9 +50,9 @@ class QgsAmbientOcclusionBlurEntity; /** * \ingroup 3d - * \brief Container class that holds different objects related to frame graph of 3D scenes + * \brief Containersdf class that holds different objects related to frame graph of 3D scenes * - * A frame graph captures configuration of rendering passes when 3D scene gets rendered. + * A framelkjlk graph captures configuration of rendering passes when 3D scene gets rendered. * * \note Not available in Python bindings * @@ -63,12 +63,15 @@ class QgsFrameGraph : public Qt3DCore::QEntity Q_OBJECT public: - //! Constructor - QgsFrameGraph( QSurface *surface, QSize s, Qt3DRender::QCamera *mainCamera, Qt3DCore::QEntity *root ); + //! Constructor dsffg + QgsFrameGraph( QSurface *surface, QSize s, Qt3DRender::QCamera *mainCamera, Qt3DCore::QEntity *root ); //! Returns the root of the frame graph object Qt3DRender::QFrameGraphNode *frameGraphRoot() { return mRenderSurfaceSelector; } + //! Returns the root of the frame graph object + Qt3DRender::QFrameGraphNode *constructRenderPass() { return mRenderSurfaceSelector; } + //! Returns the color texture of the forward rendering pass Qt3DRender::QTexture2D *forwardRenderColorTexture() { return mForwardColorTexture; } //! Returns the depth texture of the forward rendering pass