Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/composite-actions/linux-tests-host/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ runs:
using: "composite"
steps:
- name: Setup JDK 26
uses: actions/setup-java@v5
uses: actions/setup-java@v6
with:
distribution: 'corretto'
java-version: '26'
java-version: '27'

- name: Tests Host
shell: bash
Expand Down
132 changes: 79 additions & 53 deletions .github/workflows/Java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,31 @@ on:
required: false
default: ''
type: 'string'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ (github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/v')) || github.run_id }}
cancel-in-progress: true

jobs:

format-check:
name: Format Check
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'vendoring-')) }}
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-slim' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- run: |
python ./scripts/retry.py --timeout 1m -- \
python -m pip install --user clang_format==11.0.1
python -m pip install --user --break-system-packages clang_format==11.0.1
export PATH=~/.local/bin:$PATH
which clang-format
clang-format --version
make format-check

java-linux-amd64:
name: Linux (amd64)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: format-check
env:
MANYLINUX_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
Expand Down Expand Up @@ -109,7 +115,7 @@ jobs:

java-linux-amd64-tck:
name: Linux TCK (amd64)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: java-linux-amd64
env:
MANYLINUX_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
Expand Down Expand Up @@ -171,7 +177,7 @@ jobs:

java-linux-amd64-graal:
name: Linux Graal (amd64)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: java-linux-amd64
env:
MANYLINUX_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
Expand Down Expand Up @@ -215,7 +221,7 @@ jobs:

java-linux-amd64-spark:
name: Linux Spark (amd64)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: java-linux-amd64
env:
MANYLINUX_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
Expand All @@ -235,6 +241,7 @@ jobs:
MINIO_DATA: ${{ github.workspace }}/sparktest/minio_data
MINIO_HOST: 127.0.0.1
MINIO_PORT: 9000

steps:
- uses: actions/checkout@v7
with:
Expand All @@ -254,6 +261,12 @@ jobs:
path: ${{ github.workspace }}/ccache
key: ${{ steps.cache_key.outputs.value }}

- name: Setup JDK
uses: actions/setup-java@v6
with:
distribution: corretto
java-version: '17'

- name: Build
if: ${{ inputs.skip_tests != 'true' }}
uses: ./.github/composite-actions/linux-build-docker
Expand All @@ -268,15 +281,20 @@ jobs:
cmake ..

- name: Setup Postgres
if: ${{ inputs.skip_tests != 'true' }}
uses: ikalnytskyi/action-setup-postgres@v7
with:
postgres-version: '17'
username: ${{ env.POSTGRES_USERNAME }}
password: ${{ env.POSTGRES_PASSWORD }}
database: ${{ env.POSTGRES_MAINTENANCE_DB }}
port: ${{ env.POSTGRES_PORT }}
ssl: true
run: |
docker run -d \
--name postgres \
-p 5432:${{ env.POSTGRES_PORT }} \
-e POSTGRES_USER=${{ env.POSTGRES_USERNAME }} \
-e POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} \
-e POSTGRES_DB=${{ env.POSTGRES_MAINTENANCE_DB }} \
ghcr.io/infrastructure-as-code/postgres:18-alpine
python ./scripts/retry.py --retries 0 --timeout 1m -- \
bash -lc '
until docker exec postgres pg_isready -U ${{ env.POSTGRES_USERNAME }} -d ${{ env.POSTGRES_MAINTENANCE_DB }}; do
sleep 2
done
'

- name: Setup Minio
if: ${{ inputs.skip_tests != 'true' }}
Expand Down Expand Up @@ -318,7 +336,7 @@ jobs:

java-linux-amd64-asan:
name: Linux ASan (amd64)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: java-linux-amd64
env:
GEN: ninja
Expand All @@ -333,8 +351,8 @@ jobs:

- name: Dependencies
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate
sudo dpkg-reconfigure man-db
echo "set man-db/auto-update false" | sudo debconf-communicate || true
sudo dpkg-reconfigure man-db || true
python ./scripts/retry.py --timeout 2m -- \
sudo apt-get update -y -q -o=Dpkg::Use-Pty=0
python ./scripts/retry.py --timeout 2m -- \
Expand Down Expand Up @@ -417,7 +435,7 @@ jobs:

java-linux-amd64-jepsen:
name: Linux Jepsen (amd64)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: java-linux-amd64
env:
MANYLINUX_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
Expand Down Expand Up @@ -453,8 +471,8 @@ jobs:

- name: Install Dependencies
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate
sudo dpkg-reconfigure man-db
echo "set man-db/auto-update false" | sudo debconf-communicate || true
sudo dpkg-reconfigure man-db || true
python ./scripts/retry.py --timeout 1m -- \
sudo apt-get update -y -q -o=Dpkg::Use-Pty=0
python ./scripts/retry.py --timeout 1m -- \
Expand All @@ -463,13 +481,11 @@ jobs:
graphviz \
leiningen

- name: Setup Default Java
run: |
echo "JAVA_HOME=${JAVA_HOME_21_X64}" >> $GITHUB_ENV
echo "${JAVA_HOME_21_X64}/bin" >> $GITHUB_PATH
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac
/usr/bin/java --version
- name: Setup JDK
uses: actions/setup-java@v6
with:
distribution: corretto
java-version: '21'

