Skip to content

Commit ed70bb9

Browse files
committed
solana: fix idl build
workflows: remove rustup default
1 parent 646bc03 commit ed70bb9

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

.github/workflows/solana.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ jobs:
5959
node-version: "20.11.0"
6060
solana-cli-version: "1.18.15"
6161
anchor-version: "0.30.1"
62-
- name: Set default Rust toolchain
63-
run: rustup default stable
64-
working-directory: ./solana
62+
# - name: Set default Rust toolchain
63+
# run: rustup default stable
64+
# working-directory: ./solana
6565
- name: make check-idl
6666
run: make check-idl
6767
working-directory: ./solana
@@ -80,9 +80,9 @@ jobs:
8080
node-version: "20.11.0"
8181
solana-cli-version: "1.18.15"
8282
anchor-version: "0.30.1"
83-
- name: Set default Rust toolchain
84-
run: rustup default stable
85-
working-directory: ./solana
83+
# - name: Set default Rust toolchain
84+
# run: rustup default stable
85+
# working-directory: ./solana
8686
- name: make anchor-test
8787
run: make anchor-test
8888
working-directory: ./solana
@@ -101,9 +101,9 @@ jobs:
101101
node-version: "20.11.0"
102102
solana-cli-version: "1.18.15"
103103
anchor-version: "0.30.1"
104-
- name: Set default Rust toolchain
105-
run: rustup default stable
106-
working-directory: ./solana
104+
# - name: Set default Rust toolchain
105+
# run: rustup default stable
106+
# working-directory: ./solana
107107
- name: make anchor-test-upgrade
108108
run: make anchor-test-upgrade
109109
working-directory: ./solana

solana/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,17 @@ endif
4242

4343
.PHONY: anchor-test-setup
4444
anchor-test-setup: node_modules ts/tests/artifacts $(CLONED_MAINNET_PROGRAMS)
45-
anchor build -- --features integration-test
45+
anchor build --no-idl -- --features integration-test
4646

4747
.PHONY: idl
4848
idl:
49-
anchor build -- --features localnet
49+
mkdir -p target/idl target/types
50+
RUSTUP_TOOLCHAIN=nightly-2024-06-20 anchor idl build -p matching-engine -o target/idl/matching_engine.json
51+
anchor idl type -o target/types/matching_engine.ts target/idl/matching_engine.json
52+
RUSTUP_TOOLCHAIN=nightly-2024-06-20 anchor idl build -p token-router -o target/idl/token_router.json
53+
anchor idl type -o target/types/token_router.ts target/idl/token_router.json
54+
RUSTUP_TOOLCHAIN=nightly-2024-06-20 anchor idl build -p upgrade-manager -o target/idl/upgrade_manager.json
55+
anchor idl type -o target/types/upgrade_manager.ts target/idl/upgrade_manager.json
5056
mkdir -p ts/src/idl/json
5157
mkdir -p ts/src/idl/ts
5258
cp -r target/idl/* ts/src/idl/json/
@@ -65,7 +71,7 @@ anchor-test: anchor-test-setup
6571

6672
.PHONY: anchor-test-upgrade
6773
anchor-test-upgrade: node_modules ts/tests/artifacts $(CLONED_MAINNET_PROGRAMS)
68-
anchor build -- --features testnet
74+
anchor build --no-idl -- --features testnet
6975
cp target/deploy/matching_engine.so ts/tests/artifacts/new_testnet_matching_engine.so
7076
cp target/deploy/token_router.so ts/tests/artifacts/new_testnet_token_router.so
7177
cp target/deploy/upgrade_manager.so ts/tests/artifacts/testnet_upgrade_manager.so

0 commit comments

Comments
 (0)