-
Notifications
You must be signed in to change notification settings - Fork 26
150 lines (128 loc) · 4.42 KB
/
Copy pathbuild.yml
File metadata and controls
150 lines (128 loc) · 4.42 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
name: Simple build and test
on:
push:
branches:
- main
pull_request:
branches:
- main
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' }}
defaults:
run:
shell: bash
jobs:
save-pr-info:
runs-on: ubuntu-latest
if: always() && (github.event_name == 'pull_request')
needs: jvm-build-test
steps:
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.pull_request.number }} > ./pr/number
echo ${{ github.event.pull_request.head.sha }} > ./pr/sha
- name: Upload PR metadata
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: pr-metadata
path: pr/
retention-days: 7
jvm-build-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- 17
- 21
- 25
module:
- docling-serve-api
- docling-serve-client
- docling-testcontainers
- docling-version-tests
name: jvm-build-test-${{ matrix.module }}-java${{ matrix.java }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Reclaim disk space
working-directory: .github
shell: bash
run: scripts/ci-reclaim-disk-space.sh
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: build-test-${{ matrix.module }}-java${{ matrix.java }}
run: |
./gradlew --no-daemon -Pjava.version=${{ matrix.java }} \
:${{ matrix.module }}:clean :${{ matrix.module }}:build
prepare-test-reports:
runs-on: ubuntu-latest
if: always() && (github.event_name == 'pull_request')
strategy:
fail-fast: false
matrix:
java:
- 17
- 21
- 25
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Reclaim disk space
working-directory: .github/scripts
shell: bash
run: ./ci-reclaim-disk-space.sh
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Create aggregated test report
run: ./gradlew --no-daemon -Pjava.version=${{ matrix.java }} :test-report-aggregation:check
- name: Prepare build reports
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: build-reports-java${{ matrix.java }}-${{ github.run_attempt }}
path: |
**/build/test-results/**/*.xml
test-report-aggregation/build/reports/tests/test/aggregated-results/**
test-report-aggregation/build/reports/jacoco/testCodeCoverageReport/**
retention-days: 7
docs:
runs-on: ubuntu-latest
name: build-docs-pr
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Reclaim disk space
working-directory: .github/scripts
shell: bash
run: ./ci-reclaim-disk-space.sh
- name: Setup Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.x'
- name: Setup Java 25
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 25
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Generate documentation
env:
IS_PR_BUILD: true
run: ./gradlew --console=plain clean :docs:build