forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
198 lines (191 loc) · 6.94 KB
/
ci-actions-incremental.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: Quarkus CI
on:
push:
branches-ignore:
- 'dependabot/**'
# paths-ignore in ci-fork-mvn-cache.yml should match
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- 'adr/**'
- 'jakarta/**'
- 'docs/src/main/asciidoc/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
- '.github/workflows/doc-build.yml'
- '.github/workflows/preview.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- 'adr/**'
- 'jakarta/**'
- 'docs/src/main/asciidoc/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
- '.github/workflows/doc-build.yml'
- '.github/workflows/preview.yml'
workflow_dispatch:
concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'quarkusio/quarkus' }}
env:
# Workaround testsuite locale issue
LANG: en_US.UTF-8
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end"
COMMON_TEST_MAVEN_ARGS: "-Dformat.skip -Denforcer.skip -DskipDocs -Dforbiddenapis.skip -DskipExtensionValidation -DskipCodestartValidation"
NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=6g -Dnative -Dnative.surefire.skip -Dno-descriptor-tests clean install -DskipDocs"
JVM_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.test.hang-detection-timeout=60"
PTS_MAVEN_ARGS: "-Ddevelocity.pts.enabled=${{ github.event_name == 'pull_request' && github.base_ref == 'main' && 'true' || 'false' }}"
DB_USER: hibernate_orm_test
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
defaults:
run:
shell: bash
jobs:
native-tests-stats-upload:
name: Upload build stats to collector
# if: ${{ always() && github.repository == 'quarkusio/quarkus' && endsWith(github.ref, '/main') && github.event_name != 'pull_request' && needs.native-tests.result != 'skipped' && needs.native-tests.result != 'cancelled' }}
# needs:
# - native-tests
# - calculate-test-jobs
strategy:
fail-fast: false
# matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.native_matrix) }}
runs-on: ubuntu-latest # ${{matrix.os-name}}
steps:
- uses: actions/checkout@v4
with:
repository: graalvm/mandrel
fetch-depth: 1
path: workflow-quarkus
# - uses: actions/download-artifact@v4
# with:
# name: build-stats #-${{matrix.category}}
# path: .
- name: Extract and import build stats
env:
UPLOAD_TOKEN: ${{ secrets.UPLOAD_COLLECTOR_TOKEN }}
COLLECTOR_URL: https://stage-collector.foci.life/api/v1/image-stats
TAG: quarkus-main-ci
shell: bash
run: |
cat > ./main-build-output-stats.json <<EOF
{
"resource_usage": {
"memory": {
"system_total": 16757346304,
"peak_rss_bytes": 5613408256
},
"garbage_collection": {
"count": 224,
"total_secs": 40.699,
"max_heap": 5726797824
},
"cpu": {
"load": 3.569375762635669,
"parallelism": 4,
"total_cores": 4
},
"total_secs": 248.266605981
},
"image_details": {
"code_area": {
"bytes": 66523840,
"compilation_units": 101882
},
"total_bytes": 149214488,
"image_heap": {
"bytes": 82255872,
"objects": {
"count": 685271
},
"resources": {
"bytes": 9014096,
"count": 419
}
}
},
"general_info": {
"c_compiler": "gcc (redhat, x86_64, 8.5.0)",
"name": "quarkus-integration-test-main-999-SNAPSHOT-runner",
"java_version": "21.0.2+13-LTS",
"garbage_collector": "Serial GC",
"graal_compiler": {
"march": "x86-64-v3",
"optimization_level": "2"
},
"vendor_version": "Mandrel-23.1.2.0-Final",
"graalvm_version": "Mandrel-23.1.2.0-Final"
},
"analysis_results": {
"types": {
"total": 34162,
"reflection": 9309,
"jni": 62,
"reachable": 30959
},
"methods": {
"foreign_downcalls": -1,
"total": 262751,
"reflection": 7955,
"jni": 55,
"reachable": 154089
},
"classes": {
"total": 34162,
"reflection": 9309,
"jni": 62,
"reachable": 30959
},
"fields": {
"total": 70806,
"reflection": 489,
"jni": 63,
"reachable": 45169
}
}
}
EOF
echo "Tag for stat upload is going to be: '${TAG}'"
for bs in $(find ./ -name \*build-output-stats.json); do
f=$(echo "$bs" | sed 's/\(.*\)-build-output-stats\.json/\1/g')
d=$(dirname $bs)
jq . $(pwd)/$bs
# import the stat
stat_id=$(curl -s -w '\n' -H "Content-Type: application/json" \
-H "token: $UPLOAD_TOKEN" --post302 --data "@$(pwd)/$bs" "$COLLECTOR_URL/import?t=$TAG" | jq .id)
echo "Imported stat id: $stat_id"
# Create runner info json
cat > ./runner-info.json <<EOF
{
"testVersion": "$GITHUB_REF_NAME",
"mandrelVersion": null,
"quarkusVersion": "@GITHUB_SHA",
"jdkVersion": "$(java -version)",
"operatingSystem": "$RUNNER_OS",
"architecture": "$RUNNER_ARCH",
"memorySizeBytes": "$(free -b | awk '/Mem:/{print $2}')",
"memorySizeAvailableBytes": "$(free -b | awk '/Mem:/{print $4}')",
"description": "Quarkus CI github runner on $GITHUB_REF_NAME branch/tag"
}
EOF
jq . runner-info.json
# Add runner info
curl -s -w '\n' -H "Content-Type: application/json" -H "token: $TOKEN" \
-X POST --data "@./runner-info.json" "$COLLECTOR_URL/update-runner-info/$stat_id"
done