Commit 2dfad7be authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

wip: test ci scripts

parent 1452b92d
Pipeline #3707 canceled with stage
in 0 seconds
......@@ -147,9 +147,9 @@ ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
CAPTURE_CMAKE_ERROR _configure_error
)
# Configure log
file ( WRITE
file ( WRITE
"${REMOTE_MODULE_SOURCE_DIR}/log/configure_return_value_log.txt" "${_configure_rv}")
file ( WRITE
file ( WRITE
"${REMOTE_MODULE_SOURCE_DIR}/log/configure_cmake_error_log.txt" "${_configure_error}")
if ( NOT _configure_rv EQUAL 0 )
......@@ -176,9 +176,9 @@ ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
CAPTURE_CMAKE_ERROR _build_error
)
# Build log
file ( WRITE
file ( WRITE
"${REMOTE_MODULE_SOURCE_DIR}/log/build_return_value_log.txt" "${_build_rv}")
file ( WRITE
file ( WRITE
"${REMOTE_MODULE_SOURCE_DIR}/log/build_cmake_error_log.txt" "${_build_error}")
if ( NOT _build_rv EQUAL 0 )
......@@ -195,9 +195,9 @@ else()
CAPTURE_CMAKE_ERROR _test_error
)
# Test log
file ( WRITE
file ( WRITE
"${REMOTE_MODULE_SOURCE_DIR}/log/test_return_value_log.txt" "${_test_rv}")
file ( WRITE
file ( WRITE
"${REMOTE_MODULE_SOURCE_DIR}/log/test_cmake_error_log.txt" "${_test_error}")
endif()
......
language: cpp
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"
git:
depth: 3
image: $BUILD_IMAGE_REGISTRY/otb-alpine:3.7
before_script:
- apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
env:
global:
- OTB_URL=https://www.orfeo-toolbox.org/packages/archives/OTB
# - OTB_URL=https://www.orfeo-toolbox.org/packages/ci/latest
without_otb:
script:
- OTB_URL=https://www.orfeo-toolbox.org/packages/ci/latest
- OTB_VER=7.0.0
- OTB_OS=Linux64
- OTB_PKG_EXT=run
- export OTB_PKG="OTB-${OTB_VER}-${OTB_OS}.${OTB_PKG_EXT}"
- wget ${OTB_URL}/${OTB_PKG}
- if [ "$OTB_PKG_EXT" = "run" ]; then chmod +x ${OTB_PKG} ; ./${OTB_PKG} --target xdk ; fi
- source xdk/otbenv.profile
- ctest -VV -S ./.ci/ci.cmake
matrix:
include:
- os: linux
dist: bionic
compiler: gcc
sudo: required
before_install:
- sudo apt-get install -y
ninja-build
libglvnd-dev
libglu1-mesa-dev
python3-numpy
python3-dev
env:
- OTB_OS=Linux64
- OTB_PKG_EXT=run
- os: osx
osx_image: xcode10.2
compiler: clang
before_install:
- brew install ninja libomp git-lfs
env:
- OTB_OS=Darwin64
- OTB_PKG_EXT=run
- os: windows
before_install:
- choco install python3 --params "/InstallDir:C:\Python3"
- choco install ninja
- export PATH="/c/Python3:/c/ProgramData/chocolatey/lib/ninja/tools:$PATH"
- /c/Python3/Scripts/pip install numpy
- eval "$(python ./.ci/vcvars_proxy.py
'c:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/Common7/Tools/VsDevCmd.bat'
'-arch=amd64'
'-host_arch=amd64'
'-vcvars_ver=14.0')"
- export CC=cl.exe
- export CXX=cl.exe
- export CC_FOR_BUILD=cl.exe
- export CXX_FOR_BUILD=cl.exe
env:
- OTB_OS=Win64
- OTB_PKG_EXT=zip
install:
- export OTB_PKG="OTB-${OTB_VER}-${OTB_OS}.${OTB_PKG_EXT}"
- wget ${OTB_URL}/${OTB_PKG}
- if [ "$OTB_PKG_EXT" = "run" ]; then chmod +x ${OTB_PKG} ; ./${OTB_PKG} --target xdk ; fi
- if [ "$OTB_PKG_EXT" = "zip" ]; then 7z x -y ${OTB_PKG} ; mv OTB-${OTB_VER}-${OTB_OS} xdk ; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
source xdk/otbenv.bash;
else
source xdk/otbenv.profile;
fi
# build_wrapping is needed if you use Python wrappers in your module
- ctest -S xdk/share/otb/swig/build_wrapping.cmake -VV
# NamespaceHandler is needed if you have target conflicts between OTB and your module
# - ctest -DNAMESPACE:STRING="OTB" -S xdk/lib/cmake/OTB-6.7/NamespaceHandler.cmake
# LFS install needed if you use OTB/Data
# - git lfs install
script:
- ctest -VV -S ./.ci/ci.cmake
within_otb:
script:
- echo "todo"
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment