Skip to content
Snippets Groups Projects
Commit c0a05db1 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

try to fix linux caching

parent 7d03b217
No related branches found
No related tags found
1 merge request!63Conda package based CI
...@@ -30,4 +30,10 @@ else ...@@ -30,4 +30,10 @@ else
fi fi
# Copy the .tar.bz2 and urls.txt # Copy the .tar.bz2 and urls.txt
if [ "${OSNAME}" == "linux" ]; then
mkdir -p ${CONDA_ENVS_PATH}/.pkgs
touch ${CONDA_ENVS_PATH}/.pkgs/urls
touch ${CONDA_ENVS_PATH}/.pkgs/urls.txt
fi
merge_conda_cache ${CONDA_ENVS_PATH}/.pkgs ${CONDA_FOLDER}/pkgs merge_conda_cache ${CONDA_ENVS_PATH}/.pkgs ${CONDA_FOLDER}/pkgs
...@@ -269,12 +269,15 @@ fi ...@@ -269,12 +269,15 @@ fi
# $2: Path to the extra cache to be merged into main cache # $2: Path to the extra cache to be merged into main cache
merge_conda_cache() { merge_conda_cache() {
if [ -e ${1} ]; then if [ -e ${1} ]; then
_cached_urls="${2}/urls.txt" _cached_urls="${2}/urls"
_urls="${1}/urls.txt" _urls="${1}/urls"
_cached_urlstxt="${2}/urls.txt"
_urlstxt="${1}/urls.txt"
if [ -e ${2} ]; then if [ -e ${2} ]; then
log_info "Merging urls.txt and packages with cached files..." log_info "Merging urls.txt and packages with cached files..."
mv ${2}/*.tar.bz2 ${1}/ mv ${2}/*.tar.bz2 ${1}/
cat ${_urls} ${_cached_urls} | sort | uniq > ${_urls} cat ${_urls} ${_cached_urls} | sort | uniq > ${_urls}
cat ${_urlstxt} ${_cached_urlstxt} | sort | uniq > ${_urlstxt}
fi fi
fi fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment