@@ -2,39 +2,40 @@ name: Java JDBC
2
2
on :
3
3
push :
4
4
pull_request :
5
- workflow_call :
6
5
workflow_dispatch :
7
- repository_dispatch :
8
-
6
+ inputs :
7
+ skip_tests :
8
+ description : ' Skip test runs'
9
+ required : false
10
+ default : ' false'
11
+ type : ' string'
9
12
env :
10
- GH_TOKEN : ${{ secrets.GH_TOKEN }}
11
- OVERRIDE_GIT_DESCRIBE : ${{ inputs.override_git_describe }}
13
+ AWS_ACCESS_KEY_ID : ${{ secrets.S3_DUCKDB_STAGING_ID }}
14
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.S3_DUCKDB_STAGING_KEY }}
12
15
13
16
jobs :
14
- format_check :
17
+ format-check :
18
+ name : Format Check
15
19
runs-on : ubuntu-latest
16
-
17
20
steps :
18
21
- uses : actions/checkout@v4
19
22
with :
20
23
fetch-depth : 0
21
- ref : ${{ inputs.git_ref }}
22
-
23
24
- run : |
24
25
python3 -m pip install --user clang_format==11.0.1
25
26
make format-check
26
27
27
28
java-linux-amd64 :
28
29
name : Java Linux (amd64)
29
30
runs-on : ubuntu-latest
31
+ needs : format-check
30
32
env :
31
33
MANYLINUX_IMAGE : quay.io/pypa/manylinux_2_28_x86_64
32
34
MANYLINUX_PACKAGES : java-1.8.0-openjdk-devel ninja-build
33
35
steps :
34
36
- uses : actions/checkout@v4
35
37
with :
36
38
fetch-depth : 0
37
- ref : ${{ inputs.git_ref }}
38
39
39
40
- name : Build
40
41
shell : bash
@@ -59,12 +60,10 @@ jobs:
59
60
60
61
- name : Deploy
61
62
shell : bash
62
- env :
63
- AWS_ACCESS_KEY_ID : ${{ secrets.S3_DUCKDB_STAGING_ID }}
64
- AWS_SECRET_ACCESS_KEY : ${{ secrets.S3_DUCKDB_STAGING_KEY }}
65
63
run : |
66
64
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-amd64.jar
67
65
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-amd64.jar
66
+
68
67
- uses : actions/upload-artifact@v4
69
68
with :
70
69
name : java-linux-amd64
82
81
- uses : actions/checkout@v4
83
82
with :
84
83
fetch-depth : 0
85
- ref : ${{ inputs.git_ref }}
86
84
87
85
- name : Build
88
86
shell : bash
@@ -107,12 +105,9 @@ jobs:
107
105
108
106
- name : Deploy
109
107
shell : bash
110
- env :
111
- AWS_ACCESS_KEY_ID : ${{ secrets.S3_DUCKDB_STAGING_ID }}
112
- AWS_SECRET_ACCESS_KEY : ${{ secrets.S3_DUCKDB_STAGING_KEY }}
113
108
run : |
114
109
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-aarch64.jar
115
- # ./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-aarch64.jar
110
+ ./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-aarch64.jar
116
111
117
112
- uses : actions/upload-artifact@v4
118
113
with :
@@ -130,39 +125,34 @@ jobs:
130
125
with :
131
126
fetch-depth : 0
132
127
ref : ${{ inputs.git_ref }}
128
+
133
129
- uses : actions/setup-python@v5
134
130
with :
135
131
python-version : " 3.12"
136
- - name : Setup Ccache
137
- uses : hendrikmuhs/ccache-action@main
138
- with :
139
- key : ${{ github.job }}
140
- save : ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-java' }}
141
132
142
133
- name : Build
143
134
shell : bash
144
135
run : make release
136
+
145
137
- name : Java Tests
146
138
if : ${{ inputs.skip_tests != 'true' }}
147
139
shell : bash
148
140
run : |
149
141
ls -R .
150
142
make test
143
+
151
144
- name : Deploy
152
145
shell : bash
153
- env :
154
- AWS_ACCESS_KEY_ID : ${{ secrets.S3_DUCKDB_STAGING_ID }}
155
- AWS_SECRET_ACCESS_KEY : ${{ secrets.S3_DUCKDB_STAGING_KEY }}
156
146
run : |
157
147
cp build/release/duckdb_jdbc.jar duckdb_jdbc-windows-amd64.jar
158
148
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-windows-amd64.jar
149
+
159
150
- uses : actions/upload-artifact@v4
160
151
with :
161
152
name : java-windows-amd64
162
153
path : |
163
154
build/release/duckdb_jdbc.jar
164
155
165
-
166
156
java-osx-universal :
167
157
name : Java OSX (Universal)
168
158
runs-on : macos-14
@@ -171,33 +161,30 @@ jobs:
171
161
- uses : actions/checkout@v4
172
162
with :
173
163
fetch-depth : 0
174
- ref : ${{ inputs.git_ref }}
164
+
175
165
- uses : actions/setup-python@v5
176
166
with :
177
167
python-version : " 3.12"
178
- - name : Setup Ccache
179
- uses : hendrikmuhs/ccache-action@main
180
- with :
181
- key : ${{ github.job }}
182
- save : ${{ github.ref == 'refs/heads/main' }}
168
+
183
169
- name : Build
184
170
shell : bash
185
171
run : make release
172
+
186
173
- name : Java Tests
187
174
if : ${{ inputs.skip_tests != 'true' }}
188
175
shell : bash
189
176
run : make test
177
+
190
178
- name : See if this actually universal
191
179
shell : bash
192
180
run : lipo -archs build/release/libduckdb_java.so_osx_universal | grep "x86_64 arm64"
181
+
193
182
- name : Deploy
194
183
shell : bash
195
- env :
196
- AWS_ACCESS_KEY_ID : ${{ secrets.S3_DUCKDB_STAGING_ID }}
197
- AWS_SECRET_ACCESS_KEY : ${{ secrets.S3_DUCKDB_STAGING_KEY }}
198
184
run : |
199
185
cp build/release/duckdb_jdbc.jar duckdb_jdbc-osx-universal.jar
200
186
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-osx-universal.jar
187
+
201
188
- uses : actions/upload-artifact@v4
202
189
with :
203
190
name : java-osx-universal
@@ -219,7 +206,6 @@ jobs:
219
206
- uses : actions/checkout@v4
220
207
with :
221
208
fetch-depth : 0
222
- ref : ${{ inputs.git_ref }}
223
209
224
210
- shell : bash
225
211
run : mkdir jdbc-artifacts
@@ -315,7 +301,7 @@ jobs:
315
301
316
302
java-merge-vendoring-pr :
317
303
name : Merge vendoring PR
318
- if : ${{ github.repository == 'duckdb/duckdb-java' && github.event_name == 'pull_request' && github.head_ref == format( 'vendoring-{0}', github.ref_name ) }}
304
+ if : ${{ github.repository == 'duckdb/duckdb-java' && github.event_name == 'pull_request' && startsWith( github.head_ref, 'vendoring-' ) }}
319
305
needs :
320
306
- java-linux-aarch64
321
307
- java-linux-amd64
@@ -332,7 +318,7 @@ jobs:
332
318
env :
333
319
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
334
320
run : |
335
- # echo "Merging PR number: ${{ github.event.pull_request.number }} with message: ${{ github.event.pull_request.title }}"
321
+ echo "Merging PR number: ${{ github.event.pull_request.number }} with message: ${{ github.event.pull_request.title }}"
336
322
gh pr merge vendoring-${{ github.ref_name }} \
337
323
--rebase \
338
324
--subject "${{ github.event.pull_request.title }}" \
@@ -348,3 +334,27 @@ jobs:
348
334
git pull --ff-only
349
335
git branch vendoring-${{ github.ref_name }}
350
336
git push origin vendoring-${{ github.ref_name }}
337
+
338
+ java-merge-vendoring-pr-debug :
339
+ name : Merge vendoring PR Debug
340
+ runs-on : ubuntu-latest
341
+ steps :
342
+ - uses : actions/checkout@v4
343
+ with :
344
+ fetch-depth : 0
345
+
346
+ - name : Merge vendoring PR Debug
347
+ id : merge_vendoring_pr_debug
348
+ env :
349
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
350
+ run : |
351
+ echo "github.repository: ${{ github.repository }}"
352
+ echo "github.event_name: ${{ github.event_name }}"
353
+ echo "github.head_ref: ${{ github.head_ref }}"
354
+ echo "github.base_ref: ${{ github.base_ref }}"
355
+ echo "github.ref_name: ${{ github.ref_name }}"
356
+ echo "format('vendoring-{0}', github.ref_name): ${{ format('vendoring-{0}', github.ref_name) }}"
357
+ echo "format('vendoring-{0}', github.base_ref): ${{ format('vendoring-{0}', github.base_ref) }}"
358
+ echo "startsWith(github.head_ref, 'workflows_minor_'): ${{ startsWith(github.head_ref, 'vendoring-') }}"
359
+ echo "github.event.pull_request.number: ${{ github.event.pull_request.number }}"
360
+ echo "github.event.pull_request.title: ${{ github.event.pull_request.title }}"
0 commit comments