diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40067d0fa6919fc06b1fe4189e708c7a47dcc8ec..83eb89c59acc4d4e7020ff04dbf0ee2c113f787d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,6 +37,7 @@ variables: GIT_CHECKOUT: "false" # The fetch strategy fails with LFS and GitLab GIT_STRATEGY: "clone" + PACKAGE_OTB_VERSION: "latest" workflow: rules: @@ -121,12 +122,12 @@ fast-build: - merge_requests - branches stage: precheck - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native-develop-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native:22.04 before_script: - export GIT_LFS_SKIP_SMUDGE=1 - git checkout -f -q $CI_COMMIT_SHA script: - - ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-20.04-fast + - ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-22.04-fast - ccache -s legal-check: @@ -147,49 +148,58 @@ legal-check: #------------------------- prepare & build jobs -------------------------------- -# Ubuntu superbuild -ubuntu-20-prepare: +## Ubuntu superbuild +ubuntu-22-prepare: extends: .common-prepare - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:22.04 script: - - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=ubuntu-20.04-llvm-full -DOTB_FULL_BUILD:BOOL=ON + - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=ubuntu-22.04-llvm-full -DOTB_FULL_BUILD:BOOL=ON -ubuntu-22-prepare: +ubuntu-24-prepare: extends: .common-prepare - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:22.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:24.04 script: - - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=ubuntu-20.04-llvm-full + - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=ubuntu-24.04-llvm-xdk-full -DOTB_FULL_BUILD:BOOL=ON + artifacts: + untracked: false + when: on_success + access: all + expire_in: 24hrs + paths: + - xdk/lib/python3/* -ubuntu-20-build: +ubuntu-22-build: extends: .common-build - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:22.04 script: - - ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=ubuntu-20.04-llvm-xdk-full + - ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=ubuntu-22.04-llvm-xdk-full - mv build/CookBook-*-html.tar.gz . || true - mv build/Documentation/Cookbook/latex/CookBook-*.pdf . || true - mv build/Documentation/Doxygen/OTB-Doxygen-*.tar.bz2 . || true - - ctest -V -S CI/superbuild_packaging.cmake -DIMAGE_NAME:string=ubuntu-20.04-llvm-xdk-full -DPACKAGE_BY_MODULE:BOOL=ON - - ctest -V -S CI/superbuild_packaging.cmake -DIMAGE_NAME:string=ubuntu-20.04-llvm-xdk-full -DPACKAGE_BY_MODULE:BOOL=OFF + - ctest -V -S CI/superbuild_packaging.cmake -DIMAGE_NAME:string=ubuntu-22.04-llvm-xdk-full -DPACKAGE_BY_MODULE:BOOL=ON + - ctest -V -S CI/superbuild_packaging.cmake -DIMAGE_NAME:string=ubuntu-22.04-llvm-xdk-full -DPACKAGE_BY_MODULE:BOOL=OFF - mv build_packages/OTB-*.tar.gz . || true needs: - - job: ubuntu-20-prepare + - job: ubuntu-22-prepare artifacts: true -# Ubuntu 22 build needed for gdal bindings with python 3.10. We package the compiled bindings for python 3.10, this package will be downloaded and extracted automatically when +# Ubuntu 24 build needed for gdal bindings with python 3.12. We package the compiled bindings for python 3.12, this package will be downloaded and extracted automatically when # a user lauches the otbenv profile after unpacking the official archive for the first time (which contains bindings for ubuntu 20 and python 3.8 initially) -ubuntu-22-gdal-bindings: +python3.12-gdal-bindings: extends: .common-build - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:22.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:24.04 only: changes: - SuperBuild/CMake/External_gdal.cmake refs: + - develop - /^release-[0-9]+\.[0-9]+$/ + - merge_requests script: - - ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=ubuntu-22.04-llvm-xdk-full -Dci_skip_testing:BOOL=ON - - find xdk/lib/python3/dist-packages/osgeo/ -type f -name "*.so" -printf "%P\n" | tar -czf OTB-GDAL-bindings-py310.tar.gz --no-recursion -C xdk/lib/python3/dist-packages/osgeo -T - + - PACKAGE_OTB_VERSION=`ls lib/libOTBCommon.so.*.*.* | egrep -o "[0-9]+\.[0-9]+\.[0-9]$"` + - find xdk/lib/python3/dist-packages/osgeo/ -type f -name "*.so" -printf "%P\n" | tar -czf OTB-$PACKAGE_OTB_VERSION-GDAL-bindings-py312.tar.gz --no-recursion -C xdk/lib/python3/dist-packages/osgeo -T - needs: - - job: ubuntu-22-prepare + - job: ubuntu-24-prepare artifacts: true ## RedHat superbuild @@ -277,17 +287,17 @@ ubuntu-qa-code-coverage: - /^release-[0-9]+\.[0-9]+$/ variables: - $SONAR_OTB_TOKEN - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa:22.04 script: - ctest -V -S CI/main_qa.cmake - -DIMAGE_NAME:string=ubuntu-20.04-llvm-qa + -DIMAGE_NAME:string=ubuntu-22.04-llvm-qa -DQA:BOOL=ON - ./CI/otb_coverage.sh - saxon-xslt -o build/ctest_report.xml build/Testing/`head -n 1 build/Testing/TAG`/Test.xml CI/ctest2junit.xsl needs: - - job: ubuntu-20-prepare + - job: ubuntu-22-prepare artifacts: true ubuntu-qa-static-analysis: @@ -299,7 +309,7 @@ ubuntu-qa-static-analysis: - /^release-[0-9]+\.[0-9]+$/ variables: - $SONAR_OTB_TOKEN - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa:22.04 script: - find Modules -type f -regextype posix-extended -regex '.*\.(h|hxx)$' -exec dirname '{}' \; | grep -vE '^Modules/ThirdParty/' | @@ -311,14 +321,14 @@ ubuntu-qa-static-analysis: 2> build/cppcheck_report.xml after_script: [] needs: - - job: ubuntu-20-prepare + - job: ubuntu-22-prepare artifacts: true ubuntu-sonar-report: extends: .common variables: GIT_DEPTH: "" - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa:22.04 stage: report only: refs: @@ -359,7 +369,7 @@ deploy: script: - ./CI/deploy.sh $CI_COMMIT_REF_NAME $RC_NUMBER needs: - - job: ubuntu-20-build + - job: ubuntu-22-build artifacts: true - job: windows-10-build artifacts: true @@ -369,7 +379,7 @@ deploy: update-archive: tags: - deploy - image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base-headless:20.04 + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:22.04 stage: deploy extends: .general only: @@ -384,7 +394,7 @@ update-archive: - ./CI/deploy-archive.sh build_archive needs: # don't push the archive if Superbuild was not successful - - job: ubuntu-20-prepare + - job: ubuntu-22-prepare artifacts: false @@ -413,12 +423,12 @@ release-docker: refs: - /^release-[0-9]+\.[0-9]+$/ needs: - - job: ubuntu-20-build + - job: ubuntu-22-build artifacts: true script: # to authenticate in docker hub, kaniko needs a config file located at # /kaniko/.docker/config.json - - mkdir -p /kaniko/.docker ||Â true + - mkdir -p /kaniko/.docker || true - echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$(printf "%s:%s" "${DOCKER_HUB_USER}" "${DOCKER_HUB_PWD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --cleanup --verbosity warn diff --git a/CI/ubuntu-20.04-llvm-xdk-full.cmake b/CI/ubuntu-20.04-llvm-xdk-full.cmake deleted file mode 100644 index 82c416152232c7a3e9698682cc1ecedb0bf44e93..0000000000000000000000000000000000000000 --- a/CI/ubuntu-20.04-llvm-xdk-full.cmake +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES) -# -# This file is part of Orfeo Toolbox -# -# https://www.orfeo-toolbox.org/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Configuration options for ubuntu-20.04-llvm-xdk - -set(site_option -"CMAKE_C_COMPILER:STRING=clang -CMAKE_CXX_COMPILER:STRING=clang++ -CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld -CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld -CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld -OTB_BUILD_FeaturesExtraction:BOOL=ON -OTB_BUILD_Hyperspectral:BOOL=ON -OTB_BUILD_Learning:BOOL=ON -OTB_BUILD_Miscellaneous:BOOL=ON -OTB_BUILD_Remote:BOOL=ON -OTB_BUILD_SAR:BOOL=ON -OTB_BUILD_Segmentation:BOOL=ON -OTB_BUILD_StereoProcessing:BOOL=ON -OTB_USE_LIBSVM:BOOL=ON -OTB_USE_MUPARSER:BOOL=ON -OTB_USE_MUPARSERX:BOOL=ON -OTB_USE_OPENCV:BOOL=ON -OTB_USE_OPENMP:BOOL=OFF -OTB_USE_SHARK:BOOL=ON -USE_SYSTEM_OPENSSL:BOOL=OFF -") - -if(NOT ${ci_do_cookbook} EQUAL -1) - set(site_option -"${site_option} -BUILD_COOKBOOK:BOOL=ON") -endif() - -if(NOT ${ci_do_doxygen} EQUAL -1) - set(site_option -"${site_option} -BUILD_DOCUMENTATION:BOOL=ON -OTB_DOXYGEN_ITK_TAGFILE:FILEPATH=${CTEST_BINARY_DIRECTORY}/InsightDoxygenDocTag-4.13.0 -OTB_DOXYGEN_ITK_DOXYGEN_URL:STRING=\"https://itk.org/Doxygen413/html\" -") - set (ENABLE_DOXYGEN ON) - # The ITK doxygen tag file needs to be patched before being used for OTB - # See otb-devutils/Scripts/tagfile_fix.py - message(STATUS "Get resources for Doxygen build ...") - execute_process(COMMAND wget https://www.orfeo-toolbox.org/packages/archives/Doxygen/InsightDoxygenDocTag-4.13.0.gz - WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}) - execute_process(COMMAND gzip -d InsightDoxygenDocTag-4.13.0.gz - WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}) -endif() diff --git a/CI/ubuntu-20.04-fast.cmake b/CI/ubuntu-22.04-fast.cmake similarity index 89% rename from CI/ubuntu-20.04-fast.cmake rename to CI/ubuntu-22.04-fast.cmake index e2a6f000a9fd24c2b69503e7e755db4a582d585c..b8420539e95e6633bfd0cbbd848c9889502dd86f 100644 --- a/CI/ubuntu-20.04-fast.cmake +++ b/CI/ubuntu-22.04-fast.cmake @@ -18,11 +18,10 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-fast +# Configuration options for ubuntu-22.04-fast set(site_option -"opencv_INCLUDE_DIR:PATH=/usr/include/opencv4 -CMAKE_C_COMPILER:STRING=clang +"CMAKE_C_COMPILER:STRING=clang CMAKE_CXX_COMPILER:STRING=clang++ CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld diff --git a/CI/ubuntu-20.04-gcc.cmake b/CI/ubuntu-22.04-gcc.cmake similarity index 86% rename from CI/ubuntu-20.04-gcc.cmake rename to CI/ubuntu-22.04-gcc.cmake index fd0c801861aa7d8235070c0becf1335dc06d7c0f..c6d9260dcb439ac0fa8aa626fe1fb8e64636e51c 100644 --- a/CI/ubuntu-20.04-gcc.cmake +++ b/CI/ubuntu-22.04-gcc.cmake @@ -18,8 +18,7 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-gcc +# Configuration options for ubuntu-22.04-gcc set(site_option -"opencv_INCLUDE_DIR:PATH=/usr/include/opencv4 -OTB_USE_SHARK:BOOL=OFF") +"OTB_USE_SHARK:BOOL=OFF") diff --git a/CI/ubuntu-20.04-llvm-full.cmake b/CI/ubuntu-22.04-llvm-full.cmake similarity index 94% rename from CI/ubuntu-20.04-llvm-full.cmake rename to CI/ubuntu-22.04-llvm-full.cmake index 851c5ee5a47c5dfbe2838c554447290487a219dc..6f11a90a53568568df52770105714307374531ff 100644 --- a/CI/ubuntu-20.04-llvm-full.cmake +++ b/CI/ubuntu-22.04-llvm-full.cmake @@ -18,11 +18,10 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-llvm +# Configuration options for ubuntu-22.04-llvm set(site_option -"opencv_INCLUDE_DIR:PATH=/usr/include/opencv4 -CMAKE_C_COMPILER:STRING=clang +"CMAKE_C_COMPILER:STRING=clang CMAKE_CXX_COMPILER:STRING=clang++ CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld diff --git a/CI/ubuntu-20.04-llvm-nodoc.cmake b/CI/ubuntu-22.04-llvm-nodoc.cmake similarity index 88% rename from CI/ubuntu-20.04-llvm-nodoc.cmake rename to CI/ubuntu-22.04-llvm-nodoc.cmake index 380083a00d4d26aef442eb3ef0a41a615d11efc3..31127f1004d66cf8299b061f7de519ded2514eee 100644 --- a/CI/ubuntu-20.04-llvm-nodoc.cmake +++ b/CI/ubuntu-22.04-llvm-nodoc.cmake @@ -18,11 +18,10 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-llvm-nodoc +# Configuration options for ubuntu-22.04-llvm-nodoc set(site_option -"opencv_INCLUDE_DIR:PATH=/usr/include/opencv4 -CMAKE_C_COMPILER:STRING=clang +"CMAKE_C_COMPILER:STRING=clang CMAKE_CXX_COMPILER:STRING=clang++ CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld diff --git a/CI/ubuntu-20.04-llvm-qa.cmake b/CI/ubuntu-22.04-llvm-qa.cmake similarity index 96% rename from CI/ubuntu-20.04-llvm-qa.cmake rename to CI/ubuntu-22.04-llvm-qa.cmake index c19c3ad3e0df03ecf2bfe4de3f4593617a29ab0e..83eb1e9a6a418fea22f2c2ff0cadc489ab680af1 100644 --- a/CI/ubuntu-20.04-llvm-qa.cmake +++ b/CI/ubuntu-22.04-llvm-qa.cmake @@ -18,7 +18,7 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-llvm-qa +# Configuration options for ubuntu-22.04-llvm-qa set(site_option "CMAKE_C_COMPILER:STRING=clang diff --git a/CI/ubuntu-22.04-llvm-xdk-full.cmake b/CI/ubuntu-22.04-llvm-xdk-full.cmake index b0073ad11b8e145202c5823ac191011cab367807..ba92a6238d31a58b6b544a55d7535e02b621975e 100644 --- a/CI/ubuntu-22.04-llvm-xdk-full.cmake +++ b/CI/ubuntu-22.04-llvm-xdk-full.cmake @@ -18,7 +18,7 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-llvm-xdk +# Configuration options for ubuntu-22.04-llvm-xdk set(site_option "CMAKE_C_COMPILER:STRING=clang @@ -43,3 +43,26 @@ OTB_USE_OPENCV:BOOL=ON OTB_USE_OPENMP:BOOL=OFF OTB_USE_SHARK:BOOL=ON ") + +if(NOT ${ci_do_cookbook} EQUAL -1) + set(site_option +"${site_option} +BUILD_COOKBOOK:BOOL=ON") +endif() + +if(NOT ${ci_do_doxygen} EQUAL -1) + set(site_option +"${site_option} +BUILD_DOCUMENTATION:BOOL=ON +OTB_DOXYGEN_ITK_TAGFILE:FILEPATH=${CTEST_BINARY_DIRECTORY}/InsightDoxygenDocTag-4.13.0 +OTB_DOXYGEN_ITK_DOXYGEN_URL:STRING=\"https://itk.org/Doxygen413/html\" +") + set (ENABLE_DOXYGEN ON) + # The ITK doxygen tag file needs to be patched before being used for OTB + # See otb-devutils/Scripts/tagfile_fix.py + message(STATUS "Get resources for Doxygen build ...") + execute_process(COMMAND wget https://www.orfeo-toolbox.org/packages/archives/Doxygen/InsightDoxygenDocTag-4.13.0.gz + WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}) + execute_process(COMMAND gzip -d InsightDoxygenDocTag-4.13.0.gz + WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}) +endif() \ No newline at end of file diff --git a/CI/ubuntu-20.04-llvm-xdk.cmake b/CI/ubuntu-22.04-llvm-xdk.cmake similarity index 88% rename from CI/ubuntu-20.04-llvm-xdk.cmake rename to CI/ubuntu-22.04-llvm-xdk.cmake index 08690f63592ffa85580783f90aa3b4d82f77ae74..e16554f426440ce28edafcdd4af0335b03e244f9 100644 --- a/CI/ubuntu-20.04-llvm-xdk.cmake +++ b/CI/ubuntu-22.04-llvm-xdk.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES) +# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES) # # This file is part of Orfeo Toolbox # @@ -18,7 +18,7 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-llvm-xdk +# Configuration options for ubuntu-22.04-llvm-xdk set(site_option "CMAKE_C_COMPILER:STRING=clang diff --git a/CI/ubuntu-20.04-llvm.cmake b/CI/ubuntu-22.04-llvm.cmake similarity index 90% rename from CI/ubuntu-20.04-llvm.cmake rename to CI/ubuntu-22.04-llvm.cmake index 13847c277b0069c29ddc18d9bc7281b837962716..ecb12d9ba91629426d03597deb7297c9f29517a7 100644 --- a/CI/ubuntu-20.04-llvm.cmake +++ b/CI/ubuntu-22.04-llvm.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES) +# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES) # # This file is part of Orfeo Toolbox # @@ -18,11 +18,10 @@ # limitations under the License. # -# Configuration options for ubuntu-20.04-llvm +# Configuration options for ubuntu-22.04-llvm set(site_option -"opencv_INCLUDE_DIR:PATH=/usr/include/opencv4 -CMAKE_C_COMPILER:STRING=clang +"CMAKE_C_COMPILER:STRING=clang CMAKE_CXX_COMPILER:STRING=clang++ CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld diff --git a/CI/ubuntu-24.04-llvm-xdk-full.cmake b/CI/ubuntu-24.04-llvm-xdk-full.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a0529693fdab6e849fc49e33f7bf49f97286cc06 --- /dev/null +++ b/CI/ubuntu-24.04-llvm-xdk-full.cmake @@ -0,0 +1,44 @@ +# +# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Configuration options for ubuntu-24.04-llvm-xdk +set(site_option +"CMAKE_C_COMPILER:STRING=clang +CMAKE_CXX_COMPILER:STRING=clang++ +CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld +CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld +CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld +CMAKE_C_COMPILER_LAUNCHER:STRING=ccache +CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache +OTB_BUILD_FeaturesExtraction:BOOL=ON +OTB_BUILD_Hyperspectral:BOOL=ON +OTB_BUILD_Learning:BOOL=ON +OTB_BUILD_Miscellaneous:BOOL=ON +OTB_BUILD_Remote:BOOL=ON +OTB_BUILD_SAR:BOOL=ON +OTB_BUILD_Segmentation:BOOL=ON +OTB_BUILD_StereoProcessing:BOOL=ON +OTB_USE_LIBSVM:BOOL=ON +OTB_USE_MUPARSER:BOOL=ON +OTB_USE_MUPARSERX:BOOL=ON +OTB_USE_OPENCV:BOOL=ON +OTB_USE_OPENMP:BOOL=OFF +OTB_USE_SHARK:BOOL=ON +") diff --git a/Data/Baseline/OTB/Files/bfTvMatrixTransposeMatrixImageFilterResults.1.txt b/Data/Baseline/OTB/Files/bfTvMatrixTransposeMatrixImageFilterResults.1.txt new file mode 100644 index 0000000000000000000000000000000000000000..88ff48b8030d6d31c02b82f2821e62773d5f23b4 --- /dev/null +++ b/Data/Baseline/OTB/Files/bfTvMatrixTransposeMatrixImageFilterResults.1.txt @@ -0,0 +1,6 @@ +transpose : 250000 6.34334e+07 6.25864e+07 6.37228e+07 6.37487e+07 +6.34644e+07 1.61181e+10 1.59003e+10 1.61774e+10 1.61831e+10 +6.27084e+07 1.59239e+10 1.57499e+10 1.59859e+10 1.59904e+10 +6.37333e+07 1.61719e+10 1.59568e+10 1.62454e+10 1.62517e+10 +6.37496e+07 1.61754e+10 1.59595e+10 1.62492e+10 1.62558e+10 + diff --git a/Data/Baseline/OTB/Images/ioExtractROI_HDF2TIF_GSSTF_NCEP_100_20_200_100_channel_1.1.tif b/Data/Baseline/OTB/Images/ioExtractROI_HDF2TIF_GSSTF_NCEP_100_20_200_100_channel_1.1.tif new file mode 100644 index 0000000000000000000000000000000000000000..2f85d44219d41f23c22aa3d07494c8f5571688fe --- /dev/null +++ b/Data/Baseline/OTB/Images/ioExtractROI_HDF2TIF_GSSTF_NCEP_100_20_200_100_channel_1.1.tif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81a087cf1f29d97c2eab4976e82c486ae77525c4f4646901966f6951b42dfe29 +size 20593 diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 376137b146ce7059001f786ec38e7fad0fc0e909..ee2faff05b0501c3a8b85651b028c146d419ddb2 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG OTB_RELEASE=9.0.0 # Install system dependencies @@ -31,18 +31,21 @@ RUN apt-get update -y \ # Install pre-compiled OTB binaries RUN curl https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-$OTB_RELEASE-Linux.tar.gz -o OTB-$OTB_RELEASE-Linux.tar.gz -RUN tar xvf OTB-$OTB_RELEASE-Linux.tar.gz --one-top-level="/app" \ +RUN tar xvf OTB-$OTB_RELEASE-Linux.tar.gz --one-top-level="/app/otb" && rm OTB-$OTB_RELEASE-Linux.tar.gz # Persistent env -ENV CMAKE_PREFIX_PATH=/app/OTB-${OTB_RELEASE}-Linux -ENV PYTHONPATH=/app/OTB-$OTB_RELEASE-Linux/lib/python3/dist-packages:/app/OTB-${OTB_RELEASE}-Linux/lib/otb/python +ENV CMAKE_PREFIX_PATH=/app/otb +ENV PYTHONPATH=/app/otb/lib/python3/dist-packages:/app/otb/lib/otb/python ENV GDAL_DRIVER_PATH=disable -ENV GDAL_DATA=/app/OTB-${OTB_RELEASE}-Linux/share/gdal -ENV PROJ_LIB=/app/OTB-${OTB_RELEASE}-Linux/share/proj -ENV PATH=/app/OTB-${OTB_RELEASE}-Linux/bin:$PATH -ENV LD_LIBRARY_PATH=/app/OTB-${OTB_RELEASE}-Linux/lib:$LD_LIBRARY_PATH -ENV OTB_APPLICATION_PATH=/app/OTB-${OTB_RELEASE}-Linux/lib/otb/applications +ENV GDAL_DATA=/app/otb/share/gdal +ENV PROJ_LIB=/app/otb/share/proj +ENV PATH=/app/otb/bin:$PATH +ENV LD_LIBRARY_PATH=/app/otb/lib:$LD_LIBRARY_PATH +ENV OTB_APPLICATION_PATH=/app/otb/lib/otb/applications +ENV OTB_INSTALL_DIR=/app/otb ENV LC_NUMERIC=C # Default command when using 'docker run' or 'docker create' +RUN sh /app/otb/tools/post_install.sh && sh /app/otb/recompile_bindings.sh + CMD /bin/bash diff --git a/Docker/Dockerfile_CI b/Docker/Dockerfile_CI index 59523061817328272b0a6a9f6be8e24af41bf7ab..05f5c262ee9060ae2a324de59a0bbf42b187f1ee 100644 --- a/Docker/Dockerfile_CI +++ b/Docker/Dockerfile_CI @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG OTB_RELEASE=9.0.0 # Install system dependencies @@ -44,7 +44,7 @@ ENV OTB_APPLICATION_PATH=/app/otb/lib/otb/applications ENV LC_NUMERIC=C ENV OTB_INSTALL_DIR=/app/otb -RUN sh /app/otb/tools/post_install.sh +RUN sh /app/otb/tools/post_install.sh && sh /app/otb/recompile_bindings.sh # Default command when using 'docker run' or 'docker create' CMD /bin/bash diff --git a/Packaging/Files/post_install.sh b/Packaging/Files/post_install.sh index f7c61378bf7c58a8586a13c52d67355b4e3985eb..9957faad0207056b4dec10bbefa460c4a5c4a297 100644 --- a/Packaging/Files/post_install.sh +++ b/Packaging/Files/post_install.sh @@ -27,13 +27,14 @@ sed -i "s/\/builds\/otb\/xdk/\${OTB_INSTALL_PREFIX}/g" "$OTB_INSTALL_DIR"/lib/cm sed -i "s/\/builds\/otb\/xdk/\$OTB_INSTALL_DIR/g" "$OTB_INSTALL_DIR"/bin/gdal-config sed -i "s/\/builds\/otb\/xdk/\$OTB_INSTALL_DIR/g" "$OTB_INSTALL_DIR"/bin/curl-config sh "$OTB_INSTALL_DIR"/tools/sanitize_rpath.sh -# Check python version, if python 3.10 (ubuntu 22 and debian 12) download and extract the gdal bindings for python 3.10 -pyversion="$(python3 -V 2>&1 | sed 's/.* \([0-9]\).\([0-9]\).*/\1\2/')" -if [ "$pyversion" = "31" ]; then - echo "*** Python 3.10 detected, downloading gdal bindings compiled for python 3.10 ***" - curl https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-GDAL-bindings-py310.tar.gz -o "$OTB_INSTALL_DIR"/tools/py310.tar.gz - tar -xf "$OTB_INSTALL_DIR"/tools/py310.tar.gz -C "$OTB_INSTALL_DIR"/lib/python3/dist-packages/osgeo/ - rm "$OTB_INSTALL_DIR"/tools/py310.tar.gz - echo "*** GDAL bindings for python 3.10 successfully installed ***" +# Check python version, if python 3.12 (ubuntu 24.04) download and extract the gdal bindings for python 3.12 +pyversion="$(python3 -V 2>&1 | sed 's/.* \([0-9]\).\([0-9]*\).*/\1\2/')" +if [ "$pyversion" = "312" ]; then + echo "*** Python 3.12 detected, downloading gdal bindings compiled for python 3.12 ***" + PACKAGE_OTB_VERSION=`ls $OTB_INSTALL_DIR/lib/libOTBCommon.so.*.*.* | egrep -o "[0-9]+\.[0-9]+\.[0-9]$"` + curl https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-$PACKAGE_OTB_VERSION-GDAL-bindings-py312.tar.gz -o "$OTB_INSTALL_DIR"/tools/gdal-py312.tar.gz + tar -xf "$OTB_INSTALL_DIR"/tools/gdal-py312.tar.gz -C "$OTB_INSTALL_DIR"/lib/python3/dist-packages/osgeo/ + rm "$OTB_INSTALL_DIR"/tools/gdal-py312.tar.gz + echo "*** GDAL bindings for python 3.12 successfully installed ***" fi echo "OK" > "$OTB_INSTALL_DIR"/tools/install_done.txt