-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for creating wasm builds #32
base: master
Are you sure you want to change the base?
Changes from all commits
bb3d949
e94f396
394ae03
7ea64ac
3ab4cbd
f319034
9c853cd
80a7be7
99cfc29
d087929
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,24 +14,37 @@ build-js-min: ## Build /skycoin/skycoin.go. The result is minified and saved in | |
go build -o gopherjs-tool vendor/github.com/gopherjs/gopherjs/tool.go | ||
GOOS=linux ./gopherjs-tool build skycoin/skycoin.go -m -o js/skycoin.js | ||
|
||
build-wasm: ## Build /wasm/skycoin.go. The result is saved in the repo root as skycoin-lite.wasm | ||
GOOS=js GOARCH=wasm go build -o js/skycoin-lite.wasm ./wasm/skycoin.go | ||
|
||
test-js: ## Run the Go tests using JavaScript | ||
go build -o gopherjs-tool vendor/github.com/gopherjs/gopherjs/tool.go | ||
./gopherjs-tool test ./skycoin/ -v | ||
|
||
test-suite-ts: ## Run the ts version of the cipher test suite. Use a small number of test cases | ||
test-suite-ts: ## Run the ts version of the cipher test suite for GopherJS. Use a small number of test cases | ||
cd js && npm run test | ||
|
||
test-suite-ts-extensive: ## Run the ts version of the cipher test suite. All the test cases | ||
test-suite-ts-extensive: ## Run the ts version of the cipher test suite for GopherJS. All the test cases | ||
cd js && npm run test-extensive | ||
|
||
test-suite-ts-wasm: ## Run the ts version of the cipher test suite for wasm and additional tests | ||
cd vendor/github.com/skycoin/skycoin/src/cipher && GOOS=js GOARCH=wasm go test -c -o test.wasm | ||
cd vendor/github.com/skycoin/skycoin/src/cipher/secp256k1-go && GOOS=js GOARCH=wasm go test -c -o test.wasm | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we run these tests for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, no problem. Done in the lastest commit |
||
cd vendor/github.com/skycoin/skycoin/src/cipher/secp256k1-go/secp256k1-go2 && GOOS=js GOARCH=wasm go test -c -o test.wasm | ||
cd js && npm run test-wasm | ||
cd js/tests && node cipher-wasm-internal.js | ||
cd vendor/github.com/skycoin/skycoin/src/cipher && rm test.wasm | ||
cd vendor/github.com/skycoin/skycoin/src/cipher/secp256k1-go && rm test.wasm | ||
cd vendor/github.com/skycoin/skycoin/src/cipher/secp256k1-go/secp256k1-go2 && rm test.wasm | ||
|
||
test: | ||
go test ./... -timeout=10m -cover | ||
|
||
lint: ## Run linters. Use make install-linters first. | ||
vendorcheck ./... | ||
golangci-lint run -c ./.golangci.yml ./... | ||
GOOS=js GOARCH=wasm golangci-lint run -c ./.golangci.yml ./... | ||
@# The govet version in golangci-lint is out of date and has spurious warnings, run it separately | ||
go vet -all ./... | ||
GOOS=js GOARCH=wasm go vet -all ./... | ||
|
||
check: lint test ## Run tests and linters | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this defaults to true, you may want to be explicit
go-tests = false
and leave a comment why (for the wasm tests)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
go-tests = false
makesdep ensure
sayroot prune options must be omitted instead of being set to false