From d66f4c0fd8f333d803477e4eb6e0c62326a0e5f5 Mon Sep 17 00:00:00 2001 From: BO ZHANG Date: Tue, 20 Sep 2022 18:17:54 +0800 Subject: [PATCH] added jenkins build script --- pipelines/build.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pipelines/build.sh diff --git a/pipelines/build.sh b/pipelines/build.sh new file mode 100644 index 0000000..7822aff --- /dev/null +++ b/pipelines/build.sh @@ -0,0 +1,41 @@ +#!/bin/bash +echo "===================== prepare for installation =====================" +whoami +uname -a +pwd +ls -a + +export CSST_SIMS_C3="/nfsdata/share/csst_simulation_data/Cycle-3-SimuData/" +export CSST_SIMS_C5_2="/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/" + +which python +source /home/csstpipeline/anaconda3/bin/activate +which python +which pip +python --version + +echo "===================== isntall requirements =====================" +pip install -r requirements.txt + +echo "===================== install package =====================" +sh install_local.sh + +echo "===================== show package info =====================" +pip show $project + +echo "===================== download code style tests =====================" +curl https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/test_codestyle.sh +coverage run -m pytest + +echo "===================== make coverage =====================" +coverage report +coverage html +# zip -q -r htmlcov.zip htmlcov + +echo "===================== importability =====================" +python -c "from $project.top_level_interface import *" + +echo "===================== POST BUILD BELOW =====================" +# In Jenkins: +#!/bin/bash +#sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/build.sh)" \ No newline at end of file -- GitLab