-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
62 lines (47 loc) · 1.88 KB
/
Makefile
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
55
56
57
58
59
60
61
62
UNAME_OVERRIDE ?= `uname`
BUILD_PARALLELISM ?= `nproc`
BUILDDIR ?= build/$(UNAME_OVERRIDE)
CUR_DIR ?= $(shell pwd)
test:
cd $(BUILDDIR) && make -j$(BUILD_PARALLELISM)
cd $(BUILDDIR) && make test CTEST_OUTPUT_ON_FAILURE=1
build:
cd $(BUILDDIR) && make -j$(BUILD_PARALLELISM)
setup: BUILD_FLAVOUR ?= conan
setup:
mkdir -p $(BUILDDIR)
/bin/echo -n "$(BUILD_FLAVOUR)" > $(BUILDDIR)/flavour
(test -x ./buildfiles/$(BUILD_FLAVOUR)/bootstrap && ./buildfiles/$(BUILD_FLAVOUR)/bootstrap $(BUILDDIR) $(CUR_DIR)) || true
init:
cd $(BUILDDIR) && cmake $(EXTRA_CMAKE_ARGS) $(CUR_DIR)
clean:
cd $(BUILDDIR) && make clean
integration-tests:
python3.8 -mpytest -s tests/performance_tester/integration-tests.py
./tests/acceptance/run.sh
DOCKER_IMAGE ?= amqpprox
DOCKER_BUILDDIR ?= build/docker-$(DOCKER_IMAGE)
DOCKER_ARGS ?= $(DOCKER_EXTRA_ARGS) -v $(CUR_DIR):/source -v $(CUR_DIR)/$(DOCKER_BUILDDIR):/build -it $(DOCKER_IMAGE)
DOCKER_RUN ?= docker run $(DOCKER_ARGS)
docker-setup: BUILD_FLAVOUR ?= conan
docker-setup: BUILD_DOCKERFILE ?= buildfiles/$(BUILD_FLAVOUR)/Dockerfile
docker-setup:
mkdir -p $(DOCKER_BUILDDIR)
docker build --target amqpprox_build_environment -t $(DOCKER_IMAGE) -f $(BUILD_DOCKERFILE) .
$(DOCKER_RUN) bash -c 'make setup'
docker-init:
$(DOCKER_RUN) bash -c "EXTRA_CMAKE_ARGS=$(EXTRA_CMAKE_ARGS) make init"
docker-build:
$(DOCKER_RUN) bash -c 'make'
docker-clean:
$(DOCKER_RUN) bash -c 'make clean'
docker-shell:
docker run --privileged $(DOCKER_ARGS) bash
docker-integration-tests: BUILD_FLAVOUR ?= conan
docker-integration-tests: BUILD_DOCKERFILE ?= buildfiles/$(BUILD_FLAVOUR)/integration.Dockerfile
docker-integration-tests:
docker build -t $(DOCKER_IMAGE) -f $(BUILD_DOCKERFILE) .
docker run $(DOCKER_IMAGE) make integration-tests
docs:
doxygen Doxygen.config
.PHONY: test build setup init all clean docker-setup docker-init docker-build docker-shell docker-integration-tests docs