Skip to content
Snippets Groups Projects
Commit e3d8476b authored by Dmitry Ivanov's avatar Dmitry Ivanov Committed by Maksim Kaitmazian
Browse files

Disable caches for a while

parent 5ceb50e4
No related branches found
No related tags found
1 merge request!920pgproto module
......@@ -19,22 +19,22 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive
RUST_BACKTRACE: full
before_script:
# Gitlab CI caching is shit. So we implement it manually
- |
# Restore cache
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
echo "Skip restoring cache on the master branch"
elif git diff origin/"$CI_DEFAULT_BRANCH" "$CI_COMMIT_SHA" --submodule=short | grep '^[+-]Subproject commit'; then
echo "Skip restoring cache because submodule(s) changed"
elif [ -f "${CACHE_ARCHIVE}" ]; then
ci-log-section start "restore-cache" Restoring cache from ${CACHE_ARCHIVE} ...
tar -xf ${CACHE_ARCHIVE}
echo "Ok"
du -sh ${CACHE_PATHS} || true
ci-log-section end "restore-cache"
else
echo "No cache found"
fi
# # Gitlab CI caching is shit. So we implement it manually
# - |
# # Restore cache
# if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
# echo "Skip restoring cache on the master branch"
# elif git diff origin/"$CI_DEFAULT_BRANCH" "$CI_COMMIT_SHA" --submodule=short | grep '^[+-]Subproject commit'; then
# echo "Skip restoring cache because submodule(s) changed"
# elif [ -f "${CACHE_ARCHIVE}" ]; then
# ci-log-section start "restore-cache" Restoring cache from ${CACHE_ARCHIVE} ...
# tar -xf ${CACHE_ARCHIVE}
# echo "Ok"
# du -sh ${CACHE_PATHS} || true
# ci-log-section end "restore-cache"
# else
# echo "No cache found"
# fi
lint-for-tests:
stage: test
......@@ -73,20 +73,20 @@ test-linux:
- cargo clippy --version
- cargo clippy -- --deny clippy::all
- |
# Save cache
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
ci-log-section start "save-cache" Saving cache to ${CACHE_ARCHIVE} ...
du -sh ${CACHE_PATHS} || true
TMPEXT=$RANDOM
tar -cf "${CACHE_ARCHIVE}.${TMPEXT}" ${CACHE_PATHS}
mv -f "${CACHE_ARCHIVE}.${TMPEXT}" "${CACHE_ARCHIVE}"
echo Ok
du -sh ${CACHE_ARCHIVE}
ci-log-section end "save-cache"
else
echo "Skip saving cache on a non-master branch"
fi
# - |
# # Save cache
# if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
# ci-log-section start "save-cache" Saving cache to ${CACHE_ARCHIVE} ...
# du -sh ${CACHE_PATHS} || true
# TMPEXT=$RANDOM
# tar -cf "${CACHE_ARCHIVE}.${TMPEXT}" ${CACHE_PATHS}
# mv -f "${CACHE_ARCHIVE}.${TMPEXT}" "${CACHE_ARCHIVE}"
# echo Ok
# du -sh ${CACHE_ARCHIVE}
# ci-log-section end "save-cache"
# else
# echo "Skip saving cache on a non-master branch"
# fi
test-mac-m1:
extends: .test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment