Skip to content

Commit

Permalink
v2.0: ci: skip spl test when version is too high (backport of anza-xy…
Browse files Browse the repository at this point in the history
…z#1945) (anza-xyz#1961)

ci: skip spl test when version is too high (anza-xyz#1945)

(cherry picked from commit 4d9d27f)

Co-authored-by: Yihau Chen <[email protected]>
  • Loading branch information
2 people authored and neutrinoks committed Jul 17, 2024
1 parent 7a7a3e2 commit 62c9886
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/downstream-project-spl-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ project_used_solana_version=$(sed -nE 's/solana-sdk = \"[>=<~]*(.*)\"/\1/p' <"to
echo "used solana version: $project_used_solana_version"
if semverGT "$project_used_solana_version" "$SOLANA_VER"; then
echo "skip"
export SKIP_SPL_DOWNSTREAM_PROJECT_TEST=1
return
fi

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/downstream-project-spl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
cargo check
test:
Expand Down Expand Up @@ -103,6 +107,9 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
programStr="${{ tojson(matrix.arrays.required_programs) }}"
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}"
Expand Down Expand Up @@ -154,6 +161,9 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
programStr="${{ tojson(matrix.programs) }}"
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}"
Expand Down

0 comments on commit 62c9886

Please sign in to comment.