refactor CI list_dependencies script
Context
Currently the download:....:before_script jobs retrieve automatically dependencies listed in a given file :
case "$CI_PROJECT_NAME" in
"aidge_backend_cpu" | "aidge_backend_opencv" )
DEPS_NAMES=("aidge_core")
;;
# aidge_onnx needs backend_cpu for testing
"aidge_export_cpp" | "aidge_learning" |"aidge_onnx" )
DEPS_NAMES=("aidge_core" "aidge_backend_cpu")
;;
"aidge_backend_cuda" )
DEPS_NAMES=("aidge_core" "aidge_backend_cpu")
;;
# aidge_quantization needs onnx for testing
"aidge_quantization" | "aidge_interop_torch" )
DEPS_NAMES=("aidge_core" "aidge_backend_cpu" "aidge_onnx")
;;
* )
echo "****************************************************************************************************************************"
echo "****************************************************************************************************************************"
echo "**"
echo "** WARNING"
echo "** THE PROJECT $CI_PROJECT_NAME HAS NO LISTED DEPENDENCY FOR UBUNTU."
echo "** If this is an error please head to"
echo "** REPO : aidge/gitlab_shared_files repo"
echo "** URL : https://gitlab.eclipse.org/eclipse/aidge/gitlab_shared_files"
echo "** FILE : .gitlab/ci/common/download.gitlab-ci.yml"
echo "** Modify the dependencie list in the following job :"
echo "** .ubuntu:download:list_dependencies"
echo "**"
echo "****************************************************************************************************************************"
echo "****************************************************************************************************************************"
DEPS_NAMES=()
esac
Why this is shitty
If anyone suddenly needs a new dependency for a given project, he ill need to know where to look for.
Available fix
This is why this script should in fact be a split in each .gitlab-ci.yml
file of each repo
and just be
download:ubuntu:initialize_dependencies:
script:
- DEPS_NAMES=("aidge_core","aidge_backend_cpu")
download:windows:initialize_dependencies:
script:
- $DEPS_NAMES="aidge_core","aidge_backend_cpu"