-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add helper script to compile solana artifacts locally #16180
Conversation
abbrevieated output:
artifacts populated and subsequent tests pass |
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
# Parse the go.mod file for the specific entry | ||
MOD_ENTRY=$(grep -E 'github\.com/smartcontractkit/chainlink-ccip/chains/solana\s+v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-[a-f0-9]+' "$GO_MOD_FILE") | ||
if [[ -z "$MOD_ENTRY" ]]; then | ||
echo "Error: Could not find the required entry in go.mod." | ||
exit 1 | ||
fi | ||
|
||
# Extract repo URL and pseudo-version | ||
PSEUDO_VERSION=$(echo "$MOD_ENTRY" | awk '{print $2}') | ||
|
||
# Extract commit SHA from pseudo-version (last 12 characters) | ||
COMMIT_SHA=$(echo "$PSEUDO_VERSION" | grep -oE '[a-f0-9]{12}$') | ||
if [[ -z "$COMMIT_SHA" ]]; then | ||
echo "Error: Could not extract commit SHA from pseudo-version: $PSEUDO_VERSION" | ||
exit 1 | ||
fi | ||
|
||
echo "Cloning chainlink-ccip..." | ||
git clone https://github.com/smartcontractkit/chainlink-ccip.git "$TEMP_REPO_DIR" | ||
|
||
echo "Checking out commit $COMMIT_SHA..." | ||
cd "$TEMP_REPO_DIR" | ||
git checkout "$COMMIT_SHA" |
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.
Ok we can avoid all these steps (and additional cloning etc) by using the dependency fetched by go mod
:
SOLANA_DIR=$(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-ccip/chains/solana)
cd SOLANA_DIR
make docker-build-contracts
You might have some issues with the files being marked read-only, we could get around that by specifying $TARGET_DIR (solana_contracts
) as the mount for target/deploy
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.
very clever! Let me see how easy this is
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.
smartcontractkit/chainlink-ccip#554 it was easier to just mount all of target
|
https://smartcontract-it.atlassian.net/browse/INTAUTO-448
Requires
Supports