-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (74 loc) · 2.55 KB
/
mavenpublish.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Maven Package
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Install prerequisites
run:
sudo
DEBIAN_FRONTEND=noninteractive
apt-get -y --no-install-recommends install
siege
- uses: actions/checkout@v2
- name: Checkout utils
uses: actions/checkout@v2
with:
repository: CRaC/utils
path: utils
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- run: mvn -s settings.xml -B package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test on Vanila JDK
run: |
P=$(utils/start-bg.sh \
-s "Started Application" \
java -jar target/spring-boot-0.0.1-SNAPSHOT.jar)
curl -X POST -H "Content-Type: text/plain" -d "$(<example.xml)" localhost:8080/transform | grep "My Article"
utils/bench.sh -H "Content-type: text/plain" "http://localhost:8080/transform POST < example.xml"
kill $P
- name: Download JDK
run: |
utils/download-jdk.sh
sudo tar -axf jdk14-crac.tar.gz
- name: Prepare warm checkpoint
run: |
P=$(utils/start-bg.sh \
-s "Started Application" \
-e exitcode \
jdk14-crac/bin/java \
-XX:CRaCCheckpointTo=cr \
-XX:+UnlockDiagnosticVMOptions \
-XX:+CRTraceStartupTime \
-Djdk.crac.trace-startup-time=true \
-jar target/spring-boot-0.0.1-SNAPSHOT.jar)
# warmup the service
utils/bench.sh -H "Content-type: text/plain" "http://localhost:8080/transform POST < example.xml"
jcmd $P JDK.checkpoint
[ 137 = $(utils/read-exitcode.sh exitcode) ]
- name: Test on C/RaC
run: |
P=$(utils/start-bg.sh \
-s "restore-finish" \
jdk14-crac/bin/java -XX:CRaCRestoreFrom=cr)
curl -X POST -H "Content-Type: text/plain" -d "$(<example.xml)" localhost:8080/transform | grep "My Article"
utils/bench.sh -H "Content-type: text/plain" "http://localhost:8080/transform POST < example.xml"
kill $P
- name: Test C/RaC startup time
run:
timeout 3 bash -c "jdk14-crac/lib/javatime ; jdk14-crac/bin/java -XX:CRaCRestoreFrom=cr"
| utils/sel.awk -v from=prestart -v to=restore-finish