Skip to content

Commit

Permalink
Merge branch 'master' into no-leak-build-path
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 4, 2024
2 parents 5eb5de6 + 41368b2 commit 912ae75
Show file tree
Hide file tree
Showing 514 changed files with 744,940 additions and 644,473 deletions.
6 changes: 2 additions & 4 deletions .ci/test_blocklist_qt6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ test_core_compositionconverter
test_core_expression
test_core_labelingengine
test_core_layoutpicture
# test_core_ogcutils runs fine locally on Fedora:rawhide but not on CI
test_core_ogcutils
test_core_vectortilelayer
test_gui_processinggui
Expand Down Expand Up @@ -41,15 +42,12 @@ PyQgsPythonProvider
PyQgsAnnotation
PyQgsAuthenticationSystem
PyQgsBlockingProcess
PyQgsBookmarkModel
PyQgsCodeEditor
PyQgsDelimitedTextProvider
PyQgsEditWidgets
PyQgsElevationProfileCanvas
PyQgsProject
PyQgsFieldModel
PyQgsFloatingWidget
PyQgsJsonUtils
PyQgsLayoutHtml
PyQgsLineSymbolLayers
PyQgsMapBoxGlStyleConverter
Expand All @@ -61,7 +59,6 @@ PyQgsRasterAttributeTable
PyQgsRasterLayerRenderer
PyQgsShapefileProvider
PyQgsTextRenderer
PyQgsOGRProvider
PyQgsSpatialiteProvider
PyQgsSymbolLayerReadSld
PyQgsVectorLayerCache
Expand All @@ -81,4 +78,5 @@ ProcessingQgisAlgorithmsTestPt3
ProcessingQgisAlgorithmsTestPt4
ProcessingGdalAlgorithmsVectorTest
ProcessingGrassAlgorithmsImageryTest
# PyQgsProviderRegistry runs fine locally on Fedora:rawhide but not on CI
PyQgsProviderRegistry
13 changes: 4 additions & 9 deletions .docker/docker-qgis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ pushd ${CTEST_BUILD_DIR} > /dev/null
echo "${bold}Running cmake...${endbold}"
echo "::group::cmake"

if [[ -f "/usr/lib64/ccache/clang" ]]; then
export CC=/usr/lib64/ccache/clang
export CXX=/usr/lib64/ccache/clang++
else
export CC=/usr/lib/ccache/clang
export CXX=/usr/lib/ccache/clang++
fi

BUILD_TYPE=Release

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

if [[ "${WITH_CLAZY}" = "ON" ]]; then
# In release mode, all variables in QgsDebugMsg would be considered unused
BUILD_TYPE=Debug
Expand Down Expand Up @@ -75,7 +70,7 @@ fi
cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DUSE_CCACHE=OFF \
-DUSE_CCACHE=ON \
-DBUILD_WITH_QT6=${BUILD_WITH_QT6} \
-DWITH_DESKTOP=ON \
-DWITH_ANALYSIS=ON \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if [[ "${GITHUB_REF}" =~ ^refs/tags ]]; then
echo "matrix={\"branch\":[\"${GITHUB_REF##*/}\"]}" >> $GITHUB_OUTPUT
else
echo "matrix={\"branch\":[\"master\", \"release-3_34\", \"release-3_28\"]}" >> $GITHUB_OUTPUT
echo "matrix={\"branch\":[\"master\", \"release-3_34\", \"release-3_36\"]}" >> $GITHUB_OUTPUT
fi
build-docker:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Cache
id: cache
uses: actions/cache@v4.0.0
uses: actions/cache@v4
with:
path: ~/.ccache
key: docker-build-${{ matrix.branch }}-${{ github.sha }}
Expand Down
40 changes: 13 additions & 27 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Prepare build cache for pull request
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name == 'pull_request'
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: build-mac-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }}
# The head_ref or source branch of the pull request in a workflow run.
# The base_ref or target branch of the pull request in a workflow run.
key: build-ccache-mac-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-mac-ccache-${{ github.actor }}-${{ github.head_ref }}-
build-mac-ccache-refs/heads/${{ github.base_ref }}-
build-mac-ccache-refs/heads/master-
- name: Prepare build cache for branch/tag
# use a fork of actions/cache@v2 to upload cache even when the build or test failed
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name != 'pull_request'
with:
path: ${{ env.CCACHE_DIR }}
# The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/<branch_name>, and for tags it is refs/tags/<tag_name>
key: build-mac-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
build-mac-ccache-${{ github.ref }}-
build-mac-ccache-refs/heads/master-
build-ccache-mac-master
# Qt caching
- name: Cache Qt
id: cache-qt
uses: actions/cache@v4.0.0
uses: actions/cache@v4
with:
path: ${{ env.DEPS_CACHE_DIR }}/Qt/${{ env.QT_VERSION }}
key: mac-qt-${{ env.QT_VERSION }}
Expand All @@ -90,7 +71,7 @@ jobs:
# QGIS-deps caching
- name: Cache qgis-deps
id: cache-deps
uses: actions/cache@v4.0.0
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 }}
Expand All @@ -109,8 +90,6 @@ jobs:
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 }}
Expand Down Expand Up @@ -150,3 +129,10 @@ jobs:
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 }}
32 changes: 11 additions & 21 deletions .github/workflows/mingw-w64-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,13 @@ jobs:
update: true
release: false

