diff --git a/.github/workflows/pull-request-single-pool.yml b/.github/workflows/pull-request-single-pool.yml index 7a8483dc08e..ea80dcc745e 100644 --- a/.github/workflows/pull-request-single-pool.yml +++ b/.github/workflows/pull-request-single-pool.yml @@ -105,7 +105,7 @@ jobs: - name: Build dependent programs run: | - cargo build-sbf --manifest-path=single-pool/program/Cargo.toml + cargo build-sbf --tools-version v1.43 --manifest-path=single-pool/program/Cargo.toml - name: Build and test run: | diff --git a/.github/workflows/pull-request-token-swap.yml b/.github/workflows/pull-request-token-swap.yml index c86865137c7..1ec3919f683 100644 --- a/.github/workflows/pull-request-token-swap.yml +++ b/.github/workflows/pull-request-token-swap.yml @@ -69,7 +69,7 @@ jobs: - name: Build production version run: | - cargo +"$RUST_STABLE" build-sbf \ + cargo +"$RUST_STABLE" build-sbf --tools-version v1.43 \ --manifest-path=token-swap/program/Cargo.toml \ --features production \ --sbf-out-dir target/deploy-production diff --git a/.github/workflows/pull-request-token-upgrade.yml b/.github/workflows/pull-request-token-upgrade.yml index 306e269e186..a8e76066e2e 100644 --- a/.github/workflows/pull-request-token-upgrade.yml +++ b/.github/workflows/pull-request-token-upgrade.yml @@ -101,7 +101,7 @@ jobs: - name: Build dependent programs run: | - cargo build-sbf --manifest-path ./token-upgrade/program/Cargo.toml + cargo build-sbf --tools-version v1.43 --manifest-path ./token-upgrade/program/Cargo.toml - name: Run CLI tests run: | diff --git a/.github/workflows/pull-request-token.yml b/.github/workflows/pull-request-token.yml index db250efb876..241e2be1f55 100644 --- a/.github/workflows/pull-request-token.yml +++ b/.github/workflows/pull-request-token.yml @@ -230,8 +230,8 @@ jobs: - name: Build and test token-2022 run: | - cargo build-sbf --manifest-path token/program-2022/Cargo.toml - cargo build-sbf --manifest-path instruction-padding/program/Cargo.toml + cargo build-sbf --tools-version v1.43 --manifest-path token/program-2022/Cargo.toml + cargo build-sbf --tools-version v1.43 --manifest-path instruction-padding/program/Cargo.toml ./ci/cargo-test-sbf.sh token/program-2022-test js-test: diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index c37be638ba5..29f1c9b042e 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -34,7 +34,7 @@ }, "scripts": { "build": "rm -rf dist/ && tsc -p tsconfig.json", - "build:program": "cargo build-sbf --manifest-path=../programs/account-compression/Cargo.toml && cargo build-sbf --manifest-path=../programs/noop/Cargo.toml", + "build:program": "cargo build-sbf --tools-version v1.43 --manifest-path=../programs/account-compression/Cargo.toml && cargo build-sbf --manifest-path=../programs/noop/Cargo.toml", "lint": "set -ex; eslint . --ext .js,.ts", "lint:fix": "eslint . --fix --ext .js,.ts", "docs": "rm -rf docs/ && typedoc --out docs", diff --git a/ci/cargo-test-sbf.sh b/ci/cargo-test-sbf.sh index 498c2252fdb..a78c61df824 100755 --- a/ci/cargo-test-sbf.sh +++ b/ci/cargo-test-sbf.sh @@ -31,7 +31,8 @@ if [[ -r $run_dir/Cargo.toml ]]; then # Build/test just one BPF program set -x cd $run_dir - cargo +"$rust_stable" test-sbf -- --nocapture + # Remove tools version specification once v2.1 cargo-build-sbf is available + cargo +"$rust_stable" test-sbf --tools-version v1.43 -- --nocapture exit 0 fi @@ -43,7 +44,8 @@ for program in $run_dir/program{,-*}; do ( set -x cd $program - cargo +"$rust_stable" test-sbf -- --nocapture + # Remove tools version specification once v2.1 cargo-build-sbf is available + cargo +"$rust_stable" test-sbf --tools-version v1.43 -- --nocapture ) fi done @@ -53,6 +55,7 @@ if [[ -n $run_all ]]; then set -x for directory in $(ls -d $run_dir/*/); do cd $directory - cargo +"$rust_stable" test-sbf -- --nocapture + # Remove tools version specification once v2.1 cargo-build-sbf is available + cargo +"$rust_stable" test-sbf --tools-version v1.43 -- --nocapture done fi diff --git a/name-service/js/package.json b/name-service/js/package.json index 82c76265b75..b944fe11378 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -32,7 +32,7 @@ }, "scripts": { "build": "tsc --build --verbose tsconfig.all.json", - "build:program": "cargo build-sbf --manifest-path=../program/Cargo.toml", + "build:program": "cargo build-sbf --tools-version v1.43 --manifest-path=../program/Cargo.toml", "prepublish": "tsc", "lint": "eslint --max-warnings 0 'src/*.ts'", "lint:fix": "eslint 'src/*.ts' --fix", diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index 4757ab95045..71f2704083c 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -12,7 +12,7 @@ "scripts": { "clean": "rm -rf dist/*", "build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./ts-fixup.sh", - "build:program": "cargo build-sbf --manifest-path=../../../program/Cargo.toml", + "build:program": "cargo build-sbf --tools-version v1.43 --manifest-path=../../../program/Cargo.toml", "lint": "eslint --max-warnings 0 .", "lint:fix": "eslint . --fix", "test": "sed -i '1s/.*/{ \"type\": \"module\",/' package.json && NODE_OPTIONS='--loader=tsx' ava ; ret=$?; sed -i '1s/.*/{/' package.json && exit $ret" diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index d84d214ce1a..7eb2c54db6b 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -4,7 +4,7 @@ "description": "SPL Stake Pool Program JS API", "scripts": { "build": "tsc && cross-env NODE_ENV=production rollup -c", - "build:program": "cargo build-sbf --manifest-path=../program/Cargo.toml", + "build:program": "cargo build-sbf --tools-version v1.43 --manifest-path=../program/Cargo.toml", "lint": "eslint --max-warnings 0 .", "lint:fix": "eslint . --fix", "test": "jest", diff --git a/token-swap/js/package.json b/token-swap/js/package.json index 714ac08bab6..1e00846dcc7 100644 --- a/token-swap/js/package.json +++ b/token-swap/js/package.json @@ -34,7 +34,7 @@ "clean": "rm -rf lib/*", "build": "tsc --build --verbose tsconfig.all.json", "postbuild": "echo '{\"type\":\"commonjs\"}' > lib/cjs/package.json && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "build:program": "cargo build-sbf --manifest-path=../program/Cargo.toml", + "build:program": "cargo build-sbf --tools-version v1.43 --manifest-path=../program/Cargo.toml", "test:js": "mocha test", "test": "start-server-and-test 'solana-test-validator --bpf-program SwapsVeCiPHMUAtzQWZw7RjsKjgCjhwU55QGu4U1Szw ../../target/deploy/spl_token_swap.so --reset --quiet' http://127.0.0.1:8899/health test:js", "lint": "eslint --max-warnings 0 .", diff --git a/token/js/package.json b/token/js/package.json index 3ee93044a65..ae9f50948b6 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -33,7 +33,7 @@ "clean": "shx rm -rf lib **/*.tsbuildinfo || true", "build": "tsc --build --verbose tsconfig.all.json", "postbuild": "shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:program": "cargo build-sbf --manifest-path=../program/Cargo.toml && cargo build-sbf --manifest-path=../program-2022/Cargo.toml && cargo build-sbf --manifest-path=../../associated-token-account/program/Cargo.toml && cargo build-sbf --no-default-features --manifest-path=../transfer-hook/example/Cargo.toml", + "build:program": "cargo build-sbf --tools-version v1.43 --manifest-path=../program/Cargo.toml && cargo build-sbf --tools-version v1.43 --manifest-path=../program-2022/Cargo.toml && cargo build-sbf --tools-version v1.43 --manifest-path=../../associated-token-account/program/Cargo.toml && cargo build-sbf --tools-version v1.43 --no-default-features --manifest-path=../transfer-hook/example/Cargo.toml", "watch": "tsc --build --verbose --watch tsconfig.all.json", "release": "npm run clean && npm run build", "lint": "eslint --max-warnings 0 .", @@ -44,7 +44,7 @@ "test:e2e-built": "start-server-and-test 'solana-test-validator --bpf-program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ../../target/deploy/spl_token.so --reset --quiet' http://127.0.0.1:8899/health 'mocha test/e2e'", "test:e2e-2022": "TEST_PROGRAM_ID=TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb start-server-and-test 'solana-test-validator --bpf-program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL ../../target/deploy/spl_associated_token_account.so --bpf-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ../../target/deploy/spl_token_2022.so --bpf-program TokenHookExampLe8smaVNrxTBezWTRbEwxwb1Zykrb ../../target/deploy/spl_transfer_hook_example.so --reset --quiet' http://127.0.0.1:8899/health 'mocha test/e2e*'", "test:e2e-native": "start-server-and-test 'solana-test-validator --reset --quiet' http://127.0.0.1:8899/health 'mocha test/e2e'", - "test:build-programs": "cargo build-sbf --manifest-path ../program/Cargo.toml && cargo build-sbf --manifest-path ../program-2022/Cargo.toml && cargo build-sbf --manifest-path ../../associated-token-account/program/Cargo.toml", + "test:build-programs": "cargo build-sbf --tools-version v1.43 --manifest-path ../program/Cargo.toml && cargo build-sbf --tools-version v1.43 --manifest-path ../program-2022/Cargo.toml && cargo build-sbf --tools-version v1.43 --manifest-path ../../associated-token-account/program/Cargo.toml", "deploy": "npm run deploy:docs", "docs": "shx rm -rf docs && typedoc && shx cp .nojekyll docs/", "deploy:docs": "npm run docs && gh-pages --dest token/js --dist docs --dotfiles"