Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check for Qwt>=6.2.0 for QWT_POLAR #57023

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

set -e

# check for docker-compose and docker availability
# check for docker availability
command -v docker > /dev/null || {
echo "Please install docker" >&2
exit 1
}
command -v docker-compose > /dev/null || {
echo "Please install docker-compose" >&2
exit 1
}

IMAGE_BUILD_DEPS=qgis/qgis3-build-deps:latest
UPDATE_IMAGES=yes
Expand Down Expand Up @@ -115,7 +111,7 @@ if test "$(docker images -q qgis3-build-deps-binary-image)" = ""; then
fi

if test "${INTERACTIVE}" = "no"; then
echo "--=[ Running tests via docker-compose"
echo "--=[ Running tests via docker compose"
COMMAND=${QGIS_WORKSPACE_MOUNTPOINT}/.docker/docker-qgis-test.sh
COMMAND_ARGS="${TESTS_TO_RUN}"
else
Expand All @@ -129,7 +125,7 @@ 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

docker-compose \
docker compose \
MehdiChinoune marked this conversation as resolved.
Show resolved Hide resolved
-f .docker/docker-compose-testing.yml \
run \
-w "${QGIS_WORKSPACE_MOUNTPOINT}" \
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/mingw-w64-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:

- name: Configure QGIS
run: |
CXXFLAGS="-DQWT_POLAR_VERSION=0x060200" \
cmake \
-G"Ninja" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
Expand All @@ -74,7 +73,6 @@ jobs:
-DWITH_DRACO=ON \
-DWITH_PDAL=OFF \
-DWITH_CUSTOM_WIDGETS=ON \
-DWITH_QWTPOLAR=OFF \
-DWITH_BINDINGS=OFF \
-DWITH_GRASS=OFF \
-DUSE_CCACHE=ON \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ogc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ jobs:
- 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
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
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ jobs:
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
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() }}
Expand Down
7 changes: 4 additions & 3 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,16 @@ find_package(${QT_VERSION_BASE} COMPONENTS UiTools REQUIRED)

set (WITH_QWTPOLAR FALSE CACHE BOOL "Determines whether QwtPolar is available or whether functionality requiring QwtPolar should be disabled.")
# Once we bump the minimum QWT VERSION to 6.2 or newer, we should get rid of WITH_QWTPOLAR
if(Qwt_VERSION_STRING VERSION_GREATER_EQUAL 6.2 OR WITH_QWTPOLAR)
if(QWT_VERSION_STR VERSION_GREATER_EQUAL 6.2 OR WITH_QWTPOLAR)
add_definitions(-DWITH_QWTPOLAR)

if(Qwt_VERSION_STRING VERSION_LESS 6.2)
if(QWT_VERSION_STR VERSION_LESS 6.2)
find_package(QwtPolar REQUIRED)
else()
set(FOUND_QwtPolar TRUE)
set(QWTPOLAR_LIBRARY ${QWT_LIBRARY})
set(QWTPOLAR_INCLUDE_DIR ${QWT_INCLUDE_DIR})
add_definitions(-DQWT_POLAR_VERSION=0x060200)
endif()
# If not found on the system, offer the possibility to build QwtPolar
# internally
Expand All @@ -403,7 +404,7 @@ if(Qwt_VERSION_STRING VERSION_GREATER_EQUAL 6.2 OR WITH_QWTPOLAR)
else()
set(DEFAULT_WITH_INTERNAL_QWTPOLAR FALSE)
endif()
set (WITH_INTERNAL_QWTPOLAR DEFAULT_WITH_INTERNAL_QWTPOLAR CACHE BOOL "Use internal build of QwtPolar")
set (WITH_INTERNAL_QWTPOLAR ${DEFAULT_WITH_INTERNAL_QWTPOLAR} CACHE BOOL "Use internal build of QwtPolar")

if(WITH_INTERNAL_QWTPOLAR)
set(QGIS_APP_SRCS
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Some tests require a specific PostgreSQL server configuration
to bring up such server would be to (tweak $srcdir appropriately):

QGIS_WORKSPACE=${srcdir} \
docker-compose -f .docker/docker-compose-testing-postgres.yml up -d postgres
docker compose -f .docker/docker-compose-testing-postgres.yml up -d postgres
export PGHOST=`docker inspect docker_postgres_1 | jq -r .[0].NetworkSettings.Networks.docker_default.IPAddress`
export PGUSER=docker
export PGPASSWORD=docker
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_authmanager_password_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

It uses a docker container as postgres/postgis server with certificates from tests/testdata/auth_system/certs_keys_2048

Use docker-compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server
Use docker compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server

TODO:
- Document how to restore the server data
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_authmanager_pki_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

It uses a docker container as postgres/postgis server with certificates from tests/testdata/auth_system/certs_keys_2048

Use docker-compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server.
Use docker compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server.

TODO:
- Document how to restore the server data
Expand Down
Loading