# WARNING! # OTB uses Git-LFS to store the (large) tests data. # Git-LFS is mostly transparent for the user and recent versions # are able to use Git-LFS quite efficiently. # But Git fails to manage efficiently numerous LFS data. # We have to use directly git-lfs wrapping commands to have an # efficient cloning step. # Furthermore, Git-LFS and Gitlab sufer a bug preventing usage of # GIT_STRATEGY=fetch (https://gitlab.com/gitlab-org/gitlab-runner/issues/3318) variables: BUILD_IMAGE_REGISTRY: $CI_REGISTRY/orfeotoolbox/otb-build-env GIT_CLONE_PATH: $CI_BUILDS_DIR/otb DOCKER_DRIVER: overlay2 GIT_DEPTH: "3" # Disable automatic checkout to let us fetch LFS before GIT_CHECKOUT: "false" # The fetch strategy fails with LFS and GitLab GIT_STRATEGY: "clone" stages: - precheck - prepare - build .general: retry: max: 2 when: - runner_system_failure - stuck_or_timeout_failure fast-build: extends: .general only: [merge_requests, branches] stage: precheck image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native-develop:latest before_script: - git checkout -f -q $CI_COMMIT_SHA - python3 CI/check_twin_pipelines.py after_script: - python3 CI/cdash_handler.py $CI_COMMIT_SHA $CI_PROJECT_ID $CI_PROJECT_DIR $K8S_SECRET_CDASH $CI_MERGE_REQUEST_REF_PATH script: - ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-fast - ccache -s .common-build: extends: .general only: [merge_requests] stage: build before_script: - git lfs install --skip-repo # Provision efficiently the local LFS cache before checkout - git lfs fetch origin $CI_COMMIT_SHA # Checkout the expected branch - git checkout -f -q $CI_COMMIT_SHA after_script: - python3 CI/cdash_handler.py $CI_COMMIT_SHA $CI_PROJECT_ID $CI_PROJECT_DIR $K8S_SECRET_CDASH $CI_MERGE_REQUEST_REF_PATH artifacts: when: on_failure expire_in: 24 hrs paths: - log/*.txt debian-build: extends: .common-build image: $BUILD_IMAGE_REGISTRY/otb-debian-native:unstable script: - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-unstable-gcc ubuntu-llvm: extends: .common-build image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native:18.04 script: - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm artifacts: paths: - build/CookBook-*-html.tar.gz - build/Documentation/Cookbook/latex/CookBook-*.pdf - build/Documentation/Doxygen/OTB-Doxygen-*.tar.bz2 .common-prepare: extends: .general only: [merge_requests] stage: prepare before_script: - git checkout -f -q $CI_COMMIT_SHA - git lfs install --skip-repo - git config --global user.email "otbbot@orfeo-toolbox.org" - git config --global user.name "otbbot" artifacts: expire_in: 24 hrs when: always paths: - sb_branch.txt # This recovers logs from superbuild build - build/*/*/*/*.log ## Ubuntu superbuild ubuntu-superbuild-prepare: extends: .common-prepare image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04 script: - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base ubuntu-superbuild-build: extends: .common-build image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04 script: - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -VV -S CI/main_packages.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base dependencies: - ubuntu-superbuild-prepare ## CentOS superbuild centos-superbuild-prepare: extends: .common-prepare image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6 script: - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base centos-superbuild-build: extends: .common-build image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6 script: - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -VV -S CI/main_packages.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base dependencies: - centos-superbuild-prepare ## MacOS superbuild macos-superbuild-prepare: tags: - macos only: [merge_requests, branches] extends: .common-prepare before_script: # No need to install lfs as this machine is persistent # No need to do git config # Checkout the expected branch - git checkout -f -q $CI_COMMIT_SHA script: - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-macos-superbuild macos-superbuild-build: tags: - macos extends: .common-build only: [merge_requests, branches] script: - ctest -VV -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-macos-superbuild - ctest -VV -S CI/main_packages.cmake -DIMAGE_NAME:string=otb-macos-superbuild dependencies: - macos-superbuild-prepare