-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (57 loc) · 1.8 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
63
64
65
66
67
68
69
# Runs the Junit tests on the JVM
test:
./mvnw clean test
.PHONY: test
# Builds the jar
jar:
./mvnw clean package
.PHONY: jar
# Runs the native tests locally, i.e. not within a docker container
testNative:
./mvnw -Pnative clean test
.PHONY: test
# Builds a native binary locally, i.e. not within a docker container
nativeLocal:
./mvnw clean package -Pnative
.PHONY: nativeLocal
# Builds a JVM docker image of the application
docker:
./mvnw package
docker build -f Dockerfiles/Dockerfile.jvm \
--build-arg JAR_FILE=target/benchmarks-0.0.1-SNAPSHOT.jar \
-t jibber:jdk \
.
.PHONY: docker
# Runs the JVM Docker container
runJDKContainer:
docker run --rm --name jibber-jdk -d -p 8080:8080 jibber:jdk
.PHONY: runJDKContainer
# Builds a docker container with the native binary in it. Builds the binary with docker, to
# work around the issue of building ocally on OSX and that obviously not being able to be run within a docker linux container
dockerNativeOSX:
docker build -f Dockerfiles/Dockerfile.native.osx \
-t jibber:native \
.
.PHONY: dockerNativeOSX
dockerNativeLinux:
docker build -f Dockerfiles/Dockerfile.native \
--build-arg APP_FILE=target/jibber \
-t jibber:native \
.
.PHONY: dockerNativeLinux
runNativeContainer:
docker run --rm --name jibber-native -d -p 8080:8080 jibber:native
.PHONY: runJDKContainer
# Runs the application
runWithJFR:
./jibber -XX:+FlightRecorder -XX:StartFlightRecording="filename=recording1.jfr,dumponexit=true" &
.PHONY: runWithJFR
visualvm:
jvisualvm &
.PHONY: visualvm
dockerNativeStaticOSX:
docker build --file Dockerfiles/Dockerfile.native.static.osx -t jibber:static .
.PHONY: dockerNativeStaticOSX
runNativeStaticContaner:
docker run --rm --name jibber-static -d -p 8080:8080 jibber:static
.PHONY: runNativeStaticContaner