Commit ff5d79ca authored by Michal Chruscinski's avatar Michal Chruscinski Committed by Scott Cyphers

[ONNX CI] Disable incremental building (#3059)

* Disable incremental building

* Incremental building disablement as parameter
parent 68e626b1
...@@ -115,7 +115,7 @@ def prepareEnvironment(configurationMaps) { ...@@ -115,7 +115,7 @@ def prepareEnvironment(configurationMaps) {
UTILS.propagateStatus("Run_docker_containers", configMap["dockerContainerName"]) UTILS.propagateStatus("Run_docker_containers", configMap["dockerContainerName"])
sh """ sh """
docker cp ${CI_ROOT}/utils/docker.sh ${configMap["dockerContainerName"]}:/home docker cp ${CI_ROOT}/utils/docker.sh ${configMap["dockerContainerName"]}:/home
docker exec ${configMap["dockerContainerName"]} bash -c "/root/${CI_ROOT}/prepare_environment.sh" docker exec ${configMap["dockerContainerName"]} bash -c "/root/${CI_ROOT}/prepare_environment.sh --no-incremental"
""" """
} }
UTILS.createStage("Prepare_environment", prepareEnvironmentMethod, configurationMaps) UTILS.createStage("Prepare_environment", prepareEnvironmentMethod, configurationMaps)
......
...@@ -60,9 +60,32 @@ function build_ngraph() { ...@@ -60,9 +60,32 @@ function build_ngraph() {
return 0 return 0
} }
# Link Onnx models function main() {
mkdir -p /home/onnx_models/.onnx # By default copy stored nGraph master and use it to build PR branch
ln -s /home/onnx_models/.onnx /root/.onnx BUILD_CALL='build_ngraph "/root" "USE_CACHED" || build_ngraph "/root" "REBUILD"'
# Copy stored nGraph master and use it to build PR branch PATTERN='[-a-zA-Z0-9_]*='
build_ngraph "/root" "USE_CACHED" || build_ngraph "/root" "REBUILD" for i in "$@"
do
case $i in
--no-incremental)
# Build nGraph from scratch if incremental building is disabled
BUILD_CALL='build_ngraph "/root"'
;;
*)
echo "Parameter $i not recognized."
exit 1
;;
esac
done
# Link Onnx models
mkdir -p /home/onnx_models/.onnx
ln -s /home/onnx_models/.onnx /root/.onnx
eval "${BUILD_CALL}"
}
if [[ ${BASH_SOURCE[0]} == "${0}" ]]; then
main "${@}"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment