-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Retain complete a3p-integration directories and resulting slogfil…
…es (#10446) ## Description Extracted from #10165 and dependent upon Agoric/agoric-3-proposals#193 . This expands `test-docker-build` CI job artifacts from just core eval scripts to their containing a3p-integration directory plus the job's slogfile. ### Security Considerations n/a ### Scaling Considerations The final slogfile from #10165 was about 67 MB, which is smaller than the 161 MB deployment-test-results artifact. But regardless, I've limited retention to ~~4 days on success/10 days on failure~~ 10 days, and we could also compress before upload if even that is too much. ### Documentation Considerations n/a ### Testing Considerations n/a ### Upgrade Considerations n/a
- Loading branch information
Showing
6 changed files
with
84 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"doctor": "yarn synthetic-chain doctor" | ||
}, | ||
"dependencies": { | ||
"@agoric/synthetic-chain": "^0.3.0", | ||
"@agoric/synthetic-chain": "^0.4.0", | ||
"@types/better-sqlite3": "^7.6.11" | ||
}, | ||
"packageManager": "[email protected]", | ||
|
This file contains 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
File renamed without changes.
This file contains 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,50 @@ | ||
#! /usr/bin/env bash | ||
set -ueo pipefail | ||
|
||
# Usage: export-a3p.sh <a3p_dir> <dest_dir> | ||
# Copy an agoric-3-proposals directory, omitting `agoric-sdk`, `node_modules`, | ||
# and `.yarn`, and replacing colons in proposal directory names (children of | ||
# $a3p_dir/proposals) with dashes. | ||
# https://github.com/Agoric/agoric-3-proposals | ||
# | ||
# The result is ready to be uploaded as an artifact from GitHub Actions. | ||
# https://github.com/actions/upload-artifact | ||
|
||
a3p_dir="${1-}" | ||
dest_dir="${2-}" | ||
if ! [ "$#" -eq 2 -a -n "$a3p_dir" -a -n "$dest_dir" ]; then | ||
echo "Usage: $0 <a3p_dir> <dest_dir>" >&2 | ||
exit 64 | ||
fi | ||
if [ -e "$dest_dir" ]; then | ||
echo "Destination already exists: $dest_dir" | ||
exit 1 | ||
fi | ||
|
||
# Because of the exclusions, copying applies to disjoint subtrees of $a3p_dir: | ||
# * children except `agoric-sdk` and `proposals` | ||
# * file children of `proposals`, i.e. `proposals/*` | ||
# * grandchildren of `proposals`, i.e. `proposals/*/*` | ||
# | ||
# We accomplish this by consuming (subdir?, depth, `find` filter?) tuples. | ||
SUBSEP="$(printf '\x1C')" | ||
printf " $SUBSEP 1 $SUBSEP -not -name agoric-sdk -not -name proposals | ||
proposals $SUBSEP 1 $SUBSEP -type f | ||
proposals $SUBSEP 2 | ||
" \ | ||
| sed -E 's/^ *|#.*//g; /^[[:space:]]*$/d;' \ | ||
| while IFS="$SUBSEP" read subdir depth filter; do | ||
find "$a3p_dir/"$subdir -mindepth ${depth:-1} -maxdepth ${depth:-1} \ | ||
-name node_modules -prune -o -name .yarn -prune -o $filter -print \ | ||
| while read -r path; do | ||
relpath="${path#"$a3p_dir/"}" | ||
reldir="$(dirname -- "$relpath")" | ||
dest_subdir="$dest_dir/$reldir" | ||
[ "$reldir" = . ] && dest_subdir="$dest_dir" # remove trailing `/.` | ||
sanitized="${dest_subdir//:/-}" # replace each `:` with `-` | ||
mkdir -p "$sanitized" | ||
cp -r -- "$path" "$sanitized/" | ||
echo "Copied $(dirname -- "$path") to $sanitized" | ||
done \ | ||
| uniq | ||
done |