2022-04-22 09:16:56 -07:00
|
|
|
-include Makefile.help
|
|
|
|
|
2022-04-26 08:26:44 -07:00
|
|
|
.PHONY: clean all ethereum terra tilt-deploy tilt-test
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-04-26 08:26:44 -07:00
|
|
|
all: ethereum terra sdk
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-04-26 08:26:44 -07:00
|
|
|
.PHONY: clean
|
|
|
|
## Remove All Builds
|
|
|
|
clean:
|
2022-05-13 14:04:34 -07:00
|
|
|
rm -rf wormhole tilt.json
|
2022-04-26 08:26:44 -07:00
|
|
|
cd ethereum && make clean
|
|
|
|
cd terra && make clean
|
|
|
|
cd sdk/js && rm -rf node_modules contracts lib src/icco/__tests__/tilt.json
|
2022-04-27 15:08:42 -07:00
|
|
|
cd tools && rm -rf node_modules lib
|
2022-04-22 09:16:56 -07:00
|
|
|
|
|
|
|
.PHONY: ethereum
|
2022-04-26 08:26:44 -07:00
|
|
|
## Build Ethereum contracts
|
2022-04-22 09:16:56 -07:00
|
|
|
ethereum: ethereum/build
|
|
|
|
|
|
|
|
ethereum/build:
|
|
|
|
cd ethereum && make build
|
|
|
|
|
|
|
|
.PHONY: terra
|
2022-04-26 08:26:44 -07:00
|
|
|
## Build Terra contracts
|
2022-04-22 09:16:56 -07:00
|
|
|
terra: terra/artifacts/checksum.txt
|
|
|
|
|
|
|
|
terra/artifacts/checksum.txt:
|
2022-04-26 08:26:44 -07:00
|
|
|
cd terra && make build
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-04-26 08:26:44 -07:00
|
|
|
.PHONY: sdk
|
|
|
|
## Build SDK
|
2022-04-27 15:08:42 -07:00
|
|
|
sdk: sdk/js/lib
|
|
|
|
|
|
|
|
sdk/js/lib: ethereum sdk/js/node_modules
|
2022-04-26 08:26:44 -07:00
|
|
|
cd sdk/js && npm run build
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-04-26 08:26:44 -07:00
|
|
|
sdk/js/node_modules:
|
|
|
|
cd sdk/js && npm ci
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-04-27 15:08:42 -07:00
|
|
|
.PHONY: tools
|
|
|
|
## Build tools (scripts in tools directory)
|
|
|
|
tools: tools/lib
|
|
|
|
|
|
|
|
tools/lib: sdk
|
|
|
|
cd tools && npm ci && npm run build
|
|
|
|
|
2022-04-22 09:16:56 -07:00
|
|
|
.PHONY: tilt-deploy
|
|
|
|
## Deploy Contracts to Tilt
|
2022-04-27 15:08:42 -07:00
|
|
|
tilt-deploy: ethereum tools #terra
|
2022-04-27 09:05:18 -07:00
|
|
|
rm -f tilt.json
|
2022-04-22 09:16:56 -07:00
|
|
|
@if ! pgrep tilt; then echo "Error: tilt not running. Start it before running tests"; exit 1; fi
|
2022-04-26 08:26:44 -07:00
|
|
|
cd ethereum && make tilt-deploy
|
2022-04-27 15:08:42 -07:00
|
|
|
node tools/lib/register_tilt_contributors.js
|
2022-04-27 09:05:18 -07:00
|
|
|
cp tilt.json sdk/js/src/icco/__tests__/tilt.json
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-04-26 08:26:44 -07:00
|
|
|
.PHONY: tilt-test
|
|
|
|
## Run Integration Test in Tilt
|
|
|
|
tilt-test: sdk sdk/js/src/icco/__tests__/tilt.json
|
|
|
|
@if ! pgrep tilt; then echo "Error: tilt not running. Start it before running tests"; exit 1; fi
|
|
|
|
cd sdk/js && npm run build && npm run test
|
2022-04-22 09:16:56 -07:00
|
|
|
|
2022-05-13 14:04:34 -07:00
|
|
|
wormhole:
|
|
|
|
git clone --depth 1 --branch dev.v2 --single-branch https://github.com/certusone/wormhole.git
|
|
|
|
|
|
|
|
wormhole/solana/artifacts-devnet: wormhole
|
|
|
|
cd wormhole/solana && NETWORK=devnet make artifacts
|
|
|
|
|
|
|
|
wormhole/ethereum/build: wormhole
|
|
|
|
cd wormhole/ethereum && make build
|