Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d2ea252
Pin OpenVINO preset to 2025.4.1 build 20426
barrypitman Apr 15, 2026
f72dab5
Add OpenVINO sample and upload CI build artifacts
barrypitman Apr 15, 2026
fc85fe8
Fix OpenVINO artifact upload to collect jars from ~/.m2
barrypitman Apr 15, 2026
5041470
Preserve Maven snapshots for OpenVINO artifact upload
barrypitman Apr 15, 2026
c982e75
Revert OpenVINO artifact-capture workflow changes
barrypitman Apr 15, 2026
be6bb12
Refactor OpenVINO installation to use archive extraction instead of p…
barrypitman Apr 19, 2026
3d9ed84
fix build - URL was missing the platform segment.
barrypitman Apr 19, 2026
16f3a71
address comments
barrypitman Apr 20, 2026
2fe85f3
use javacpp maven plugin to configure paths instead of modifying tree…
barrypitman Apr 20, 2026
b30e3a5
use --strip-components=1 to simplify paths, and add inherit = OpenCL.…
barrypitman Apr 21, 2026
acee8be
fix build by configuring OpenCL
barrypitman Apr 21, 2026
740d07a
fix windows build
barrypitman Apr 21, 2026
345b829
Update OpenVINO preset to 2026.1.0
barrypitman May 14, 2026
6a93085
Support macosx-arm64
m1ngyuan May 14, 2026
3aaee7f
Merge pull request #4 from m1ngyuan/codex/openvino-support-macosx
barrypitman May 14, 2026
bef2f6d
Merge pull request #2 from barrypitman/codex/update-openvino-version-…
barrypitman May 14, 2026
8817d8a
Address OpenVINO platform review comments
barrypitman May 15, 2026
1e445ec
Merge pull request #5 from barrypitman/codex/review-and-address-pr-co…
barrypitman May 15, 2026
f290612
add missing <module>openvino</module> from parent pom for different …
barrypitman May 15, 2026
34e9097
Update CHANGELOG.md, add licensing, and fix nits
saudet May 15, 2026
8172977
Merge remote-tracking branch 'upstream/master' into codex/add-new-ope…
saudet May 15, 2026
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
32 changes: 32 additions & 0 deletions .github/workflows/openvino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: openvino
on:
push:
paths:
- openvino/**
- .github/workflows/openvino.yml
pull_request:
paths:
- openvino/**
- .github/workflows/openvino.yml
workflow_dispatch:
env:
CI_DEPLOY_MODULE: ${{ github.workflow }}
CI_DEPLOY_PLATFORM: ${{ github.job }}
CI_DEPLOY_SETTINGS: ${{ secrets.CI_DEPLOY_SETTINGS }}
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
STAGING_REPOSITORY: ${{ secrets.STAGING_REPOSITORY }}
jobs:
linux-x86_64:
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
windows-x86_64:
runs-on: windows-2022
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions
platform:
needs: [linux-x86_64, windows-x86_64]
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/redeploy@actions
17 changes: 17 additions & 0 deletions openvino/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OpenVINO

The [OpenVINO](https://github.com/openvinotoolkit/openvino) preset packages the OpenVINO Runtime C API and shared libraries.

Supported platforms:
- `linux-x86_64`
- `windows-x86_64`

The packaged runtime includes the CPU, GPU, and NPU plugin shared libraries from the official OpenVINO wheel distribution.

## Sample

A minimal sample is available under `openvino/samples/`:

```bash
mvn -f openvino/samples/pom.xml compile exec:java
```
115 changes: 115 additions & 0 deletions openvino/cppbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/bash
# This file is meant to be included by the parent cppbuild.sh script
if [[ -z "$PLATFORM" ]]; then
pushd ..
bash cppbuild.sh "$@" openvino
popd
exit
fi

OPENVINO_VERSION=2025.4.1
OPENVINO_BUILD=20426.82bbf0292c5
OPENVINO_PACKAGES_URL=https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}

mkdir -p "$PLATFORM"
cd "$PLATFORM"
INSTALL_PATH=`pwd`
mkdir -p include lib bin

archive_name=
archive_platform=
archive_dir_pattern="openvino_toolkit_*_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64"
runtime_lib_path=
runtime_bin_path=
tbb_lib_path=runtime/3rdparty/tbb/lib
tbb_bin_path=
tbb_lib_files=()
tbb_bin_files=()
soname_links=()

case $PLATFORM in
linux-x86_64)
archive_name=openvino_toolkit_ubuntu22_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.tgz
archive_platform=linux
runtime_lib_path=runtime/lib/intel64
tbb_lib_files=(libhwloc.so* libtbb.so* libtbbbind_2_5.so* libtbbmalloc.so* libtbbmalloc_proxy.so*)
soname_links=(libopenvino.so libopenvino_c.so libopenvino_ir_frontend.so)
;;
windows-x86_64)
archive_name=openvino_toolkit_windows_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.zip
archive_platform=windows
runtime_lib_path=runtime/lib/intel64/Release
runtime_bin_path=runtime/bin/intel64/Release
tbb_bin_path=runtime/3rdparty/tbb/bin
tbb_lib_files=(tbb12.lib tbbbind_2_5.lib tbbmalloc.lib tbbmalloc_proxy.lib)
tbb_bin_files=(tbb12.dll tbbbind_2_5.dll tbbmalloc.dll tbbmalloc_proxy.dll)
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
exit 1
;;
esac

find . -maxdepth 1 -type d -name "openvino_toolkit_*" -exec rm -rf {} \;
download "${OPENVINO_PACKAGES_URL}/${archive_platform}/${archive_name}" "${archive_name}"

case "$archive_name" in
*.tgz)
tar -xzf "$archive_name"
;;
*.zip)
unzip -q -o "$archive_name"
;;
*)
echo "Error: Unsupported archive \"$archive_name\""
exit 1
;;
esac

archive_dir=$(find . -maxdepth 1 -type d -name "${archive_dir_pattern}" | head -n 1)
if [[ -z "$archive_dir" ]]; then
echo "Error: OpenVINO archive contents not found in \"$archive_name\""
exit 1
fi

cp -a "$archive_dir/runtime/include/." include/
cp -a "$archive_dir/${runtime_lib_path}/." lib/

if [[ -n "$runtime_bin_path" ]]; then
cp -a "$archive_dir/${runtime_bin_path}/." bin/
fi

mkdir -p lib/tbb
cp -a "$archive_dir/${tbb_lib_path}/." lib/tbb/

if [[ -n "$tbb_bin_path" ]]; then
mkdir -p bin/tbb
cp -a "$archive_dir/${tbb_bin_path}/." bin/tbb/
fi

shopt -s nullglob
for file in "${tbb_lib_files[@]}"; do
for source_file in "$archive_dir"/${tbb_lib_path}/$file; do
cp -a "$source_file" lib/
done
done

for file in "${tbb_bin_files[@]}"; do
cp -a "$archive_dir/${tbb_bin_path}/$file" bin/
done
shopt -u nullglob

rm -rf "$archive_dir"

if [[ ${#soname_links[@]} -gt 0 ]]; then
pushd lib
for link_name in "${soname_links[@]}"; do
link_target=$(compgen -G "${link_name}.*" | head -n 1)
if [[ -n "$link_target" ]]; then
ln -sf "$(basename "$link_target")" "$link_name"
fi
done
popd
fi
Comment thread
barrypitman marked this conversation as resolved.
Outdated

cd ..
110 changes: 110 additions & 0 deletions openvino/platform/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-presets</artifactId>
<version>1.5.14-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>

<groupId>org.bytedeco</groupId>
<artifactId>openvino-platform</artifactId>
<version>2025.4.1-${project.parent.version}</version>
<name>JavaCPP Presets Platform for OpenVINO</name>

<properties>
<javacpp.moduleId>openvino</javacpp.moduleId>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.linux-x86_64}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.windows-x86_64}</classifier>
</dependency>
Comment thread
barrypitman marked this conversation as resolved.
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestEntries>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<id>empty-javadoc-jar</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
</configuration>
</execution>
<execution>
<id>empty-sources-jar</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>sources</classifier>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>add-module-infos</id>
<phase>none</phase>
</execution>
<execution>
<id>add-platform-module-info</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<modules>
<module>
<file>${project.build.directory}/${project.artifactId}.jar</file>
<moduleInfoSource>
module org.bytedeco.${javacpp.moduleId}.platform {
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64;
requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64;
}
</moduleInfoSource>
</module>
</modules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
73 changes: 73 additions & 0 deletions openvino/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-presets</artifactId>
<version>1.5.14-SNAPSHOT</version>
</parent>

<groupId>org.bytedeco</groupId>
<artifactId>openvino</artifactId>
<version>2025.4.1-${project.parent.version}</version>
Comment thread
barrypitman marked this conversation as resolved.
Outdated
<name>JavaCPP Presets for OpenVINO</name>

<dependencies>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencl</artifactId>
<version>3.0-${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>javacpp-${javacpp.platform}${javacpp.platform.extension}</id>
<phase>package</phase>
<configuration>
<excludes>
<exclude>org/bytedeco/openvino/${javacpp.platform}${javacpp.platform.extension}/*.exp</exclude>
<exclude>org/bytedeco/openvino/${javacpp.platform}${javacpp.platform.extension}/*.lib</exclude>
<exclude>org/bytedeco/openvino/${javacpp.platform}${javacpp.platform.extension}/*.obj</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
14 changes: 14 additions & 0 deletions openvino/samples/OpenVINOInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import org.bytedeco.javacpp.Loader;
import org.bytedeco.openvino.ov_core_t;

public class OpenVINOInfo {
public static void main(String[] args) {
String jniLibraryPath = Loader.load(org.bytedeco.openvino.global.openvino.class);
System.out.println("OpenVINO JavaCPP JNI library loaded from: " + jniLibraryPath);

ov_core_t core = new ov_core_t();
System.out.println("Allocated ov_core_t wrapper successfully: " + core);

System.out.println("OpenVINO preset load verification complete.");
}
}
30 changes: 30 additions & 0 deletions openvino/samples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.openvino</groupId>
<artifactId>openvino-sample</artifactId>
<version>1.5.14-SNAPSHOT</version>

<properties>
<exec.mainClass>OpenVINOInfo</exec.mainClass>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>

<dependencies>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>openvino</artifactId>
<version>2025.4.1-1.5.14-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>openvino</artifactId>
<version>2025.4.1-1.5.14-SNAPSHOT</version>
<classifier>linux-x86_64</classifier>
</dependency>
Comment thread
barrypitman marked this conversation as resolved.
</dependencies>

<build>
<sourceDirectory>.</sourceDirectory>
</build>
</project>
Loading