From 4d9d27f1ff65d34a1ab7fd400ee11c21721edce9 Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Tue, 2 Jul 2024 12:26:30 +0800 Subject: [PATCH] ci: skip spl test when version is too high (#1945) --- .github/scripts/downstream-project-spl-common.sh | 1 + .github/workflows/downstream-project-spl.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/scripts/downstream-project-spl-common.sh b/.github/scripts/downstream-project-spl-common.sh index 0bfff86dcca2df..779af8f2568110 100644 --- a/.github/scripts/downstream-project-spl-common.sh +++ b/.github/scripts/downstream-project-spl-common.sh @@ -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 diff --git a/.github/workflows/downstream-project-spl.yml b/.github/workflows/downstream-project-spl.yml index d875afbd4a9c56..8d3baf25949e99 100644 --- a/.github/workflows/downstream-project-spl.yml +++ b/.github/workflows/downstream-project-spl.yml @@ -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: @@ -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' ]/}" @@ -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' ]/}"