Skip to content

Commit

Permalink
Merge branch 'master' into qgs3dwindow
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Dec 17, 2023
2 parents 8bd8d93 + e5a8aa3 commit db47e93
Show file tree
Hide file tree
Showing 5,294 changed files with 1,393,362 additions and 665,495 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 0 additions & 2 deletions .ci/ctest2ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
__author__ = 'Matthias Kuhn'
__date__ = 'March 2017'
__copyright__ = '(C) 2017, Matthias Kuhn'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

# This script parses output from ctest and injects
#
Expand Down
1 change: 1 addition & 0 deletions .ci/ogc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN apt-get update \
libzip-dev \
libprotobuf-dev \
qtbase5-dev \
libdraco-dev \
libqt5svg5-dev \
libqt5serialport5-dev \
qttools5-dev \
Expand Down
2 changes: 1 addition & 1 deletion .ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ else
fi

# Create an empty minio folder with appropriate permissions so www user can write inside it
mkdir -p /tmp/minio_tests/test_bucket && chmod -R 777 /tmp/minio_tests
mkdir -p /tmp/minio_tests/test-bucket && chmod -R 777 /tmp/minio_tests

# Create an empty webdav folder with appropriate permissions so www user can write inside it
mkdir -p /tmp/webdav_tests && chmod 777 /tmp/webdav_tests
Expand Down
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Checks: 'bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-virtual-near-miss'
3 changes: 1 addition & 2 deletions .docker/docker-qgis-clangtidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ curl -XGET https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-14.0.6/cl
echo "::endgroup::"

echo "${bold}Run clang-tidy on modifications...${endbold}"
CLANG_TIDY_CHECKS=$(cat tests/code_layout/clangtidy_checks.txt | grep -ve "^#" | grep -ve "^$" | tr -d '\n')

# We need to add build/src/test dir as extra include directories because when clang-tidy tries to process qgstest.h
# it has no compile_commands.json instructions to know what are include directories
# It manages to figure out for other headers though, I don't get how...
git diff -U0 HEAD^ | python3 clang-tidy-diff.py -p1 -path=${CTEST_BUILD_DIR} -use-color -checks="$CLANG_TIDY_CHECKS" -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ | tee clang-tidy.log
git diff -U0 HEAD^ | python3 clang-tidy-diff.py -p1 -path=${CTEST_BUILD_DIR} -use-color -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ | tee clang-tidy.log

echo -e "\e[1;34mTo reproduce locally:"
echo -e "\e[1;34m - launch cmake with option -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
Expand Down
13 changes: 7 additions & 6 deletions .docker/qgis3-qt5-build-deps.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ RUN apt-get update \
dh-python \
git \
gdal-bin \
gnupg \
gpsbabel \
graphviz \
libaio1 \
libdraco4 \
libexiv2-27 \
libfcgi0ldbl \
libgsl27 \
Expand Down Expand Up @@ -109,7 +111,10 @@ RUN apt-get update \
&& apt-get clean

# Node.js and Yarn for server landingpage webapp
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install -y nodejs
RUN corepack enable

Expand Down Expand Up @@ -160,11 +165,6 @@ ENV PATH="/usr/sap/hdbclient:${PATH}"
# RUN apt-get update
# RUN ACCEPT_EULA=Y apt-get install -y --allow-unauthenticated msodbcsql17 mssql-tools

# OTB: download and install otb packages for QGIS tests
RUN curl -k https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-7.1.0-Linux64.run -o /tmp/OTB-Linux64.run && sh /tmp/OTB-Linux64.run --target /opt/otb
ENV OTB_INSTALL_DIR=/opt/otb


FROM binary-only

RUN apt-get update \
Expand All @@ -175,6 +175,7 @@ RUN apt-get update \
cmake \
flex \
grass-dev \
libdraco-dev \
libexiv2-dev \
libexpat1-dev \
libfcgi-dev \
Expand Down
3 changes: 1 addition & 2 deletions .docker/qgis3-qt6-build-deps.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN dnf -y --refresh install \
clang \
clazy \
curl \
draco-devel \
exiv2-devel \
expat-devel \
fcgi-devel \
Expand Down Expand Up @@ -69,8 +70,6 @@ RUN dnf -y --refresh install \
patch \
dos2unix

# Workaround https://bugreports.qt.io/browse/QTBUG-113227 for now, roll back to qt 6.4
RUN dnf -y downgrade qt6-qtbase-6.4.3-1.fc38 qt6-qt3d-6.4.3-1.fc38 qt6-qtdeclarative.6.4.3-1.fc38 qt6-qtserialport.6.4.3-1.fc38 qt6-qtsvg.6.4.3-1.fc38 qt6-qtpositioning.6.4.3-1.fc38 qt6-qtdeclarative.6.4.3-1.fc38 qt6-qt5compat-6.4.3-1.fc38 qt6-qtmultimedia.6.4.3-1.fc38 --allowerasing

# Oracle : client side
RUN curl https://download.oracle.com/otn_software/linux/instantclient/199000/instantclient-basic-linux.x64-19.9.0.0.0dbru.zip > instantclient-basic-linux.x64-19.9.0.0.0dbru.zip
Expand Down
8 changes: 6 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ by running the prepare commit script **before** issuing `git commit`.

./scripts/prepare_commit.sh

This can be automated by setting up the pre-commit hook properly.
This can be automated by adding it to a pre-commit hook, for example:

ln -s ../../scripts/prepare_commit.sh .git/hooks/pre-commit
pushd $(git rev-parse --git-common-dir)/hooks
test -e pre-commit && mv pre-commit pre-commit.000
echo '$(git rev-parse --show-toplevel)/scripts/prepare_commit.sh' > pre-commit
chmod +x pre-commit
popd

Getting your pull request merged
--------------------------------
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/10_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body:
Each month, there is a new release of QGIS. According to the release schedule, you should at least be running a supported QGIS version.
You can check the release schedule https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule
options:
- label: I'm running a supported QGIS version according to the roadmap.
- label: I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule).

- type: checkboxes
id: new-profile
Expand All @@ -63,7 +63,7 @@ body:
Read this link how to create a new profile
https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles
options:
- label: I tried with a new QGIS profile
- label: I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles)

- type: textarea
id: additional-context
Expand Down
14 changes: 11 additions & 3 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_30\", \"release-3_28\"]}" >> $GITHUB_OUTPUT
echo "matrix={\"branch\":[\"master\", \"release-3_34\", \"release-3_28\"]}" >> $GITHUB_OUTPUT
fi
build-docker:
Expand All @@ -55,6 +55,14 @@ jobs:
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
Expand All @@ -70,7 +78,7 @@ jobs:
- name: Cache
id: cache
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: ~/.ccache
key: docker-build-${{ matrix.branch }}-${{ github.sha }}
Expand All @@ -79,7 +87,7 @@ jobs:
docker-build-master-
- name: checkout ${{ matrix.branch }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}

Expand Down
104 changes: 104 additions & 0 deletions .github/workflows/build_artifact_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Write build artifact comments

on:
workflow_run:
workflows: [🪟 MingW64 Windows 64bit Build]
types:
- completed
branches-ignore:
- 'master'
- 'release*'

jobs:
on-success:

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/qgis/QGIS/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/qgis/QGIS/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
});
}
Loading

0 comments on commit db47e93

Please sign in to comment.