-
Notifications
You must be signed in to change notification settings - Fork 6
164 lines (140 loc) · 4.91 KB
/
Copy pathci.yml
File metadata and controls
164 lines (140 loc) · 4.91 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 5 * * 1'
permissions:
contents: read
jobs:
architecture-and-documentation-guards:
name: Architecture and Documentation Guards
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Temurin JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Run guards
run: |
./mvnw -B -ntp clean \
"-Dtest=EnginePdfBoundaryTest,CanonicalTemplateComposerPdfBoundaryTest,PdfRenderInterfaceGuardTest,PdfRenderingSystemECSDispatchTest,DocumentationCoverageTest,DocumentationExamplesTest,CanonicalSurfaceGuardTest,TemplateComposeApiTest" \
test
build-and-test:
name: Build and run tests
if: github.event_name != 'schedule'
needs: architecture-and-documentation-guards
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Temurin JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Build and run tests
run: ./mvnw -B -ntp clean verify
- name: Generate Javadoc
run: ./mvnw -B -ntp javadoc:javadoc
perf-smoke:
name: Performance Smoke Check
if: github.event_name == 'pull_request'
needs: architecture-and-documentation-guards
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Temurin JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Run coarse performance smoke benchmark
run: |
./mvnw -B -ntp -DskipTests test-compile \
"org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \
"-Dexec.mainClass=com.demcha.compose.CurrentSpeedBenchmark" \
"-Dexec.classpathScope=test" \
"-Dgraphcompose.benchmark.profile=smoke"
- name: Upload smoke benchmark artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-smoke-${{ github.run_id }}
path: target/benchmarks/current-speed/**
if-no-files-found: ignore
benchmark-diff:
name: Weekly Benchmark Diff
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Temurin JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Restore benchmark history cache
uses: actions/cache@v4
with:
path: target/benchmarks/current-speed
key: benchmark-current-speed-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
benchmark-current-speed-${{ github.ref_name }}-
benchmark-current-speed-
- name: Run full benchmark suite
run: |
./mvnw -B -ntp -DskipTests test-compile \
"org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \
"-Dexec.mainClass=com.demcha.compose.CurrentSpeedBenchmark" \
"-Dexec.classpathScope=test" \
"-Dgraphcompose.benchmark.profile=full" \
"-Dgraphcompose.benchmark.enforceGate=false"
- name: Count available benchmark runs
id: benchmark-runs
run: |
count=0
if [ -d target/benchmarks/current-speed ]; then
count=$(find target/benchmarks/current-speed -maxdepth 1 -name 'run-*.json' | wc -l | tr -d ' ')
fi
echo "count=$count" >> "$GITHUB_OUTPUT"
- name: Diff newest benchmark reports
if: steps.benchmark-runs.outputs.count != '0' && steps.benchmark-runs.outputs.count != '1'
run: |
./mvnw -B -ntp -DskipTests test-compile \
"org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \
"-Dexec.mainClass=com.demcha.compose.BenchmarkDiffTool" \
"-Dexec.classpathScope=test" \
"-Dexec.args=current-speed"
- name: Upload benchmark artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-full-${{ github.run_id }}
path: |
target/benchmarks/current-speed/**
target/benchmarks/diffs/current-speed/**
if-no-files-found: ignore