Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/solana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
node-version: "20.11.0"
solana-cli-version: "1.18.15"
anchor-version: "0.30.1"
- name: Set default Rust toolchain
run: rustup default stable
working-directory: ./solana
# - name: Set default Rust toolchain
# run: rustup default stable
# working-directory: ./solana
- name: make check-idl
run: make check-idl
working-directory: ./solana
Expand All @@ -80,9 +80,9 @@ jobs:
node-version: "20.11.0"
solana-cli-version: "1.18.15"
anchor-version: "0.30.1"
- name: Set default Rust toolchain
run: rustup default stable
working-directory: ./solana
# - name: Set default Rust toolchain
# run: rustup default stable
# working-directory: ./solana
- name: make anchor-test
run: make anchor-test
working-directory: ./solana
Expand All @@ -101,9 +101,9 @@ jobs:
node-version: "20.11.0"
solana-cli-version: "1.18.15"
anchor-version: "0.30.1"
- name: Set default Rust toolchain
run: rustup default stable
working-directory: ./solana
# - name: Set default Rust toolchain
# run: rustup default stable
# working-directory: ./solana
- name: make anchor-test-upgrade
run: make anchor-test-upgrade
working-directory: ./solana
16 changes: 13 additions & 3 deletions solana/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ CLONED_MAINNET_PROGRAMS=\
ts/tests/artifacts/mainnet_cctp_token_messenger_minter.so \
ts/tests/artifacts/mainnet_cctp_message_transmitter.so

PROGRAM_NAMES=matching_engine token_router upgrade_manager

### Building the IDL requires a nightly build. We arbitrarily chose the same
### date as the release of Anchor 0.30.1.
IDL_TOOLCHAIN=nightly-2024-06-20

.PHONY: all
all: check

Expand Down Expand Up @@ -42,11 +48,15 @@ endif

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

.PHONY: idl
idl:
anchor build -- --features localnet
mkdir -p target/idl target/types
for program in $(PROGRAM_NAMES); do \
RUSTUP_TOOLCHAIN=$(IDL_TOOLCHAIN) anchor idl build -p $$program -o target/idl/$$program.json; \
anchor idl type -o target/types/$$program.ts target/idl/$$program.json; \
done
mkdir -p ts/src/idl/json
mkdir -p ts/src/idl/ts
cp -r target/idl/* ts/src/idl/json/
Expand All @@ -65,7 +75,7 @@ anchor-test: anchor-test-setup

.PHONY: anchor-test-upgrade
anchor-test-upgrade: node_modules ts/tests/artifacts $(CLONED_MAINNET_PROGRAMS)
anchor build -- --features testnet
anchor build --no-idl -- --features testnet
cp target/deploy/matching_engine.so ts/tests/artifacts/new_testnet_matching_engine.so
cp target/deploy/token_router.so ts/tests/artifacts/new_testnet_token_router.so
cp target/deploy/upgrade_manager.so ts/tests/artifacts/testnet_upgrade_manager.so
Expand Down