-
Notifications
You must be signed in to change notification settings - Fork 5.6k
testnet-automation: More knobs for rolling upgrades #12337
Changes from all commits
f083495
a4460b5
f3175a7
d0fdee0
7f9556b
e284c40
38a6267
ba68a03
d15f87d
284dc86
f44ad58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -x | ||
|
|
||
| here="$(realpath "$(dirname "$0")")" | ||
| source_dir="${here:?}/.." | ||
|
|
||
| committish="${1:?}" | ||
| tarballBaseName="${2:-solana-release}" | ||
| remote=https://github.com/solana-labs/solana.git | ||
|
|
||
| cleanup_tmp_source_dir() { | ||
| rm -rf "$tmp_source_dir" | ||
| } | ||
|
|
||
| set -e | ||
| tmp_source_dir="$(mktemp --directory --tmpdir="$source_dir")" | ||
|
|
||
| trap 'cleanup_tmp_source_dir' EXIT | ||
|
|
||
| # Clone the specified committish | ||
| git clone "$remote" "$tmp_source_dir" | ||
|
Comment on lines
+21
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any reason we have to clone all new? I think we can add another worktree like this: # Create temporal source dir to build
git fetch origin "$branch"
if [[ -n $commitish ]]; then
git worktree add "$tmp_source_dir" $commitish
else
git worktree add "$tmp_source_dir" FETCH_HEAD
fi
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope! This was just a quick and dirty script to see if I could get what I wanted working (see script file name 😅). Plenty of optimizations to be had here
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what a quick reply. :) I updated my comment by picking something from my attempt #12390. let's unify our work for the better. :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this way we can build off at arbitrary commit, might be useful for building with fast-changing release branches. |
||
|
|
||
| if pushd "$tmp_source_dir"; then | ||
| ( | ||
| set +e | ||
|
|
||
| git fetch origin "$committish":branch_to_build | ||
| git checkout branch_to_build | ||
|
Comment on lines
+28
to
+29
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can be merged into https://github.com/solana-labs/solana/pull/12337/files#r493804567 |
||
|
|
||
| # Use our scripts | ||
| cp -ar "${source_dir}"/{fetch-perf-libs.sh,scripts,net,multinode-demo,ci} "$tmp_source_dir" | ||
|
|
||
| export CHANNEL=edge | ||
| export DO_NOT_PUBLISH_TAR=true # Never publish | ||
| export TARBALL_BASENAME="$tarballBaseName" | ||
| ci/publish-tarball.sh | ||
|
|
||
| cp "${tarballBaseName}"*.tar.bz2 "${source_dir}" | ||
| ) | ||
| popd | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,12 +109,14 @@ done | |
| ( | ||
| set -x | ||
| # shellcheck disable=SC2086 # Don't want to double quote $rust_version | ||
| $cargo $maybeRustVersion build $maybeReleaseFlag "${binArgs[@]}" | ||
| $cargo $maybeRustVersion build $maybeReleaseFlag --bins | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. qq: why is this needed? because of shellcheck?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC some bins were missing without |
||
| ) | ||
|
|
||
| mkdir -p "$installDir/bin" | ||
| for bin in "${BINS[@]}"; do | ||
| cp -fv "target/$buildVariant/$bin" "$installDir"/bin | ||
| for bin in "target/$buildVariant/"*; do | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idea here was basically to get rid of the manually specified bin list, so we don't have to maintain it |
||
| if [[ "$bin" =~ /solana(-[^./]+)*$ ]]; then | ||
| cp -fv "$bin" "$installDir"/bin | ||
| fi | ||
| done | ||
|
|
||
| if [[ -d target/perf-libs ]]; then | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/solana-labs/solana/pull/12337/files#r493804567 and do this?: