Replaced bash scripts with makefile.
The resulting system is clearer and more generic (easier to change location of fiji or root images, as it is now located in one single place : the makefile). Some actions such as the installation of fiji are left as scripts outside the makefile.
This commit is contained in:
parent
78c8749aba
commit
34fc0aca26
|
@ -7,14 +7,16 @@ pipeline {
|
|||
// erase old builds if anything is left
|
||||
sh './scripts/cleanup.bash'
|
||||
sh './scripts/install_fiji.bash'
|
||||
sh 'export FIJI_ROOT_PATH=$(pwd)/Fiji.app; ./scripts/install_lipase_in_fiji.bash'
|
||||
sh 'make install'
|
||||
// sh 'export FIJI_ROOT_PATH=$(pwd)/Fiji.app; ./scripts/install_ij_opencv.bash'
|
||||
// 'export FIJI_ROOT_PATH=$(pwd)/Fiji.app; ./scripts/install_lipase_in_fiji.bash'
|
||||
// echo 'Create or update the virtual Python environment'
|
||||
// sh '/bin/bash ./src/CI/CI.bash -i ci_venv'
|
||||
}
|
||||
}
|
||||
stage('Testing the package...') {
|
||||
steps {
|
||||
sh './tests/test0001.bash'
|
||||
sh 'make test'
|
||||
}
|
||||
}
|
||||
// stage('Building HTML documentation...') {
|
||||
|
|
44
Makefile
44
Makefile
|
@ -1,7 +1,41 @@
|
|||
hello: hello.cpp
|
||||
g++ -o hello hello.cpp
|
||||
SHELL:=/bin/bash
|
||||
FIJI_ROOT_PATH:=~/soft/Fiji.app
|
||||
FIJI_EXE_PATH=$(FIJI_ROOT_PATH)/ImageJ-linux64
|
||||
# RAW_IMAGES_ROOT_PATH:='/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images'
|
||||
RAW_IMAGES_ROOT_PATH:=$(shell echo ~/work/lipase/raw-images)
|
||||
LIB_SRC_FILES=$(shell find ./src/lipase -name "*.py")
|
||||
|
||||
.PHONY: clean
|
||||
.PHONY: all
|
||||
all: test0001
|
||||
|
||||
clean:
|
||||
rm ./hello
|
||||
$(FIJI_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ip.lipase.lib.jar: $(LIB_SRC_FILES)
|
||||
pushd ./src; \
|
||||
mkdir -p $(FIJI_ROOT_PATH)/jars/Lib ; \
|
||||
find ./lipase -name "*.py" > /tmp/files.txt ; \
|
||||
jar cvf $(FIJI_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ip.lipase.lib.jar @/tmp/files.txt ; \
|
||||
popd
|
||||
|
||||
.PHONY: install_lipase_libs
|
||||
install_lipase_libs: $(FIJI_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ip.lipase.lib.jar
|
||||
|
||||
.PHONY: install_lipase_plugins
|
||||
install_lipase_plugins:
|
||||
mkdir -p $(FIJI_ROOT_PATH)/plugins/Ipr ; \
|
||||
rsync -a ./src/ij-plugins/Ipr/ $(FIJI_ROOT_PATH)/plugins/Ipr/
|
||||
|
||||
.PHONY: install
|
||||
install: install_lipase_libs install_lipase_plugins
|
||||
|
||||
.PHONY: test0001
|
||||
test0001: install
|
||||
# on macosx : /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --ij2 --headless --run './test0001.py'
|
||||
# /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --ij2 --headless --run './tests/test0001.py' "lipase_src_root_path='$(pwd)',raw_images_root_path='/Users/graffy/ownCloud/ipr/lipase/raw-images'"
|
||||
$(FIJI_EXE_PATH) --ij2 --headless --run './tests/test0001.py' "raw_images_root_path='$(RAW_IMAGES_ROOT_PATH)'" ; \
|
||||
ERROR_CODE=$$? ; \
|
||||
echo "Fiji 's return code : $$ERROR_CODE" ; \
|
||||
ERROR_CODE=$$(cat '/tmp/test_result.txt') ; \
|
||||
echo "test's return code : $$ERROR_CODE" ; \
|
||||
exit $$ERROR_CODE
|
||||
|
||||
.PHONY: test
|
||||
test: test0001
|
||||
|
|
Loading…
Reference in New Issue