Skip to content

Commit 558caf5

Browse files
committed
dockerized builds
1 parent f294921 commit 558caf5

2 files changed

Lines changed: 38 additions & 76 deletions

File tree

.github/workflows/Java.yml

Lines changed: 34 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -24,101 +24,62 @@ jobs:
2424
python3 -m pip install --user clang_format==11.0.1
2525
make format-check
2626
27-
java-linux-amd64:
28-
name: Java Linux (amd64)
29-
runs-on: ubuntu-latest
30-
container:
31-
image: quay.io/pypa/manylinux_2_28_x86_64
32-
env:
33-
GEN: ninja
34-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
35-
steps:
36-
- uses: actions/checkout@v3
37-
with:
38-
fetch-depth: 0
39-
ref: ${{ inputs.git_ref }}
40-
41-
- uses: ./.github/actions/manylinux_2014_setup
42-
with:
43-
ninja-build: 1
44-
ccache: 1
45-
jdk: 1
46-
python_alias: 1
47-
aws-cli: 1
48-
49-
- name: Build
50-
shell: bash
51-
run: make release
52-
53-
- name: Java Tests
54-
shell: bash
55-
if: ${{ inputs.skip_tests != 'true' }}
56-
run: make test
27+
java-linux:
28+
strategy:
29+
matrix:
30+
config: [ { runner: ubuntu-latest, arch: amd64, image: x86_64 }, { runner: ubuntu-24.04-arm, arch: arm64, image: aarch64 } ]
5731

58-
- name: Deploy
59-
shell: bash
60-
env:
61-
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
62-
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
63-
run: |
64-
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-amd64.jar
65-
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-amd64.jar
66-
- uses: actions/upload-artifact@v3
67-
with:
68-
name: java-linux-amd64
69-
path: |
70-
build/release/duckdb_jdbc.jar
32+
name: Java Linux (${{ matrix.config.arch }})
33+
runs-on: ${{ matrix.config.runner }}
7134

72-
java-linux-aarch64:
73-
name: Java Linux (aarch64)
74-
runs-on: ubuntu-latest
75-
container:
76-
image: ubuntu:20.04
77-
needs: java-linux-amd64
78-
env:
79-
GEN: ninja
80-
DUCKDB_PLATFORM: linux_arm64
81-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
8235
steps:
83-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
8437
with:
8538
fetch-depth: 0
8639
ref: ${{ inputs.git_ref }}
8740

88-
- uses: ./.github/actions/ubuntu_18_setup
89-
with:
90-
ccache: 1
91-
aarch64_cross_compile: 1
92-
93-
- name: Install Stuff
94-
shell: bash
95-
run: >
96-
curl -L https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u345-b01/OpenJDK8U-jdk_x64_linux_hotspot_8u345b01.tar.gz | tar xvz
41+
# - uses: ./.github/actions/manylinux_2014_setup
42+
# with:
43+
# ninja-build: 1
44+
# ccache: 1
45+
# jdk: 1
46+
# python_alias: 1
47+
# aws-cli: 1
9748

9849
- name: Build
9950
shell: bash
100-
run: CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ OVERRIDE_JDBC_OS_ARCH=arm64 make release
51+
run: |
52+
export PWD=`pwd`
53+
docker run \
54+
-v$PWD:$PWD \
55+
-e CMAKE_BUILD_PARALLEL_LEVEL=2 \
56+
quay.io/pypa/manylinux2014_${{ matrix.config.image }} \
57+
bash -c "yum install -y java-1.8.0-openjdk-devel && git config --global --add safe.directory $PWD && make release -C $PWD"
58+
#
59+
# - name: Java Tests
60+
# shell: bash
61+
# if: ${{ inputs.skip_tests != 'true' }}
62+
# run: make test
10163

10264
- name: Deploy
10365
shell: bash
10466
env:
10567
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
10668
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
10769
run: |
108-
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-aarch64.jar
109-
# ./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-aarch64.jar
70+
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-${{ matrix.config.arch }}.jar
71+
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-${{ matrix.config.arch }}.jar
11072
111-
- uses: actions/upload-artifact@v3
73+
- uses: actions/upload-artifact@v4
11274
with:
113-
name: java-linux-aarch64
75+
name: java-linux-${{ matrix.config.arch }}
11476
path: |
11577
build/release/duckdb_jdbc.jar
11678
117-
11879
java-windows-amd64:
11980
name: Java Windows (amd64)
12081
runs-on: windows-2019
121-
needs: java-linux-amd64
82+
needs: java-linux
12283
steps:
12384
- uses: actions/checkout@v3
12485
with:
@@ -160,7 +121,7 @@ jobs:
160121
java-osx-universal:
161122
name: Java OSX (Universal)
162123
runs-on: macos-14
163-
needs: java-linux-amd64
124+
needs: java-linux
164125
steps:
165126
- uses: actions/checkout@v3
166127
with:
@@ -204,8 +165,7 @@ jobs:
204165
name: Java Combine
205166
runs-on: ubuntu-latest
206167
needs:
207-
- java-linux-aarch64
208-
- java-linux-amd64
168+
- java-linux
209169
- java-windows-amd64
210170
- java-osx-universal
211171

@@ -277,7 +237,7 @@ jobs:
277237
name: JDBC Compliance
278238
runs-on: ubuntu-20.04
279239
if: ${{ inputs.skip_tests != 'true' }}
280-
needs: java-linux-amd64
240+
needs: java-linux
281241
container: quay.io/pypa/manylinux_2_28_x86_64
282242
env:
283243
BUILD_JDBC: 1

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
cmake_minimum_required(VERSION 3.11.0)
2+
3+
project(DuckDBJava)
4+
15
find_package(Java 1.8)
26

37
set(JAVA_AWT_LIBRARY NotNeeded)
48
set(JAVA_JVM_LIBRARY NotNeeded)
59

610
find_package(JNI)
711

8-
cmake_minimum_required(VERSION 3.11.0)
912
set(CMAKE_CXX_STANDARD "11" CACHE STRING "C++ standard to enforce")
1013
set(CMAKE_VERBOSE_MAKEFILE OFF)
1114
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -15,7 +18,6 @@ if(NOT JNI_FOUND OR NOT Java_FOUND)
1518
endif()
1619

1720
include(UseJava)
18-
project(DuckDBJava)
1921

2022
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
2123

0 commit comments

Comments
 (0)