- name: Check JDK version
run: |
Expand Down Expand Up @@ -522,7 +538,7 @@ jobs:

java-linux-aarch64:
name: Linux (aarch64)
runs-on: ubuntu-24.04-arm
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-arm64' || 'ubuntu-24.04-arm' }}
needs: java-linux-amd64
env:
MANYLINUX_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
Expand Down Expand Up @@ -581,7 +597,7 @@ jobs:

java-linux-amd64-musl:
name: Linux (amd64-musl)
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
needs: java-linux-amd64
env:
ALPINE_IMAGE: alpine:3.22
Expand Down Expand Up @@ -636,7 +652,7 @@ jobs:

java-linux-aarch64-musl:
name: Linux (aarch64-musl)
runs-on: ubuntu-24.04-arm
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-arm64' || 'ubuntu-24.04-arm' }}
needs: java-linux-amd64
env:
ALPINE_IMAGE: alpine:3.22
Expand Down Expand Up @@ -691,7 +707,7 @@ jobs:

java-windows-amd64:
name: Windows (amd64)
runs-on: windows-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-windows-x64' || 'windows-latest' }}
needs: java-linux-amd64
env:
CC: 'ccache cl'
Expand All @@ -711,6 +727,12 @@ jobs:
ccache \
-y --force --no-progress

- name: Setup JDK
uses: actions/setup-java@v6
with:
distribution: corretto
java-version: '8'

- name: Cache Key
id: cache_key
shell: bash
Expand All @@ -728,13 +750,13 @@ jobs:
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir build
cd build
mkdir release
cd release
cmake ../.. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cmake --build . --config Release --parallel

- name: Save Cache
uses: actions/cache/save@v6
Expand All @@ -745,7 +767,7 @@ jobs:
- name: List Symbols
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
dumpbin.exe /imports build\release\libduckdb_java.so_windows_amd64
dumpbin.exe /exports build\release\libduckdb_java.so_windows_amd64

Expand All @@ -764,7 +786,7 @@ jobs:

java-windows-aarch64:
name: Windows (aarch64)
runs-on: windows-11-arm
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-windows-x64' || 'windows-latest' }}
needs: java-linux-amd64
env:
CC: 'ccache cl'
Expand All @@ -776,10 +798,6 @@ jobs:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Dependencies
shell: bash
run: |
Expand All @@ -788,6 +806,12 @@ jobs:
ccache \
-y --force --no-progress

- name: Setup JDK
uses: actions/setup-java@v6
with:
distribution: corretto
java-version: '8'

- name: Cache Key
id: cache_key
shell: bash
Expand All @@ -805,13 +829,13 @@ jobs:
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
mkdir build
cd build
mkdir release
cd release
cmake ../.. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cmake ../.. -G Ninja -DCMAKE_BUILD_TYPE=Release -DOVERRIDE_JDBC_OS_ARCH=arm64
cmake --build . --config Release --parallel

- name: Save Cache
uses: actions/cache/save@v6
Expand All @@ -822,12 +846,12 @@ jobs:
- name: List Symbols
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
dumpbin.exe /imports build\release\libduckdb_java.so_windows_arm64
dumpbin.exe /exports build\release\libduckdb_java.so_windows_arm64

- name: Java Tests
if: ${{ inputs.skip_tests != 'true' }}
if: ${{ false && inputs.skip_tests != 'true' }}
shell: bash
run: |
java -version
Expand All @@ -841,7 +865,7 @@ jobs:

java-osx-universal:
name: macOS (Universal)
runs-on: macos-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-macos-arm64' || 'macos-latest' }}
needs: java-linux-amd64
env:
GEN: ninja
Expand All @@ -853,10 +877,6 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Cache Key
id: cache_key
run: |
Expand All @@ -877,6 +897,12 @@ jobs:
ccache \
ninja

- name: Setup JDK
uses: actions/setup-java@v6
with:
distribution: corretto
java-version: '8'

- name: Build
shell: bash
run: make release
Expand Down Expand Up @@ -913,7 +939,7 @@ jobs:
maven-deploy:
if: ${{ github.repository == 'duckdb/duckdb-java' && startsWith(github.ref, 'refs/tags/') }}
name: Maven Deploy
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-slim' || 'ubuntu-latest' }}
needs:
- java-linux-amd64
- java-linux-amd64-tck
Expand Down Expand Up @@ -994,7 +1020,7 @@ jobs:
maven-snapshot-deploy:
if: ${{ github.repository == 'duckdb/duckdb-java' && (github.ref == 'refs/heads/v2.0-cyanoptera' || github.ref == 'refs/heads/vendoring-v2.0-cyanoptera') && github.event_name == 'workflow_dispatch' }}
name: Maven S3 Deploy
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-slim' || 'ubuntu-latest' }}
needs:
- java-linux-amd64
- java-linux-amd64-tck
Expand Down Expand Up @@ -1082,7 +1108,7 @@ jobs:
- java-windows-amd64
- java-windows-aarch64
- java-osx-universal
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-slim' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Vendor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
vendor:
name: "Update Vendored Sources"
if: ${{ github.repository == 'duckdb/duckdb-java' }}
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-slim' || 'ubuntu-latest' }}
permissions:
actions: write
contents: write
Expand Down
Loading