Skip to content

Commit

Permalink
ci: skip spl test when version is too high (#1945)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau authored Jul 2, 2024
1 parent 5d01d92 commit 4d9d27f
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 4d9d27f

Please sign in to comment.