Skip to content

Commit 2d2b38f

Browse files
committed
Add Windows ARM64 builds
This PR adds Windows `aarch64` builds to CI. These builds are similar to Windows `x86_64` builds with the following notes: 1. Java 21 (the lowest version available on `windows-11-arm` GH runner) is used to compile the Java part of JDBC, so it is the lowest version the driver can be loaded with 2. `aarch64` binaries are not included into the main "universal" JAR, instead the `windows_aarch64` Maven classifier need to be used to fetch it: ```xml <dependency> <groupId>org.duckdb</groupId> <artifactId>duckdb_jdbc</artifactId> <version>1.4.1.0</version> <classifier>windows_aarch64</classifier> </dependency> ``` 3. DuckDB extensions for Windows `aarch64` are not available at the moment, so some of the tests (e.g. Spatial ones) are failing.
1 parent d2de050 commit 2d2b38f

File tree

4 files changed

+59
-6
lines changed

4 files changed

+59
-6
lines changed

.github/workflows/Java.yml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ jobs:
343343
run: |
344344
nm -gU ./build/release/libduckdb_java.so_linux_arm64
345345
346-
# Test runs are failing because of linux_arm64_musl extensions missing
346+
# Test runs are failing because linux_arm64_musl extensions are missing
347347
- name: JDBC Tests
348348
shell: bash
349349
if: ${{ inputs.skip_tests != 'true' }}
@@ -395,7 +395,7 @@ jobs:
395395
if: ${{ inputs.skip_tests != 'true' }}
396396
shell: bash
397397
run: |
398-
ls -R .
398+
java -version
399399
make test
400400
401401
- name: Deploy
@@ -410,6 +410,50 @@ jobs:
410410
path: |
411411
build/release/duckdb_jdbc.jar
412412
413+
java-windows-aarch64:
414+
name: Java Windows (aarch64)
415+
runs-on: windows-11-arm
416+
needs: java-linux-amd64
417+
steps:
418+
- uses: actions/checkout@v4
419+
with:
420+
fetch-depth: 0
421+
ref: ${{ inputs.git_ref }}
422+
423+
- uses: actions/setup-python@v5
424+
with:
425+
python-version: "3.12"
426+
427+
- name: Build
428+
shell: bash
429+
run: make release
430+
431+
- name: List Symbols
432+
shell: cmd
433+
run: |
434+
call "c:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
435+
dumpbin.exe /exports build\release\Release\libduckdb_java.so_windows_arm64
436+
437+
# Test runs are failing because windows_arm64 extensions are missing
438+
- name: Java Tests
439+
if: ${{ inputs.skip_tests != 'true' }}
440+
shell: bash
441+
run: |
442+
java -version
443+
make test || true
444+
445+
- name: Deploy
446+
shell: bash
447+
run: |
448+
cp build/release/duckdb_jdbc.jar duckdb_jdbc-windows-aarch64.jar
449+
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-windows-aarch64.jar
450+
451+
- uses: actions/upload-artifact@v4
452+
with:
453+
name: java-windows-aarch64
454+
path: |
455+
build/release/duckdb_jdbc.jar
456+
413457
java-osx-universal:
414458
name: Java OSX (Universal)
415459
runs-on: macos-14
@@ -461,6 +505,7 @@ jobs:
461505
- java-linux-amd64-musl
462506
- java-linux-aarch64-musl
463507
- java-windows-amd64
508+
- java-windows-aarch64
464509
- java-osx-universal
465510

466511
steps:
@@ -496,6 +541,11 @@ jobs:
496541
name: java-windows-amd64
497542
path: jdbc-artifacts/java-windows-amd64
498543

544+
- uses: actions/download-artifact@v4
545+
with:
546+
name: java-windows-aarch64
547+
path: jdbc-artifacts/java-windows-aarch64
548+
499549
- uses: actions/download-artifact@v4
500550
with:
501551
name: java-osx-universal
@@ -530,6 +580,7 @@ jobs:
530580
- java-linux-amd64-musl
531581
- java-linux-aarch64-musl
532582
- java-windows-amd64
583+
- java-windows-aarch64
533584
- java-osx-universal
534585
runs-on: ubuntu-latest
535586
steps:

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ set(JEMALLOC_SRC_FILES
529529
set(OS_NAME "unknown")
530530
set(OS_ARCH "amd64")
531531

532-
string(REGEX MATCH "(arm64|aarch64)" IS_ARM "${CMAKE_SYSTEM_PROCESSOR}")
532+
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR_LOWER)
533+
string(REGEX MATCH "(arm64|aarch64)" IS_ARM "${SYSTEM_PROCESSOR_LOWER}")
533534
if(IS_ARM)
534535
set(OS_ARCH "arm64")
535536
elseif(FORCE_32_BIT)

CMakeLists.txt.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ set(JEMALLOC_SRC_FILES
5555
set(OS_NAME "unknown")
5656
set(OS_ARCH "amd64")
5757

58-
string(REGEX MATCH "(arm64|aarch64)" IS_ARM "${CMAKE_SYSTEM_PROCESSOR}")
58+
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR_LOWER)
59+
string(REGEX MATCH "(arm64|aarch64)" IS_ARM "${SYSTEM_PROCESSOR_LOWER}")
5960
if(IS_ARM)
6061
set(OS_ARCH "arm64")
6162
elseif(FORCE_32_BIT)

scripts/jdbc_maven_deploy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def exec(cmd):
5959
jdbc_root_path = sys.argv[3]
6060

6161
combine_builds = ['linux-amd64', 'osx-universal', 'windows-amd64', 'linux-aarch64']
62-
arch_specific_builds = ['linux-amd64-musl', 'linux-aarch64-musl']
63-
arch_specific_classifiers = ['linux_amd64_musl', 'linux_aarch64_musl']
62+
arch_specific_builds = ['linux-amd64-musl', 'linux-aarch64-musl', 'windows-aarch64']
63+
arch_specific_classifiers = ['linux_amd64_musl', 'linux_aarch64_musl', 'windows_aarch64']
6464

6565
staging_dir = tempfile.mkdtemp()
6666

0 commit comments

Comments
 (0)