From 9504d74e9047064a94ecc6f53865709038e0d5ac Mon Sep 17 00:00:00 2001 From: acheron Date: Sat, 20 May 2023 19:55:43 +0200 Subject: [PATCH 1/2] Add rust-toolchain.toml for zero-copy tests --- tests/zero-copy/rust-toolchain.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/zero-copy/rust-toolchain.toml diff --git a/tests/zero-copy/rust-toolchain.toml b/tests/zero-copy/rust-toolchain.toml new file mode 100644 index 0000000000..6b125f5f7d --- /dev/null +++ b/tests/zero-copy/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.66.1-x86_64-unknown-linux-gnu" From 873ea5d1a3dacb01e53dfe7ead3e99d297f8dffe Mon Sep 17 00:00:00 2001 From: acheron Date: Sat, 20 May 2023 20:17:24 +0200 Subject: [PATCH 2/2] Install 1.66.1-x86_64-unknown-linux-gnu target --- .github/workflows/reusable-tests.yaml | 2 +- tests/zero-copy/rust-toolchain.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-tests.yaml b/.github/workflows/reusable-tests.yaml index e69c38a7da..e8f08f27cc 100644 --- a/.github/workflows/reusable-tests.yaml +++ b/.github/workflows/reusable-tests.yaml @@ -403,7 +403,7 @@ jobs: path: tests/declare-id - cmd: cd tests/typescript && anchor test --skip-lint && npx tsc --noEmit path: tests/typescript - - cmd: cd tests/zero-copy && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf + - cmd: cd tests/zero-copy && rustup toolchain install 1.66.1-x86_64-unknown-linux-gnu && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf path: tests/zero-copy - cmd: cd tests/chat && anchor test --skip-lint path: tests/chat diff --git a/tests/zero-copy/rust-toolchain.toml b/tests/zero-copy/rust-toolchain.toml index 6b125f5f7d..7bd4253328 100644 --- a/tests/zero-copy/rust-toolchain.toml +++ b/tests/zero-copy/rust-toolchain.toml @@ -1,2 +1,3 @@ +# TODO: Remove when `cargo-test-sbf` works with stable Rust [toolchain] channel = "1.66.1-x86_64-unknown-linux-gnu"