2018-04-28 20:05:30 +00:00
|
|
|
PROJECT_NAME := Pulumi SDK
|
2018-06-09 23:16:35 +00:00
|
|
|
SUB_PROJECTS := sdk/nodejs sdk/python sdk/go
|
2017-11-12 00:20:56 +00:00
|
|
|
include build/common.mk
|
2017-06-21 21:23:48 +00:00
|
|
|
|
2017-12-05 21:39:13 +00:00
|
|
|
PROJECT := github.com/pulumi/pulumi
|
|
|
|
PROJECT_PKGS := $(shell go list ./cmd/... ./pkg/... | grep -v /vendor/)
|
|
|
|
EXTRA_TEST_PKGS := $(shell go list ./examples/ ./tests/... | grep -v /vendor/)
|
2018-03-16 00:07:01 +00:00
|
|
|
VERSION := $(shell scripts/get-version)
|
2016-11-15 19:30:34 +00:00
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
GOMETALINTERBIN := gometalinter
|
|
|
|
GOMETALINTER := ${GOMETALINTERBIN} --config=Gometalinter.json
|
2017-06-21 21:46:03 +00:00
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
TESTPARALLELISM := 10
|
2018-01-23 23:56:58 +00:00
|
|
|
|
|
|
|
# Our travis workers are a little show and sometime the fast tests take a little longer
|
|
|
|
ifeq ($(TRAVIS),true)
|
|
|
|
TEST_FAST_TIMEOUT := 10m
|
|
|
|
else
|
2017-12-15 20:12:06 +00:00
|
|
|
TEST_FAST_TIMEOUT := 2m
|
2018-01-23 23:56:58 +00:00
|
|
|
endif
|
2017-06-16 16:50:56 +00:00
|
|
|
|
2018-07-12 20:29:35 +00:00
|
|
|
build-proto::
|
|
|
|
cd sdk/proto && ./generate.sh
|
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
build::
|
2017-12-01 21:50:32 +00:00
|
|
|
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
2017-01-27 23:42:55 +00:00
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
install::
|
2017-12-01 21:50:32 +00:00
|
|
|
GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
2017-10-05 21:08:35 +00:00
|
|
|
|
2018-08-08 20:00:42 +00:00
|
|
|
dist::
|
|
|
|
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
|
|
|
|
2017-10-31 23:39:23 +00:00
|
|
|
LINT_SUPPRESS="or be unexported"
|
2017-11-12 00:20:56 +00:00
|
|
|
lint::
|
2018-10-30 22:43:53 +00:00
|
|
|
$(GOMETALINTER) main.go ./pkg/... ./cmd/... | grep -vE ${LINT_SUPPRESS} | sort ; exit $$(($${PIPESTATUS[1]}-1))
|
2017-01-27 23:42:55 +00:00
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
test_fast::
|
2017-12-15 20:12:06 +00:00
|
|
|
go test -timeout $(TEST_FAST_TIMEOUT) -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS}
|
2017-08-06 15:52:32 +00:00
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
test_all::
|
2017-12-05 21:39:13 +00:00
|
|
|
PATH=$(PULUMI_ROOT)/bin:$(PATH) go test -cover -parallel ${TESTPARALLELISM} ${EXTRA_TEST_PKGS}
|
Makeify more; add a "full build" target (#193)
* Makeify more; add a "full build" target
This change uses make for more of our tree. Namely, the AWS provider
and LumiJS compilers each now use make to build and/or install them.
Not only does this bring about some consistency to how we build and
test things, but also made it easy to add a full build target:
$ make all
This target will build, test, and install the core Go tools, the LumiJS
compiler, and the AWS provider, in that order.
Each can be made in isolation, however, which ensures that the inner
loop for those is fast and so that, when it comes to finishing
pulumi/lumi#147, we can easily split them out and make from the top.
2017-06-02 21:26:34 +00:00
|
|
|
|
2018-03-06 22:36:50 +00:00
|
|
|
.PHONY: publish_tgz
|
|
|
|
publish_tgz:
|
2017-11-12 00:20:56 +00:00
|
|
|
$(call STEP_MESSAGE)
|
2018-03-06 22:36:50 +00:00
|
|
|
./scripts/publish_tgz.sh
|
|
|
|
|
|
|
|
.PHONY: publish_packages
|
|
|
|
publish_packages:
|
|
|
|
$(call STEP_MESSAGE)
|
|
|
|
./scripts/publish_packages.sh
|
2016-11-15 19:30:34 +00:00
|
|
|
|
2017-11-12 00:20:56 +00:00
|
|
|
.PHONY: coverage
|
|
|
|
coverage:
|
|
|
|
$(call STEP_MESSAGE)
|
2017-11-20 19:12:04 +00:00
|
|
|
./scripts/gocover.sh
|
2017-06-23 22:11:20 +00:00
|
|
|
|
2017-09-28 18:53:08 +00:00
|
|
|
# The travis_* targets are entrypoints for CI.
|
2017-11-12 00:20:56 +00:00
|
|
|
.PHONY: travis_cron travis_push travis_pull_request travis_api
|
|
|
|
travis_cron: all coverage
|
2018-03-06 22:36:50 +00:00
|
|
|
travis_push: only_build publish_tgz only_test publish_packages
|
2017-09-28 18:53:08 +00:00
|
|
|
travis_pull_request: all
|
|
|
|
travis_api: all
|