From a054ce37060329990b728c432ea8596d736c95a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Tue, 18 May 2021 08:17:21 +0200 Subject: [PATCH 1/3] Python3 dependency is not obligatory Some of the CI-Linux-Distros jobs failed because of this. Python3 is not available by default on Debian:9 nor in Centos:8. Since we are not currently running the tests in those platforms, and python3 is just used for testing, we do not want to enforce this project dependency. --- CMakeLists.txt | 28 +++++++++++++++------------- cmake/findDependencies.cmake | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3c91f0f7d..410dad4d45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,21 +91,23 @@ if( EXIV2_BUILD_UNIT_TESTS ) endif() if( EXIV2_BUILD_SAMPLES ) - add_test(NAME bashTests - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests - COMMAND cmake -E env EXIV2_BINDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${Python3_EXECUTABLE} runner.py bash_tests/testcases.py --verbose - ) - add_test(NAME versionTests - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests - COMMAND cmake -E env EXIV2_BINDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${Python3_EXECUTABLE} runner.py bash_tests/version_test.py - ) - add_test(NAME pythonTests - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests - COMMAND cmake -E env EXIV2_BINDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${Python3_EXECUTABLE} runner.py - ) - add_subdirectory( samples ) get_directory_property(SAMPLES DIRECTORY samples DEFINITION APPLICATIONS) + + if (Python3_Interpreter_FOUND) + add_test(NAME bashTests + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests + COMMAND cmake -E env EXIV2_BINDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${Python3_EXECUTABLE} runner.py bash_tests/testcases.py --verbose + ) + add_test(NAME versionTests + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests + COMMAND cmake -E env EXIV2_BINDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${Python3_EXECUTABLE} runner.py bash_tests/version_test.py + ) + add_test(NAME pythonTests + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests + COMMAND cmake -E env EXIV2_BINDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${Python3_EXECUTABLE} runner.py + ) + endif() endif() if( EXIV2_ENABLE_NLS ) diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 94235c9499..55e0f14010 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -11,7 +11,7 @@ else() list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}) endif() -find_package (Python3 COMPONENTS Interpreter REQUIRED) +find_package (Python3 COMPONENTS Interpreter) # don't use Frameworks on the Mac (#966) if (APPLE) From bc64d2f34d0711169c6d9e4319761b18326d4122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Tue, 18 May 2021 08:20:19 +0200 Subject: [PATCH 2/3] ci - Replace debian:9 with debian:10 --- .github/workflows/nightly_Linux_distributions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly_Linux_distributions.yml b/.github/workflows/nightly_Linux_distributions.yml index 586e1ecc32..2bf8ab5acb 100644 --- a/.github/workflows/nightly_Linux_distributions.yml +++ b/.github/workflows/nightly_Linux_distributions.yml @@ -15,7 +15,7 @@ jobs: matrix: # arch suffering this issue: https://github.com/abseil/abseil-cpp/issues/709 # centos:8 had linking issues with gtest - container_image: ["fedora:latest", "debian:9", "archlinux:base", "ubuntu:20.04", "centos:8", "opensuse/tumbleweed", "alpine:3.13"] + container_image: ["fedora:latest", "debian:10", "archlinux:base", "ubuntu:20.04", "centos:8", "opensuse/tumbleweed", "alpine:3.13"] compiler: [g++, clang++] build_type: [Release, Debug] shared_libraries: [ON, OFF] From 5ba584698521dd69f3342812039408b72bdc1eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Tue, 18 May 2021 08:22:12 +0200 Subject: [PATCH 3/3] ci - Linux distros jobs being more explicit about options used --- .github/workflows/nightly_Linux_distributions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly_Linux_distributions.yml b/.github/workflows/nightly_Linux_distributions.yml index 2bf8ab5acb..9b11b9acbd 100644 --- a/.github/workflows/nightly_Linux_distributions.yml +++ b/.github/workflows/nightly_Linux_distributions.yml @@ -22,7 +22,7 @@ jobs: container: image: ${{ matrix.container_image }} env: - CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DCMAKE_INSTALL_PREFIX=install + CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DEXIV2_ENABLE_PNG=ON -DCMAKE_INSTALL_PREFIX=install steps: - name: install tar in opensuse