diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb4b7589842367efaccb0307d71f9b13c173c7ba..acafdf47fb2dbcf616ca4f20bda10d3e5cc6c099 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,20 +30,20 @@ stages: - 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: - #~ - export GIT_LFS_SKIP_SMUDGE=1 - #~ - git checkout -f -q $CI_COMMIT_SHA - #~ - python3 CI/check_twin_pipelines.py - #~ after_script: - #~ - python3 CI/cdash_handler.py - #~ script: - #~ - ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-fast - #~ - ccache -s +fast-build: + extends: .general + only: [merge_requests, branches] + stage: precheck + image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native-develop:latest + before_script: + - export GIT_LFS_SKIP_SMUDGE=1 + - git checkout -f -q $CI_COMMIT_SHA + - python CI/check_twin_pipelines.py + after_script: + - python CI/cdash_handler.py + script: + - ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-fast + - ccache -s .common-build: @@ -60,7 +60,7 @@ stages: # Checkout the expected branch - git checkout -f -q $CI_COMMIT_SHA after_script: - - python3 CI/cdash_handler.py + - python CI/cdash_handler.py artifacts: when: on_failure expire_in: 24 hrs @@ -68,11 +68,11 @@ stages: - build/*/*.log #CMake log - log/*.txt # Others -#~ 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 +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 .common-prepare: extends: .general @@ -94,91 +94,81 @@ stages: - build/*/*/*/*.log # Superbuild 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=ubuntu-18.04-llvm-xdk - #~ - 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 - #~ artifacts: - #~ paths: - #~ - build/CookBook-*-html.tar.gz - #~ - build/Documentation/Cookbook/latex/CookBook-*.pdf - #~ - build/Documentation/Doxygen/OTB-Doxygen-*.tar.bz2 +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=ubuntu-18.04-llvm-xdk + - 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 + artifacts: + paths: + - build/CookBook-*-html.tar.gz + - build/Documentation/Cookbook/latex/CookBook-*.pdf + - build/Documentation/Doxygen/OTB-Doxygen-*.tar.bz2 ## 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 +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 - #~ 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 - #~ - export GIT_LFS_SKIP_SMUDGE=1 - #~ - git checkout -f -q $CI_COMMIT_SHA - #~ - export GIT_LFS_SKIP_SMUDGE=0 - #~ script: - #~ - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-macos-superbuild -#~ -#~ macos-superbuild-build: - #~ tags: - #~ - macos - #~ extends: .common-build - #~ script: - #~ - ctest -V -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 +macos-superbuild-prepare: + tags: + - macos + 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 + - export GIT_LFS_SKIP_SMUDGE=1 + - git checkout -f -q $CI_COMMIT_SHA + - export GIT_LFS_SKIP_SMUDGE=0 + script: + - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-macos-superbuild + +macos-superbuild-build: + tags: + - macos + extends: .common-build + script: + - ctest -V -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 ## Windows .windows-prepare: - extends: .general - # only: [merge_requests] - stage: prepare + extends: .common-prepare before_script: # This override the previous before_script - set GIT_LFS_SKIP_SMUDGE=1 - - git checkout %CI_COMMIT_REF_NAME% + - git checkout -f -q %CI_COMMIT_SHA% - set GIT_LFS_SKIP_SMUDGE=0 - artifacts: - expire_in: 24 hrs - when: always - paths: - - sb_branch.txt # Needed to checkout correct branch in build step - - build/*/*/*/*.log # Superbuild log .common-windows-build: extends: .common-build before_script: - git lfs fetch origin %CI_COMMIT_SHA% - git checkout %CI_COMMIT_REF_NAME% - after_script: - - python ./CI/cdash_handler.py # - Win10 windows-10-prepare: