Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.17: CI: add check for explicit spl-token-cli version (backport of #34430) #34465

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Alternatively use the Github UI.

### Miscellaneous Clean up

1. Pin the spl-token-cli version in the newly promoted stable branch by setting `splTokenCliVersion` in scripts/spl-token-cli-version.sh to the latest release that depends on the stable branch (usually this will be the latest spl-token-cli release).
1. Update [mergify.yml](https://github.com/solana-labs/solana/blob/master/.mergify.yml) to add backport actions for the new branch and remove actions for the obsolete branch.
1. Adjust the [Github backport labels](https://github.com/solana-labs/solana/labels) to add the new branch label and remove the label for the obsolete branch.
1. Announce on Discord #development that the release branch exists so people know to use the new backport labels.
Expand Down
5 changes: 5 additions & 0 deletions ci/check-install-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source scripts/spl-token-cli-version.sh
if [[ -z $splTokenCliVersion ]]; then
echo "On the stable channel, splTokenCliVersion must be set in scripts/spl-token-cli-version.sh"
exit 1
fi
4 changes: 4 additions & 0 deletions ci/test-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ _ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" fmt --all -- --check

_ ci/do-audit.sh

if [[ -n $CI ]] && [[ $CHANNEL = "stable" ]]; then
_ ci/check-install-all.sh
fi

echo --- ok
4 changes: 4 additions & 0 deletions scripts/cargo-install-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,15 @@ mkdir -p "$installDir/bin"

# Exclude `spl-token` binary for net.sh builds
if [[ -z "$validatorOnly" ]]; then
# shellcheck source=scripts/spl-token-cli-version.sh
source "$here"/spl-token-cli-version.sh

# the patch-related configs are needed for rust 1.69+ on Windows; see Cargo.toml
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
"$cargo" $maybeRustVersion \
--config 'patch.crates-io.ntapi.git="https://github.com/solana-labs/ntapi"' \
--config 'patch.crates-io.ntapi.rev="97ede981a1777883ff86d142b75024b023f04fad"' \
$maybeSplTokenCliVersionArg \
install --locked spl-token-cli --root "$installDir"
fi
)
Expand Down
8 changes: 8 additions & 0 deletions scripts/spl-token-cli-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# populate this on the stable branch
splTokenCliVersion=

maybeSplTokenCliVersionArg=
if [[ -n "$splTokenCliVersion" ]]; then
# shellcheck disable=SC2034
maybeSplTokenCliVersionArg="--version $splTokenCliVersion"
fi