Skip to content

Commit

Permalink
Bump opencv to 4.8.1
Browse files Browse the repository at this point in the history
* Bump opencv to 4.8.1
* Change ubuntu-18.04 to ubuntu-22.04 due to depreciation
* Change macos-10.15 to macos-11 due to depreciation
  • Loading branch information
thomedw authored Nov 27, 2023
1 parent 13ea0a2 commit 0b072aa
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
build_linux_arm:
strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-22.04]
java: [8]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-18.04-arm
name: ubuntu-22.04-arm
path: |
artifacts/bin/opencv-${{ env.OPENCV_VERSION_SHORT }}.jar
artifacts/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so
Expand All @@ -127,7 +127,7 @@ jobs:
build_linux_arm64:
strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-22.04]
java: [15]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-18.04-arm64
name: ubuntu-22.04-arm64
path: |
artifacts/bin/opencv-${{ env.OPENCV_VERSION_SHORT }}.jar
artifacts/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so
Expand All @@ -235,7 +235,7 @@ jobs:
build_mac_linux_x64:
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
os: [ubuntu-22.04, macos-11]
java: [8]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:
build_windows:
strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-22.04]
java: [15]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -425,7 +425,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-22.04]
java: [8]

runs-on: ${{ matrix.os }}
Expand All @@ -450,12 +450,12 @@ jobs:

- name: Copy Binaries
run: |
cp macos-10.15/bin/opencv-${{ env.OPENCV_VERSION_SHORT }}.jar upstream
cp macos-10.15/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.dylib src/main/resources/nu/pattern/opencv/osx/x86_64
cp macos-11/bin/opencv-${{ env.OPENCV_VERSION_SHORT }}.jar upstream
cp macos-11/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.dylib src/main/resources/nu/pattern/opencv/osx/x86_64
cp macos-aarch64/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.dylib src/main/resources/nu/pattern/opencv/osx/ARMv8
cp ubuntu-18.04/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/x86_64
cp ubuntu-18.04-arm/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv7
cp ubuntu-18.04-arm64/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv8
cp ubuntu-22.04/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/x86_64
cp ubuntu-22.04-arm/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv7
cp ubuntu-22.04-arm64/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv8
cp windows-2016/x86/opencv_java${{ env.OPENCV_VERSION_SHORT }}.dll src/main/resources/nu/pattern/opencv/windows/x86_32
cp windows-2016/x64/opencv_java${{ env.OPENCV_VERSION_SHORT }}.dll src/main/resources/nu/pattern/opencv/windows/x86_64
Expand All @@ -479,7 +479,7 @@ jobs:
needs: build_dist
strategy:
matrix:
os: [macos-10.15, windows-2019, ubuntu-20.04, ubuntu-18.04]
os: [macos-11, windows-2019, ubuntu-20.04, ubuntu-22.04]
java: [8, 9, 10, 11, 12, 13, 14, 15]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -519,7 +519,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-22.04]
java: [8]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -549,12 +549,12 @@ jobs:

- name: Copy Binaries
run: |
cp macos-10.15/bin/opencv-${{ env.OPENCV_VERSION_SHORT }}.jar upstream
cp macos-10.15/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.dylib src/main/resources/nu/pattern/opencv/osx/x86_64
cp macos-11/bin/opencv-${{ env.OPENCV_VERSION_SHORT }}.jar upstream
cp macos-11/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.dylib src/main/resources/nu/pattern/opencv/osx/x86_64
cp macos-aarch64/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.dylib src/main/resources/nu/pattern/opencv/osx/ARMv8
cp ubuntu-18.04/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/x86_64
cp ubuntu-18.04-arm/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv7
cp ubuntu-18.04-arm64/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv8
cp ubuntu-22.04/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/x86_64
cp ubuntu-22.04-arm/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv7
cp ubuntu-22.04-arm64/lib/libopencv_java${{ env.OPENCV_VERSION_SHORT }}.so src/main/resources/nu/pattern/opencv/linux/ARMv8
cp windows-2016/x86/opencv_java${{ env.OPENCV_VERSION_SHORT }}.dll src/main/resources/nu/pattern/opencv/windows/x86_32
cp windows-2016/x64/opencv_java${{ env.OPENCV_VERSION_SHORT }}.dll src/main/resources/nu/pattern/opencv/windows/x86_64
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<packaging>bundle</packaging>
<groupId>org.openpnp</groupId>
<artifactId>opencv</artifactId>
<version>4.7.0-0</version>
<version>4.8.1-0</version>
<name>OpenPnP OpenCV</name>
<description>OpenCV packaged with native libraries and loader for multiple platforms.</description>
<url>http://github.com/openpnp/opencv</url>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/nu/pattern/OpenCV.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,13 @@ private static Path extractNativeBinary(final OS os, final Arch arch) {
case LINUX:
switch (arch) {
case X86_64:
location = "/nu/pattern/opencv/linux/x86_64/libopencv_java470.so";
location = "/nu/pattern/opencv/linux/x86_64/libopencv_java481.so";
break;
case ARMv7:
location = "/nu/pattern/opencv/linux/ARMv7/libopencv_java470.so";
location = "/nu/pattern/opencv/linux/ARMv7/libopencv_java481.so";
break;
case ARMv8:
location = "/nu/pattern/opencv/linux/ARMv8/libopencv_java470.so";
location = "/nu/pattern/opencv/linux/ARMv8/libopencv_java481.so";
break;
default:
throw new UnsupportedPlatformException(os, arch);
Expand All @@ -375,10 +375,10 @@ private static Path extractNativeBinary(final OS os, final Arch arch) {
case OSX:
switch (arch) {
case X86_64:
location = "/nu/pattern/opencv/osx/x86_64/libopencv_java470.dylib";
location = "/nu/pattern/opencv/osx/x86_64/libopencv_java481.dylib";
break;
case ARMv8:
location = "/nu/pattern/opencv/osx/ARMv8/libopencv_java470.dylib";
location = "/nu/pattern/opencv/osx/ARMv8/libopencv_java481.dylib";
break;
default:
throw new UnsupportedPlatformException(os, arch);
Expand All @@ -387,10 +387,10 @@ private static Path extractNativeBinary(final OS os, final Arch arch) {
case WINDOWS:
switch (arch) {
case X86_32:
location = "/nu/pattern/opencv/windows/x86_32/opencv_java470.dll";
location = "/nu/pattern/opencv/windows/x86_32/opencv_java481.dll";
break;
case X86_64:
location = "/nu/pattern/opencv/windows/x86_64/opencv_java470.dll";
location = "/nu/pattern/opencv/windows/x86_64/opencv_java481.dll";
break;
default:
throw new UnsupportedPlatformException(os, arch);
Expand Down

0 comments on commit 0b072aa

Please sign in to comment.