forked from GoogleCloudPlatform/python-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) · 1.46 KB
/
Makefile
File metadata and controls
54 lines (42 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
ifdef FORCE_REBUILD
DOCKER_FLAGS = --no-cache --pull
endif
# Note: 'make build/tests/benchmarks' share images by retagging the
# candidate as 'google/python'. So this could cause trouble with
# concurrent builds on the same machine.
CANDIDATE_NAME ?= $(shell date +%Y-%m-%d_%H_%M)
IMAGE_NAME ?= google/python:$(CANDIDATE_NAME)
export IMAGE_NAME
.PHONY: local-image
local-image: build-interpreters
docker build $(DOCKER_FLAGS) -t "$(IMAGE_NAME)" .
docker tag -f "$(IMAGE_NAME)" "google/python"
.PHONY: build-interpreters
build-interpreters:
export DOCKER_FLAGS
make -C python-interpreter-builder build
.PHONY: cloudbuild
cloudbuild:
envsubst < cloudbuild.yaml.in > cloudbuild.yaml
gcloud alpha container builds create . --config=cloudbuild.yaml
.PHONY: build
# no structure tests since they are implicit in cloudbuild
build: cloudbuild integration-tests
.PHONY: build-local
build-local: local-image structure-tests integration-tests
.PHONY: structure-tests
structure-tests: local-image
curl https://raw.githubusercontent.com/GoogleCloudPlatform/runtimes-common/master/structure_tests/ext_run.sh > ext_run.sh
chmod +x ext_run.sh
make -C tests structure-tests
.PHONY: benchmarks
benchmarks:
make -C tests benchmarks
.PHONY: google-cloud-python
google-cloud-python:
make -C tests google-cloud-python
.PHONY: google-cloud-system-tests
google-cloud-system-tests:
make -C system_tests
.PHONY: integration-tests
tests: benchmarks google-cloud-system-tests google-cloud-python