diff --git a/.travis.yml b/.travis.yml index c93538071..b6c5e3768 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,18 +17,11 @@ matrix: dist: xenial - os: osx -# Install necessaries go packages -install: - - make install - - make install-gfx-deps - - make install-linters - # Build, test & run cx test script: - - make build-full + - make build + - make install - make test - - make test-full - - make lint # Notifications to Telegram channel notifications: diff --git a/Makefile b/Makefile index ba1fbd9a6..bda8fe9e9 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ export GO111MODULE=on .DEFAULT_GOAL := help -.PHONY: build-parser build build-full test test-full -.PHONY: install-deps install install-full +.PHONY: build-parser build test +.PHONY: install .PHONY: dep PWD := $(shell pwd) @@ -65,42 +65,32 @@ ifeq ($(UNAME_S), Linux) endif build: ## Build CX from sources - go build $(GO_OPTS) -tags="base" -o ./bin/cx github.com/skycoin/cx/cxgo/ + go build $(GO_OPTS) -tags="base" -o ./bin/cx github.com/skycoin/cx/cmd/cx chmod +x ./bin/cx clean: ## Removes binaries. rm -r ./bin/cx -build-full: install-full ## Build CX from sources with all build tags - go build $(GO_OPTS) -tags="base cxfx" -o ./bin/cx github.com/skycoin/cx/cxgo/ - chmod +x ./bin/cx - token-fuzzer: go build $(GO_OPTS) -o ./bin/cx-token-fuzzer $(PWD)/development/token-fuzzer/main.go chmod +x ${GOPATH}/bin/cx-token-fuzzer -build-parser: install-deps ## Generate lexer and parser for CX grammar +build-parser: ## Generate lexer and parser for CX grammar ./bin/goyacc -o cxgo/cxgo0/cxgo0.go cxgo/cxgo0/cxgo0.y ./bin/goyacc -o cxgo/parser/cxgo.go cxgo/parser/cxgo.y -install: install-deps build configure-workspace ## Install CX from sources. Build dependencies +install: configure-workspace ## Install CX from sources. Build dependencies @echo 'NOTE:\tWe recommend you to test your CX installation by running "cx ./tests"' ./bin/cx -v -install-full: configure-workspace - test: ## Run CX test suite. ifndef CXVERSION @echo "cx not found in $(PWD)/bin, please run make install first" else # go test $(GO_OPTS) -race -tags base github.com/skycoin/cx/cxgo/ - ./bin/cx ./lib/args.cx ./tests/main.cx ++wdir=./tests ++disable-tests=gui,issue + ./bin/cx ./lib/args.cx ./tests/main.cx ++wdir=./tests ++disable-tests=gui,issue ++cxpath=$(PWD)/bin/cx endif -test-full: build ## Run CX test suite with all build tags - # go test $(GO_OPTS) -race -tags="base cxfx" github.com/skycoin/cx/cxgo/ - ./bin/cx ./lib/args.cx ./tests/main.cx ++wdir=./tests ++disable-tests=gui,issue - configure-workspace: ## Configure CX workspace environment mkdir -p $(CX_PATH)/src $(CX_PATH)/bin $(CX_PATH)/pkg @echo "NOTE:\tCX workspace at $(CX_PATH)"