Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
```
78 changes: 78 additions & 0 deletions openvino/cppbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/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

extract_openvino_archive() {
local archive_platform=$1
local archive_name=$2
local archive_dir

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
*.zip)
unzip -q -o "$archive_name"
;;
*.tar.gz|*.tgz)
tar -xzf "$archive_name"
;;
*)
echo "Error: Unsupported archive \"$archive_name\""
exit 1
;;
esac

archive_dir=$(find . -maxdepth 1 -type d -name "openvino_toolkit_*_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64" | 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/

case $PLATFORM in
linux-x86_64)
cp -a "$archive_dir/runtime/lib/intel64/." lib/
;;
windows-x86_64)
cp -a "$archive_dir/runtime/bin/intel64/Release/." bin/
cp -a "$archive_dir/runtime/lib/intel64/Release/." lib/
;;
esac

rm -rf "$archive_dir"
}

case $PLATFORM in
linux-x86_64)
extract_openvino_archive linux openvino_toolkit_ubuntu22_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.tgz
pushd lib
ln -sf $(ls libopenvino.so.* | head -n 1) libopenvino.so
ln -sf $(ls libopenvino_c.so.* | head -n 1) libopenvino_c.so
popd
;;
windows-x86_64)
extract_openvino_archive windows openvino_toolkit_windows_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.zip
Comment thread
barrypitman marked this conversation as resolved.
Outdated
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
exit 1
;;
esac

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>
68 changes: 68 additions & 0 deletions openvino/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?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>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>
35 changes: 35 additions & 0 deletions openvino/src/gen/java/org/bytedeco/openvino/encryption_func.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Targeted by JavaCPP version 1.5.14-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.openvino;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.bytedeco.javacpp.presets.javacpp.*;

import static org.bytedeco.openvino.global.openvino.*;


/**
* \brief encryption_func is a function pointer that encrypt or decrypt the input memory, example of this function is
* codec(const char* input, const size_t in_size, const char* output, size_t* out_size)
* This function needs to be called twice,
* the first call to obtain out_size (the size of output buffer), the second call to obtain output buffer.
* The first call output is nullptr, before the second call, the caller needs to apply for output
* memory based on the out_size returned by the first call.
* the memory of parameter output is allocated and released by the caller.
* @param input The pointer to the input buffer.
* @param in_size The size of input.
* @param output The pointer to the encrypted/decrypted buffer.
* @param out_size The size of output.
*/
@Properties(inherit = org.bytedeco.openvino.presets.openvino.class)
public class encryption_func extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public encryption_func(Pointer p) { super(p); }
protected encryption_func() { allocate(); }
private native void allocate();
public native void call(@Cast("const char*") BytePointer arg0, @Cast("const size_t") long arg1, @Cast("char*") BytePointer arg2, @Cast("size_t*") SizeTPointer arg3);
}
Loading