Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
chore: add fetch-gw-scripts in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Flouse committed May 18, 2022
1 parent 65a0fb2 commit 70e70f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ BUILDER_DOCKER := nervos/ckb-riscv-gnu-toolchain@sha256:7b168b4b109a0f741078a71b

all: build/test_contracts build/test_rlp build/generator build/validator build/generator_log build/validator_log build/test_ripemd160 build/blockchain.h build/godwoken.h

all-via-docker: generate-protocol
all-via-docker: generate-protocol fetch-gw-scripts
mkdir -p build
docker run --rm -v `pwd`:/code -w /code ${BUILDER_DOCKER} make
make patch-generator && make patch-generator_log
Expand Down Expand Up @@ -223,6 +223,16 @@ contract/sudt-erc20-proxy:
# then echo "ERC20BIN_SHASUM matches" ; \
# else echo "ERC20BIN_SHASUM does not match" ; exit 1 ; fi

# fetch godwoken-scripts from godwoken-prebuilds image,
# including meta-contract and sudt-contract
PREBUILDS := ghcr.io/nervosnetwork/godwoken-prebuilds:v0.10.7-alphanet
fetch-gw-scripts:
mkdir -p build
docker run --rm -v `pwd`/build:/build-dir \
$(PREBUILDS) \
cp -r /scripts/godwoken-scripts /build-dir \
&& echo "Copy godwoken-scripts"

fmt:
clang-format -i -style=Google c/**/*.*

Expand Down
14 changes: 2 additions & 12 deletions devtools/ci/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,15 @@ else
git clone --depth=1 https://github.com/nervosnetwork/godwoken.git $GODWOKEN_DIR
fi
cd $GODWOKEN_DIR
# https://github.com/nervosnetwork/godwoken/releases/tag/v0.10.4
git fetch origin v0.10.4
# https://github.com/nervosnetwork/godwoken/tree/0.10
git fetch origin 0.10
git checkout FETCH_HEAD
git submodule update --init --recursive --depth=1

cd $PROJECT_ROOT
git submodule update --init --recursive --depth=1
make all-via-docker

# fetch godwoken-scripts from godwoken-prebuilds image,
# including meta-contract and sudt-contract
GW_SCRIPTS_DIR=$PROJECT_ROOT/build
mkdir -p $GW_SCRIPTS_DIR && echo "Create dir"
IMAGE=nervos/godwoken-prebuilds:v0.10.4
docker pull $IMAGE
docker run --rm -v $GW_SCRIPTS_DIR:/build-dir $IMAGE \
cp -r /scripts/godwoken-scripts /build-dir \
&& echo "Copy godwoken-scripts"

cd $TESTS_DIR
export RUST_BACKTRACE=full
cargo test -- --nocapture
Expand Down

0 comments on commit 70e70f6

Please sign in to comment.