This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 380
CI: build a test artifact #527
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b6f0fe1
CI: build a test artifact
TriplEight c8fb54a
CI: try building before testing
TriplEight 11f8513
CI: try proper bin name
TriplEight ec1301d
CI: preempty cache to benchmark properly
TriplEight 410dfec
CI: run build after test
TriplEight c03f2fc
CI: change target source
TriplEight 890b13d
Merge branch 'master' into 3x8_build_bin
TriplEight 680c43a
CI: try build before test once again
TriplEight 127af1b
CI: chore
TriplEight beb6bb3
CI: prepopulate target cache
TriplEight 452fa88
CI: conditional build; aws sync
TriplEight 0890dc8
CI: mock building to test publishing
TriplEight d56ef09
CI: lacks permissions in the other job
TriplEight ae8b704
CI: undebug
TriplEight File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -u | ||
|
||
# if there is no directory for this $CI_COMMIT_REF_NAME/$CI_JOB_NAME | ||
# create such directory and | ||
# copy recursively all the files from the newest dir which has $CI_JOB_NAME, if it exists | ||
|
||
# cache lives in /ci-cache/${CI_PROJECT_NAME}/${2}/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME} | ||
|
||
function prepopulate { | ||
if [[ ! -d $1 ]]; then | ||
mkdir -p "/ci-cache/$CI_PROJECT_NAME/$2/$CI_COMMIT_REF_NAME"; | ||
FRESH_CACHE=$(find "/ci-cache/$CI_PROJECT_NAME/$2" -mindepth 2 -maxdepth 2 \ | ||
-type d -name "$CI_JOB_NAME" -exec stat --printf="%Y\t%n\n" {} \; |sort -n -r |head -1 |cut -f2); | ||
if [[ -d $FRESH_CACHE ]]; then | ||
echo "____Using" "$FRESH_CACHE" "to prepopulate the cache____"; | ||
time cp -r "$FRESH_CACHE" "$1"; | ||
else | ||
echo "_____No such $2 dir, proceeding from scratch_____"; | ||
fi | ||
else | ||
echo "____No need to prepopulate $2 cache____"; | ||
fi | ||
} | ||
|
||
# CARGO_HOME cache is still broken so would be handled some other way. | ||
prepopulate "$CARGO_TARGET_DIR" targets | ||
rcny marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.