From 4cf1659f14e58001f715c9fb4ff1734d6ffd8661 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:02:41 +0000 Subject: Fix --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 3bd5016..4a18525 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -34,7 +34,7 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES #upload to anaconda -if [[ -n ${CCPI_CONDA_TOKEN}]] +if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do -- cgit v1.2.3 From 8d872f6d37c73dd1bc2e47f2bdf30058c78679f5 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:07:14 +0000 Subject: UPDATE version 0.10.4 --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4a18525..c660c02 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -22,7 +22,7 @@ if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else - export CIL_VERSION=0.10.3 + export CIL_VERSION=0.10.4 echo Defining version: $CIL_VERSION fi #cd CCPi-Regularisation-Toolkit # already there by jenkins -- cgit v1.2.3 From 73eab3d64f2bf5ad170bea35c4db1d3ae5758c06 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:45:42 +0000 Subject: version top in script --- build/jenkins-build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index c660c02..4699e9b 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +if [[ -n ${CIL_VERSION} ]] +then + echo Using defined version: $CIL_VERSION +else + export CIL_VERSION=0.10.4 + echo Defining version: $CIL_VERSION +fi # Script to builds source code in Jenkins environment # module try-load conda @@ -18,13 +25,6 @@ fi # git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 -if [[ -n ${CIL_VERSION} ]] -then - echo Using defined version: $CIL_VERSION -else - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION -fi #cd CCPi-Regularisation-Toolkit # already there by jenkins # need to call first build conda build Wrappers/Python/conda-recipe -- cgit v1.2.3 From 3b309224fc4935a8dc627e8863479b3c29349ce8 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 15 Jan 2019 21:33:38 +0000 Subject: ADD: TODOs --- build/jenkins-build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4699e9b..afee0c9 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,8 +1,10 @@ #!/usr/bin/env bash +# TODO put git tag recognition if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else +# TODO put git tag recognition, or default export CIL_VERSION=0.10.4 echo Defining version: $CIL_VERSION fi @@ -38,6 +40,8 @@ if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do + #TODO if git tag is defined than call anaconda without --label dev + #TODO if pull request??? do not upload anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev done <<< "$REG_FILES" else -- cgit v1.2.3 From 400894771a9ff54c3f88e84ecc79d97a3e08235f Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 14:18:00 +0000 Subject: UPDATE: detect git version --- build/jenkins-build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index afee0c9..d1a3427 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -5,8 +5,11 @@ then echo Using defined version: $CIL_VERSION else # TODO put git tag recognition, or default - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION + #export CIL_VERSION=0.10.4 + #get tag, remove first char ('v') and leave rest + export CIL_VERSION_RAW=`git describe --tags | tail -c +2` + + echo Defining version from last git tag and commit: $CIL_VERSION fi # Script to builds source code in Jenkins environment # module try-load conda -- cgit v1.2.3 From be48430f8de0ccb8e64abba4f00c771228ff0df0 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:05:59 +0000 Subject: UPDATE: CIL_VERSION from git tag, dash in version is assumed as dev version --- build/jenkins-build.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index d1a3427..44fd59d 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -7,9 +7,15 @@ else # TODO put git tag recognition, or default #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest - export CIL_VERSION_RAW=`git describe --tags | tail -c +2` - - echo Defining version from last git tag and commit: $CIL_VERSION + export CIL_VERSION=`git describe --tags | tail -c +2` + if [[ $CIL_VERSION == *"-"*]]; then + # detected dash means that it is dev version + # version is then string-string and all after second dash is ignored (usually commit sha) + export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` + echo Building dev version + else + echo Defining version from last git tag and commit: $CIL_VERSION + fi fi # Script to builds source code in Jenkins environment # module try-load conda @@ -27,7 +33,7 @@ else fi # presume that git clone is done before this script is launched, if not, uncomment -# git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit +#git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 #cd CCPi-Regularisation-Toolkit # already there by jenkins @@ -45,7 +51,12 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + if [[ $CIL_VERSION == *"-"*]]; then + # upload with dev label + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + else + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force + fi done <<< "$REG_FILES" else echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. -- cgit v1.2.3 From 53695bd509b06de9f0564ceec43b4e5b669fa135 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:11:34 +0000 Subject: typo --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 44fd59d..beb26f7 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,7 +8,7 @@ else #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ $CIL_VERSION == *"-"*]]; then + if [[ $CIL_VERSION == *"-"* ]]; then # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` -- cgit v1.2.3 From 94d1e4b289d9e9ffbf69826337ea05e2a3bb0101 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:13:44 +0000 Subject: echo version --- build/jenkins-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index beb26f7..d0e9c96 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,11 +8,11 @@ else #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ $CIL_VERSION == *"-"* ]]; then + if [[ ${CIL_VERSION} == *"-"* ]]; then # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) - export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` - echo Building dev version + export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + echo Building dev version ${CIL_VERSION} else echo Defining version from last git tag and commit: $CIL_VERSION fi -- cgit v1.2.3 From cf9689e81bb69b7732a168463b17a47de1ef59a5 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:28:12 +0000 Subject: UPDATE: conda build don't like dash in version --- build/jenkins-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index d0e9c96..b64631f 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -12,6 +12,8 @@ else # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + # but dash is prohibited for conda build + export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` echo Building dev version ${CIL_VERSION} else echo Defining version from last git tag and commit: $CIL_VERSION @@ -51,7 +53,7 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - if [[ $CIL_VERSION == *"-"*]]; then + if [[ $CIL_VERSION == *"_"*]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev else -- cgit v1.2.3 From e4683c6c7be92ba65b13ef5ea4306948bcbded74 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:43:08 +0000 Subject: UPDATE: version from env --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 550b896..e3e59e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,9 @@ set (CIL_VERSION_MAJOR 0) set (CIL_VERSION_MINOR 10) set (CIL_VERSION_PATCH 2) -set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) +# set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) +# get CIL_VERSION from environment variable +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # set the Python variables for the Conda environment #include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) -- cgit v1.2.3 From 204dc742ee5a8fda3f168b3e84632f5cdb75ce2e Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:43:41 +0000 Subject: typo --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index b64631f..6965180 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -53,7 +53,7 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - if [[ $CIL_VERSION == *"_"*]]; then + if [[ $CIL_VERSION == *"_"* ]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev else -- cgit v1.2.3 From 5e436eab5cea50569df9c85159be69d8e88688f0 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 16:41:10 +0000 Subject: UPDATE: propagate CIL_VERSION --- CMakeLists.txt | 3 ++- Core/CMakeLists.txt | 2 +- Wrappers/Python/CMakeLists.txt | 2 +- Wrappers/Python/conda-recipe/build.sh | 1 + Wrappers/Python/conda-recipe/meta.yaml | 2 ++ recipes/regularisers/bld.bat | 2 +- recipes/regularisers/build.sh | 4 ++-- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3e59e9..b95107a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,9 @@ set (CIL_VERSION_MINOR 10) set (CIL_VERSION_PATCH 2) # set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) -# get CIL_VERSION from environment variable +# get CIL_VERSION from environment variable and set it in cmake set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +message(STATUS "CIL_VERSION set to " ${CIL_VERSION}) # set the Python variables for the Conda environment #include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index d92db82..b3c0dfb 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -6,7 +6,7 @@ project(RGL_core) # The version number. -#set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build message("CIL_VERSION ${CIL_VERSION}") diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt index d86d0ea..c2ef855 100644 --- a/Wrappers/Python/CMakeLists.txt +++ b/Wrappers/Python/CMakeLists.txt @@ -9,7 +9,7 @@ project(regulariserPython) #set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build -message("CIL_VERSION ${CIL_VERSION}") +message("CIL_VERSION: ${CIL_VERSION}") #include (GenerateExportHeader) find_package(PythonInterp REQUIRED) diff --git a/Wrappers/Python/conda-recipe/build.sh b/Wrappers/Python/conda-recipe/build.sh index eec7c2f..39c0f2c 100644 --- a/Wrappers/Python/conda-recipe/build.sh +++ b/Wrappers/Python/conda-recipe/build.sh @@ -5,6 +5,7 @@ cp -rv "$RECIPE_DIR/../../../Core" "$SRC_DIR/Core" cd $SRC_DIR ##cuda=off + cmake -G "Unix Makefiles" $RECIPE_DIR/../../../ -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB=$CONDA_PREFIX/lib -DLIBRARY_INC=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index e3258ff..9fe813d 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -5,6 +5,8 @@ package: build: preserve_egg_dir: False number: 0 + script_env: + - CIL_VERSION test: files: diff --git a/recipes/regularisers/bld.bat b/recipes/regularisers/bld.bat index 43a5286..63e7681 100644 --- a/recipes/regularisers/bld.bat +++ b/recipes/regularisers/bld.bat @@ -10,7 +10,7 @@ cd "%SRC_DIR%\build" echo "we should be in %SRC_DIR%\build" -cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF +cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DCIL_VERSION="%CIL_VERSION%" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF ::-DBOOST_LIBRARYDIR="%CONDA_PREFIX%\Library\lib" -DBOOST_INCLUDEDIR="%CONDA_PREFIX%\Library\include" -DBOOST_ROOT="%CONDA_PREFIX%\Library\lib" diff --git a/recipes/regularisers/build.sh b/recipes/regularisers/build.sh index 0b8bce2..aede303 100644 --- a/recipes/regularisers/build.sh +++ b/recipes/regularisers/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -echo $CIL_VERSION +echo build.sh CIL_VERSION: $CIL_VERSION #if [ -z "$CIL_VERSION" ]; then # echo "Need to set CIL_VERSION" # exit 1 @@ -13,7 +13,7 @@ mkdir ${SRC_DIR}/build cp -rv ${RECIPE_DIR}/../../Core/ ${SRC_DIR}/build mkdir ${SRC_DIR}/build/build cd ${SRC_DIR}/build/build -cmake -G "Unix Makefiles" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core +cmake -G "Unix Makefiles" -DCIL_VERSION="${CIL_VERSION}" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core make -j2 VERBOSE=1 make install -- cgit v1.2.3 From d0052abf619d327e18791aeefd1b0a0a513c546b Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 16:41:25 +0000 Subject: UPDATE: build --- recipes/regularisers/bld.bat | 2 +- recipes/regularisers/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/regularisers/bld.bat b/recipes/regularisers/bld.bat index 63e7681..43a5286 100644 --- a/recipes/regularisers/bld.bat +++ b/recipes/regularisers/bld.bat @@ -10,7 +10,7 @@ cd "%SRC_DIR%\build" echo "we should be in %SRC_DIR%\build" -cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DCIL_VERSION="%CIL_VERSION%" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF +cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF ::-DBOOST_LIBRARYDIR="%CONDA_PREFIX%\Library\lib" -DBOOST_INCLUDEDIR="%CONDA_PREFIX%\Library\include" -DBOOST_ROOT="%CONDA_PREFIX%\Library\lib" diff --git a/recipes/regularisers/build.sh b/recipes/regularisers/build.sh index aede303..eaa778e 100644 --- a/recipes/regularisers/build.sh +++ b/recipes/regularisers/build.sh @@ -13,7 +13,7 @@ mkdir ${SRC_DIR}/build cp -rv ${RECIPE_DIR}/../../Core/ ${SRC_DIR}/build mkdir ${SRC_DIR}/build/build cd ${SRC_DIR}/build/build -cmake -G "Unix Makefiles" -DCIL_VERSION="${CIL_VERSION}" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core +cmake -G "Unix Makefiles" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core make -j2 VERBOSE=1 make install -- cgit v1.2.3 From 774ed3351991266b0c9289b2b9ba1afe328c3e70 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 17:09:05 +0000 Subject: pr-test --- build/jenkins-build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 6965180..20c97f3 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -33,7 +33,6 @@ else ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . PATH=$PATH:./bin fi - # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build -- cgit v1.2.3