- name: Prepare build cache for pull request
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name == 'pull_request'
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: build
key: mingw-w64-msys2-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }}
# The head_ref or source branch of the pull request in a workflow run.
# The base_ref or target branch of the pull request in a workflow run.
key: build-ccache-mingw64-msys2-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
mingw-w64-msys2-ccache-${{ github.actor }}-${{ github.head_ref }}-
mingw-w64-msys2-ccache-${{ github.base_ref }}-
mingw-w64-msys2-ccache-refs/heads/master-
- name: Prepare build cache for branch/tag
# use a fork of actions/cache@v2 to upload cache even when the build or test failed
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name != 'pull_request'
with:
path: build
# The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/<branch_name>, and for tags it is refs/tags/<tag_name>
key: mingw-w64-msys2-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
mingw-w64-msys2-ccache-${{ github.ref }}-
mingw-w64-msys2-ccache-refs/heads/master-
build-ccache-mingw64-msys2-master
- name: Configure QGIS
run: |
Expand All @@ -102,3 +85,10 @@ jobs:
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 }}
35 changes: 12 additions & 23 deletions .github/workflows/mingw64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,23 @@ jobs:
- name: Create ccache dir
run: mkdir -p /w/.ccache/QGIS

- name: Prepare build cache for pull request
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name == 'pull_request'
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /w/.ccache/QGIS
key: mingw64-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }}
# The head_ref or source branch of the pull request in a workflow run.
# The base_ref or target branch of the pull request in a workflow run.
key: build-ccache-mingw64-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
mingw64-ccache-${{ github.actor }}-${{ github.head_ref }}-
mingw64-ccache-${{ github.base_ref }}-
mingw64-ccache-refs/heads/master-
- name: Prepare build cache for branch/tag
# use a fork of actions/cache@v2 to upload cache even when the build or test failed
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name != 'pull_request'
with:
path: /w/.ccache/QGIS
# The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/<branch_name>, and for tags it is refs/tags/<tag_name>
key: mingw64-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
mingw64-ccache-${{ github.ref }}-
mingw64-ccache-refs/heads/master-
build-ccache-mingw64-master
- name: Build QGIS Application
run: |
CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4
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 }}

- name: Create Portable zip
run: |
Expand Down
56 changes: 23 additions & 33 deletions .github/workflows/ogc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,40 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare build cache for pull request
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name == 'pull_request'
- name: Restore build cache
uses: actions/cache/restore@v3
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-ogc-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }}
# The head_ref or source branch of the pull request in a workflow run.
# The base_ref or target branch of the pull request in a workflow run.
key: build-ccache-ogc-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-ogc-${{ github.actor }}-${{ github.head_ref }}-
build-ccache-ogc-refs/heads/${{ github.base_ref }}-
build-ccache-ogc-refs/heads/master-
build-ccache-ogc-master
- name: Prepare build cache for branch/tag
# use a fork of actions/cache@v2 to upload cache even when the build or test failed
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name != 'pull_request'
with:
path: /home/runner/QGIS/.ccache
# The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/<branch_name>, and for tags it is refs/tags/<tag_name>
key: build-ccache-ogc-${{ github.ref }}-${{ github.sha }}
restore-keys: |
build-ccache-ogc-${{ github.ref }}-
build-ccache-ogc-refs/heads/master-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker Container with Build Environment
- name: Build Docker Container
id: docker-build
uses: whoan/docker-build-with-cache-action@v8
uses: docker/build-push-action@v5
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
image_name: qgis-deps-ogc
tags: qgis/qgis-deps-ogc:${{ github.event.pull_request.base.ref || github.ref_name }}
context: .ci/ogc
dockerfile: Dockerfile
push_git_tag: true
push_image_and_stages: on:push
pull_image_and_stages: ${{ github.event_name != 'workflow_dispatch' }}
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.FULL_IMAGE_NAME }}
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 }}

- name: Install pyogctest
run: |
Expand All @@ -101,12 +91,12 @@ jobs:
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.FULL_IMAGE_NAME }}
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.FULL_IMAGE_NAME }}
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
26 changes: 9 additions & 17 deletions .github/workflows/pr-needs-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,17 @@ jobs:
LABEL=$(sed -r 's/^([[:digit:]]\.[[:digit:]]+)(\.[[:digit:]]+)?$/\1/' <<< ${MILESTONE})
echo ${LABEL}
echo "label=${LABEL}" >> $GITHUB_OUTPUT
# get the PR body
# get the PR body
- name: Get PR body as JSON
id: get_pr_info
uses: octokit/request-action@v2.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: GET /repos/qgis/QGIS/pulls/:pull_number
pull_number: ${{ github.event.pull_request.number }}

# extract body from json output
- name: Get PR body as text
id: get_pr_body
uses: gr2m/get-json-paths-action@v1.x
with:
json: ${{ steps.get_pr_info.outputs.data }}
body: "body"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_BODY: "${{ github.event.pull_request.body }}"
run: |
echo 'body<<EOF' >> $GITHUB_OUTPUT
echo "$PR_BODY" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
# get commits from the PR
- name: Get PR commits
Expand All @@ -133,7 +125,7 @@ jobs:
# create the documentation issue
- name: Create Documentation issue
id: doc_issue
uses: maxkomarychev/oction-create-issue@v0.7.1
uses: dacbd/create-issue-action@v2.0.0
with:
token: ${{ secrets.GH_TOKEN_BOT }}
owner: qgis
Expand All @@ -144,7 +136,7 @@ jobs:
# 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 }}
From pull request qgis/QGIS#${{ github.event.pull_request.number }}
Author: @${{ github.event.pull_request.user.login }}
QGIS version: ${{ steps.milestone2label.outputs.label }}
Expand Down
Loading

0 comments on commit 912ae75

Please sign in to comment.