diff options
author | Arnstein Ressem <aressem@vespa.ai> | 2024-05-21 14:44:51 +0200 |
---|---|---|
committer | Arnstein Ressem <aressem@vespa.ai> | 2024-05-21 14:44:51 +0200 |
commit | f1cf232118a259adf03a5de2342e122d018c82ea (patch) | |
tree | 29c2ed8c193a394a13e58b349edbe9ea1caa6e88 /.buildkite/Makefile | |
parent | d34875ee8c060583aa9046e92c91334740fb9f2f (diff) |
Allow Makefile in .buildkite
Diffstat (limited to '.buildkite/Makefile')
-rw-r--r-- | .buildkite/Makefile | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/.buildkite/Makefile b/.buildkite/Makefile new file mode 100644 index 00000000000..a8d0fa5ab27 --- /dev/null +++ b/.buildkite/Makefile @@ -0,0 +1,97 @@ +export TOP := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) + +export ARCH ?= $(shell if [[ $$(arch) == x86_64 ]]; then echo amd64; else echo arm64; fi) + +export LOG_DIR ?= $(shell pwd) +export SOURCE_DIR ?= $(shell pwd) +export WORKDIR ?= $(shell pwd) +export VESPA_CPP_TEST_JARS :=$(WORKDIR)/VESPA_CPP_TEST_JARS + +export VESPA_VERSION ?= 8.999.1 +export FACTORY_VESPA_VERSION := $(VESPA_VERSION) +export VALGRIND_UNIT_TESTS ?= false +export VESPA_USE_SANITIZER ?= null + +export VESPA_MAVEN_EXTRA_OPTS ?= --show-version --batch-mode --no-snapshot-updates -Dmaven.javadoc.skip=true \ + -Dmaven.source.skip=true -DaltDeploymentRepository=local-repo::default::file:$(WORKDIR)/artifacts/$(ARCH)/maven-repo + +export NUM_CPU_LIMIT ?= $(shell nproc) +export NUM_CPP_THREADS := $(shell echo $$(( $(NUM_CPU_LIMIT)*2/3 ))) +export NUM_MVN_THREADS := $(shell echo $$(( $(NUM_CPU_LIMIT)*2/3 ))) + +export BUILDKITE ?= false +export BUILDKITE_PULL_REQUEST ?= true +ifeq ($(BUILDKITE_PULL_REQUEST),false) + export VESPA_MAVEN_TARGET ?= deploy +else + export VESPA_MAVEN_TARGET ?= install +endif + +.DEFAULT_GOAL := pr + +main: build-rpms cpp-test quick-start-guide publish-container publish-artifacts +pr: build-rpms cpp-test basic-search-test + +check: + @shellcheck $(TOP)/*.sh + +prepare: check + @$(TOP)/execute.sh $@ + +go: prepare + @$(TOP)/execute.sh $@ + +bootstrap: prepare + @$(TOP)/execute.sh $@ + +bootstrap-cmake: bootstrap + @$(TOP)/execute.sh $@ + +java: bootstrap + @$(TOP)/execute.sh $@ + +cpp: bootstrap-cmake + @$(TOP)/execute.sh $@ + +cpp-test: cpp + @$(TOP)/execute.sh $@ + +install: cpp java + @$(TOP)/execute.sh $@ + +build-rpms: install go + @$(TOP)/execute.sh $@ + +basic-search-test: build-rpms + @$(TOP)/execute.sh $@ + +build-container: build-rpms + @$(TOP)/execute.sh $@ + +quick-start-guide: build-container + @$(TOP)/execute.sh $@ + +publish-container: build-container + @$(TOP)/execute.sh $@ + +publish-artifacts: java build-rpms + @$(TOP)/execute.sh $@ + +.PHONY: \ + main \ + pr \ + prepare \ + go \ + bootstrap \ + bootstrap-cmake \ + java \ + cpp \ + cpp-test \ + install \ + build-rpms \ + basic-search-test \ + build-container \ + quick-start-guide \ + publish-container \ + publish-artifacts \ + check |