11#! /bin/bash
22venv () {
33 if ! test -d " $1 " ; then
4- virtualenv -p python " ${PYTHON_VERSION} " " $1 "
4+ virtualenv -p python3 " $1 "
55 fi
66 # shellcheck source=/dev/null
77 source " $1 " /bin/activate
88}
9-
9+ version= ${version :- v1.0}
1010if [[ " $version " = " v1.0" ]] ; then
1111 wget https://github.com/common-workflow-language/common-workflow-language/archive/main.tar.gz
1212 tar xzf main.tar.gz && rm main.tar.gz
1313else
14- repo=$( echo $version | sed ' s/\(v[0-9]*\.\)\([0-9]*\).*/\1\2/' )
15- wget https://github.com/common-workflow-language/cwl-${repo} /archive/main.tar.gz
14+ # shellcheck disable=SC2001
15+ repo=$( echo " $version " | sed ' s/\(v[0-9]*\.\)\([0-9]*\).*/\1\2/' )
16+ wget https://github.com/common-workflow-language/cwl-" ${repo} " /archive/main.tar.gz
1617 tar xzf main.tar.gz && rm main.tar.gz
1718fi
1819
1920docker pull node:slim
2021
21- for PYTHON_VERSION in 3
22- do
22+ # shellcheck disable=SC2043
2323for CONTAINER in docker
2424# for CONTAINER in docker singularity
2525# singularity having issues on ci.commonwl.org; tests pass with https://gist.github.com/mr-c/0ec90d717617d074017c0cb38b72d1a4
2626do
27- venv cwltool-venv${PYTHON_VERSION}
28- # use pip2.7 and pip3 in separate loop runs
29- pip${PYTHON_VERSION} install -U setuptools wheel pip
30- pip${PYTHON_VERSION} uninstall -y cwltool
31- pip${PYTHON_VERSION} install -e .
32- pip${PYTHON_VERSION} install " cwltest>=1.0.20180518074130" codecov
27+ venv cwltool-venv3
28+ pip3 install -U setuptools wheel pip
29+ pip3 uninstall -y cwltool
30+ pip3 install -e .
31+ pip3 install " cwltest>=1.0.20180518074130" codecov
3332 if [[ " $version " = " v1.0" ]]
3433 then
3534 DRAFT=" DRAFT=v1.0"
3635 pushd common-workflow-language-main || exit 1
3736 else
38- pushd cwl-${repo} -main || exit 1
37+ pushd cwl-" ${repo} " -main || exit 1
3938 fi
4039 rm -f .coverage* coverage.xml
4140 source=$( realpath ../cwltool)
@@ -55,7 +54,7 @@ ignore_errors = True
5554omit =
5655 tests/*
5756EOF
58- CWLTOOL_WITH_COV=${PWD} /cwltool_with_cov ${PYTHON_VERSION}
57+ CWLTOOL_WITH_COV=${PWD} /cwltool_with_cov3
5958 cat > " ${CWLTOOL_WITH_COV} " << EOF
6059#!/bin/bash
6160coverage run --parallel-mode --rcfile=${COVERAGE_RC} \
7675 then
7776 EXTRA=" EXTRA=${EXTRA} "
7877 fi
79- if [ " $GIT_BRANCH " = " origin/main" ] && [[ " $version " = " v1.0" ]] && [[ " $CONTAINER " = " docker" ]] && [ $PYTHON_VERSION -eq 3 ]
78+ if [ " $GIT_BRANCH " = " origin/main" ] && [[ " $version " = " v1.0" ]] && [[ " $CONTAINER " = " docker" ]]
8079 then
8180 rm -Rf conformance
81+ # shellcheck disable=SC2154
8282 git clone http://" ${jenkins_cwl_conformance} " @github.com/common-workflow-language/conformance.git
8383
8484 git -C conformance config user.email
" [email protected] " 8585 git -C conformance config user.name " CWL Jenkins build bot"
8686 CONFORMANCE_MSG=$( cat << EOM
8787Conformance test of cwltool ${tool_ver} for CWL ${version}
8888Commit: ${GIT_COMMIT}
89- Python version: ${PYTHON_VERSION}
89+ Python version: 3
9090Container: ${CONTAINER}
9191EOM
9292)
9898 BADGE=" --badgedir=${badgedir} "
9999 fi
100100 # shellcheck disable=SC2086
101- LC_ALL=C.UTF-8 ./run_test.sh --junit-xml=result ${PYTHON_VERSION} .xml \
101+ LC_ALL=C.UTF-8 ./run_test.sh --junit-xml=result3 .xml \
102102 RUNNER=${CWLTOOL_WITH_COV} " -j$( nproc) " ${BADGE} \
103103 ${DRAFT} " ${EXTRA} " \
104- " --classname=py ${PYTHON_VERSION} _ ${CONTAINER} "
104+ " --classname=py3_ ${CONTAINER} "
105105 # LC_ALL=C is to work around junit-xml ASCII only bug
106106 CODE=$(( CODE+ $? )) # capture return code of ./run_test.sh
107- coverage combine " --rcfile=${COVERAGE_RC} " $( find . -name ' .coverage.*' )
107+ coverage combine " --rcfile=${COVERAGE_RC} " " $( find . -name ' .coverage.*' ) "
108108 coverage xml " --rcfile=${COVERAGE_RC} "
109109 codecov --file coverage.xml
110110
111111 if [ -d conformance ]
112112 then
113- rm -rf conformance/cwltool/cwl_${version} /cwltool_latest
114- cp -r conformance/cwltool/cwl_${version} /cwltool_${tool_ver} conformance/cwltool/cwl_${version} /cwltool_latest
113+ rm -rf conformance/cwltool/cwl_" ${version} " /cwltool_latest
114+ cp -r conformance/cwltool/cwl_" ${version} " /cwltool_" ${tool_ver} " conformance/cwltool/cwl_" ${version} " /cwltool_latest
115115 git -C conformance add --all
116116 git -C conformance diff-index --quiet HEAD || git -C conformance commit -m " ${CONFORMANCE_MSG} "
117- git -C conformance push http://
${jenkins_cwl_conformance} :
[email protected] /common-workflow-language/conformance.git
117+ git -C conformance push http://
" ${jenkins_cwl_conformance} " :
[email protected] /common-workflow-language/conformance.git
118118 fi
119119
120120 deactivate
121- popd
122- done
121+ popd || exit
123122done
124123# build new docker container
125124if [ " $GIT_BRANCH " = " origin/main" ] && [[ " $version " = " v1.0" ]]
0 commit comments