-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from ipfs-force-community/feat/add_gen_code_check
feat: 在ci中检查生成物结果,运行example测试/check code gen in ci
- Loading branch information
Showing
16 changed files
with
85 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
target | ||
./bin/* | ||
.idea | ||
.vscode | ||
./tesx | ||
*.log | ||
/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
current_dir = $(shell pwd) | ||
|
||
build-tool: | ||
build: | ||
ifeq (,$(wildcard ${current_dir}/bin/go-fvm-sdk-tools)) | ||
cargo build -p go-fvm-sdk-tools --out-dir ${current_dir}/bin --release -Z unstable-options | ||
cargo build -p go-fvm-sdk-tools --release | ||
endif | ||
|
||
build: build-tool | ||
|
||
gen: | ||
install:build | ||
cp -f ./target/release/go-fvm-sdk-tools /usr/local/bin | ||
|
||
code-gen: | ||
cd ./sdk/gen && go run main.go | ||
cd ./sdk/cases && ./gen.sh | ||
cd ./examples/hellocontract/gen && go run main.go | ||
cd ./examples/hellocontract && go-fvm-sdk-tools build | ||
cd ./examples/erc20/gen && go run main.go | ||
cd ./examples/erc20 && go-fvm-sdk-tools build | ||
|
||
clean: | ||
rm -rf ./bin/* | ||
|
||
gen-case: | ||
cd ./sdk/cases && ./gen.sh ${current_dir} | ||
|
||
test: build gen-case | ||
cd ./sdk/cases && ${current_dir}/bin/go-fvm-sdk-tools test | ||
test: build code-gen | ||
cd ./sdk/cases && go-fvm-sdk-tools test | ||
cd ./examples/hellocontract && go-fvm-sdk-tools test | ||
cd ./examples/erc20 && go-fvm-sdk-tools test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"accounts": [ | ||
{ | ||
"priv_key": "6c3b9aa767f785b537c0d8ba5fa54677e6a6e281320dfbb27c889b8fa460670f", | ||
"address": "f1m674sjwmga36qi3wkowt3wozwpahrkdlvd4tpci", | ||
"balance": 10000 | ||
}, | ||
{ | ||
"priv_key": "b10da48cea4c09676b8e0efcd806941465060736032bb898420d0863dca72538", | ||
"address": "f1dwyrbh74hr5nwqv2gjedjyvgphxxkffxug4rkkq", | ||
"balance": 10000 | ||
}, | ||
{ | ||
"priv_key": "c51b8a31c98b9fe13065b485c9f8658c194c430843570ccac2720a3b30b47adb", | ||
"address": "f15o3zaqettjmmarblwzjr66lwddsi6rbtxjwzngq", | ||
"balance": 10000 | ||
} | ||
], | ||
"contracts":[ | ||
{ | ||
"name": "helloworld", | ||
"binary": "hellocontract.wasm", | ||
"constructor": "", | ||
"cases": [ | ||
|
||
] | ||
} | ||
] | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#!/bin/bash | ||
|
||
root_dir=$1 | ||
echo ${root_dir} | ||
for i in *.go; do | ||
filename=$(echo $i | cut -d . -f1) | ||
target="${filename}.wasm" | ||
${root_dir}/bin/go-fvm-sdk-tools build --output $target --wat -- $i | ||
go-fvm-sdk-tools build --output $target --wat -- $i | ||
echo "Build ${target} successfully" | ||
done |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.