From 6c86733638b566fe5572fd0965def50d425502ab Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Wed, 23 Jan 2019 11:02:32 +0000 Subject: Update Readme.md --- Readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 1745b9e..a7ff631 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,8 @@ +# CCPi-Regularisation Toolkit (CCPi-RGL) + | Master | Development | |--------|-------------| | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) | -# CCPi-Regularisation Toolkit (CCPi-RGL) **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise the convergence and make the reconstruction problem (inverse problem) more well-posed. The CCPi-RGL software provides 2D/3D and multi-channel regularisation strategies to ensure better performance of IIR methods. The regularisation modules are well-suited to use with [splitting algorithms](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method#Alternating_direction_method_of_multipliers), such as, [ADMM](https://github.com/dkazanc/ADMM-tomo) and [FISTA](https://github.com/dkazanc/FISTA-tomo). Furthermore, the toolkit can be used for simpler inversion tasks, such as, image denoising, inpaiting, deconvolution etc. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** -- cgit v1.2.3 From 76552e8b96018fefba4cfe9c504345330f0d86c4 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Wed, 23 Jan 2019 14:07:52 +0000 Subject: Update Readme.md --- Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.md b/Readme.md index a7ff631..4fc23d4 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,7 @@ # CCPi-Regularisation Toolkit (CCPi-RGL) + + | Master | Development | |--------|-------------| | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) | -- cgit v1.2.3 From 2281cb319701d348384a6c00a1948209350c41ad Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Thu, 24 Jan 2019 14:17:20 +0000 Subject: UPDATE: branch taken from symbolic-full-name --- build/jenkins-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 87ca54f..62b1ece 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -33,7 +33,7 @@ else PATH=$PATH:./bin fi -GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` +GIT_BRANCH=`git rev-parse --symbolic-full-name HEAD` echo on branch ${GIT_BRANCH} cat .git/HEAD @@ -53,7 +53,7 @@ echo files created: $REG_FILES # and TODO pull request not to upload if [[ -n ${CCPI_CONDA_TOKEN} ]]; then - if [[ ${GIT_BRANCH} == "master" ]]; then + if [[ ${GIT_BRANCH} == "refs/heads/master" ]]; then conda install anaconda-client while read -r outfile; do #if >0 commit (some _ in version) then marking as dev build -- cgit v1.2.3 From 5b8410926219639b41039c7529c7038ee11fc1d5 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Thu, 24 Jan 2019 16:37:12 +0000 Subject: UPDATE: documentation of build script --- build/jenkins-build.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 62b1ece..258afb5 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,5 +1,27 @@ #!/usr/bin/env bash +# Copyright 2019 Tomas Kulhanek, see /LICENSE + +# Universal script to build CCPi module libraries +# +# These environment variables can be specified optionally +# CIL_VERSION - version of this build, it will be used to label it within multiple places during build +# CCPI_CONDA_TOKEN - token to upload binary builds to anaconda +# - if CIL_VERSION is not expliticly defined, then version is determined from `git describe --tags` and puts also +# the number of commits after this tag +# - it detects the branch under which the CCPi is build, master is uploaded to anaconda channel, non-master branch not +# - if the version is release (no number after _), anaconda upload is production +# - if the version is not release (number of commits after last tag) then anaconda upload is labeled as 'dev' +# - some commit can be explicitly tagged including '_' char and something after, then it is considered as 'dev' version +# +# This script builds a CCPI module based on configuration in relative path Wrappers/Python/conda-recipe +# multiple files can be build (combination of python version and dependent libraries) +# Arguments to this script is passed to `conda build` +# e.g. +# jenkins-build.sh -c ccpi -c conda-forge +# is passed to subsequent conda build as following +# conda build Wrappers/Python/conda-recipe -c ccpi -c conda-forge + if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION @@ -42,7 +64,7 @@ cat .git/HEAD conda install -y conda-build #cd CCPi-Regularisation-Toolkit # already there by jenkins # need to call first build -conda build Wrappers/Python/conda-recipe +conda build Wrappers/Python/conda-recipe "$@" # then need to call the same with --output #- otherwise no build is done :-(, just fake file names are generated export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` -- cgit v1.2.3 From e31cb6d8489d265381cb5abe0f396e44db42352b Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Mon, 28 Jan 2019 13:07:22 +0000 Subject: UPDATE: using universal build --- build/jenkins-build.sh | 94 +------------------------------------------------- 1 file changed, 1 insertion(+), 93 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 258afb5..5b6c9ce 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,94 +1,2 @@ #!/usr/bin/env bash - -# Copyright 2019 Tomas Kulhanek, see /LICENSE - -# Universal script to build CCPi module libraries -# -# These environment variables can be specified optionally -# CIL_VERSION - version of this build, it will be used to label it within multiple places during build -# CCPI_CONDA_TOKEN - token to upload binary builds to anaconda -# - if CIL_VERSION is not expliticly defined, then version is determined from `git describe --tags` and puts also -# the number of commits after this tag -# - it detects the branch under which the CCPi is build, master is uploaded to anaconda channel, non-master branch not -# - if the version is release (no number after _), anaconda upload is production -# - if the version is not release (number of commits after last tag) then anaconda upload is labeled as 'dev' -# - some commit can be explicitly tagged including '_' char and something after, then it is considered as 'dev' version -# -# This script builds a CCPI module based on configuration in relative path Wrappers/Python/conda-recipe -# multiple files can be build (combination of python version and dependent libraries) -# Arguments to this script is passed to `conda build` -# e.g. -# jenkins-build.sh -c ccpi -c conda-forge -# is passed to subsequent conda build as following -# conda build Wrappers/Python/conda-recipe -c ccpi -c conda-forge - -if [[ -n ${CIL_VERSION} ]] -then - echo Using defined version: $CIL_VERSION -else - # define CIL_VERSION from last git tag, remove first char ('v') and leave rest - export CIL_VERSION=`git describe --tags | tail -c +2` - # dash means that it's some commit after tag release -thus will be treated as dev - if [[ ${CIL_VERSION} == *"-"* ]]; then - # detected dash means that it is dev version, - # get first and second part between first dash and ignore all after other dash (usually sha) - # and as dash is prohibited for conda build, replace with underscore - export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2 | tr - _` - echo Building dev version: ${CIL_VERSION} - else - echo Building release version: $CIL_VERSION - fi -fi - -# Script to builds source code in Jenkins environment -# module try-load conda - -# install miniconda if the module is not present -if hash conda 2>/dev/null; then - echo using installed conda -else - if [ ! -f Miniconda3-latest-Linux-x86_64.sh ]; then - wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh - chmod +x Miniconda3-latest-Linux-x86_64.sh - fi - ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . - PATH=$PATH:./bin -fi - -GIT_BRANCH=`git rev-parse --symbolic-full-name HEAD` -echo on branch ${GIT_BRANCH} -cat .git/HEAD - -# 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 -#cd CCPi-Regularisation-Toolkit # already there by jenkins -# need to call first build -conda build Wrappers/Python/conda-recipe "$@" -# then need to call the same with --output -#- otherwise no build is done :-(, just fake file names are generated -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 only if token is defined -# and TODO pull request not to upload - -if [[ -n ${CCPI_CONDA_TOKEN} ]]; then - if [[ ${GIT_BRANCH} == "refs/heads/master" ]]; then - conda install anaconda-client - while read -r outfile; do - #if >0 commit (some _ in version) then marking as dev build - 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 git branch is not master, will not upload to anaconda. - fi -else - echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. -fi +bash <(curl -L https://raw.githubusercontent.com/vais-ral/CCPi-VirtualMachine/master/scripts/jenkins-build.sh) -- cgit v1.2.3