Skip to content

Commit

Permalink
v1.18: ci: skip spl test when version is too high (backport of #1945) (
Browse files Browse the repository at this point in the history
…#1960)

* ci: skip spl test when version is too high (#1945)

(cherry picked from commit 4d9d27f)

# Conflicts:
#	.github/workflows/downstream-project-spl.yml

* fix conflict

---------

Co-authored-by: Yihau Chen <[email protected]>
  • Loading branch information
mergify[bot] and yihau authored Jul 2, 2024
1 parent a67e681 commit af3098e
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@ -18,6 +18,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
9 changes: 9 additions & 0 deletions .github/workflows/downstream-project-spl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-common.sh
source .github/scripts/downstream-project-spl-install-deps.sh
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
cargo check
Expand Down Expand Up @@ -103,6 +106,9 @@ jobs:
run: |
source .github/scripts/downstream-project-spl-common.sh
source .github/scripts/downstream-project-spl-install-deps.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 @@ -153,6 +159,9 @@ jobs:
- shell: bash
run: |
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 af3098e

Please sign in to comment.