From 2945ae38b15e9cbcf166074eaaacd0d27364a250 Mon Sep 17 00:00:00 2001 From: yihau Date: Tue, 2 Jul 2024 01:22:44 +0800 Subject: [PATCH] ci: skip spl test when version is too high --- .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' ]/}"