Skip to content

Commit

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

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

(cherry picked from commit 4d9d27f)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
  • Loading branch information
mergify[bot] and yihau authored Jul 2, 2024
1 parent 5b9c5b9 commit c18c8f7
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 c18c8f7

Please sign in to comment.