From 9b5e63c39fc12b4f45f33f9222049b32f4c2da51 Mon Sep 17 00:00:00 2001 From: Tyera Date: Sun, 26 Feb 2023 21:31:08 -0700 Subject: [PATCH] Fix twoxtx setup vis-a-vis workspace inheritance (#4063) --- .github/workflows/pull-request-token.yml | 4 +++- token/twoxtx-setup.sh | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-token.yml b/.github/workflows/pull-request-token.yml index 5afc877f..68a9a50b 100644 --- a/.github/workflows/pull-request-token.yml +++ b/.github/workflows/pull-request-token.yml @@ -114,7 +114,9 @@ jobs: - name: Build and test token-2022 twoxtx (TEMPORARY) run: | ./token/twoxtx-setup.sh - cargo +${{ env.RUST_STABLE_VERSION }} test-sbf --manifest-path token/program-2022-test/Cargo.toml -- --nocapture + ./token/twoxtx-solana/cargo-build-sbf --manifest-path token/program-2022/Cargo.toml + ./token/twoxtx-solana/cargo-build-sbf --manifest-path instruction-padding/program/Cargo.toml + ./token/twoxtx-solana/cargo-test-sbf --manifest-path token/program-2022-test/Cargo.toml -- --nocapture js-test: runs-on: ubuntu-latest diff --git a/token/twoxtx-setup.sh b/token/twoxtx-setup.sh index 3bb8d624..b57f1fed 100755 --- a/token/twoxtx-setup.sh +++ b/token/twoxtx-setup.sh @@ -25,4 +25,11 @@ if [[ ! -f twoxtx-solana/.twoxtx-patched ]]; then fi ../patch.crates-io.sh twoxtx-solana +repo="token/twoxtx-solana" +if sed -n '/exclude = \[/,/\]/p' ../Cargo.toml | grep -q "$repo"; then + echo "$repo is already excluded" +else + sed -i'' ../Cargo.toml -e "/exclude/a \ \ \"$repo\"," +fi + exit 0