Unverified Commit 5ca6a74f authored by Denis_P's avatar Denis_P 🏑 Committed by GitHub
Browse files

now new branches' job hardlinks the same dir from master (#321)

parent b042a5fb
Pipeline #79422 failed with stages
in 9 minutes and 2 seconds
......@@ -36,9 +36,17 @@ variables:
- rustup show
- bash --version
- mkdir -p ${CARGO_HOME}; touch ${CARGO_HOME}/config
- mkdir -p ${CARGO_TARGET_DIR}
# global RUSTFLAGS overrides the linker args so this way is better to pass the flags
- printf '[build]\nrustflags = ["-C", "link-dead-code"]\n' | tee ${CARGO_HOME}/config
# if there is no directory for this $CI_COMMIT_REF_NAME/$CI_JOB_NAME
# create such directory and
# create hardlinks recursively of all the files from the master/$CI_JOB_NAME if it exists
- if [[ ! -d $CARGO_TARGET_DIR ]]; then
mkdir -p /ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME};
cp -al /ci-cache/${CI_PROJECT_NAME}/targets/${CI_DEFAULT_BRANCH}/${CI_JOB_NAME}
/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME} ||
echo "_____No such target dir, proceeding from scratch_____";
- sccache -s
- master
Supports Markdown
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