Skip to content

Initial Object Detection Support #21

Initial Object Detection Support

Initial Object Detection Support #21

Workflow file for this run

name: Build JNI
on:
push:
branches: [ "main" ]
tags:
- 'v*'
pull_request:
branches: [ "main" ]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
build:
runs-on: ubuntu-24.04-arm
needs: [validation]
strategy:
fail-fast: false
matrix:
include:
- build-type: Release
publish-type: ""
extra-cmake-args: ""
jar-name: "Release"
- build-type: Debug
publish-type: "debug"
extra-cmake-args: ""
jar-name: "Debug"
- build-type: Debug
publish-type: "debugwithasan"
extra-cmake-args: "-DENABLE_ASAN=ON"
jar-name: "DebugWithAsan"
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
# - name: Fetch tags
# run: git fetch --tags --force
# - run: git describe --tags
- name: Install Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential default-jdk openjdk-17-jdk pkg-config git libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev python3 python3-dev python3-pip python3-setuptools python3-venv sccache
- name: Install HailoRT
env:
SCCACHE_GHA_ENABLED: "true"
run: |
cd hailort
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../hailort_binaries -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
sudo cmake --build build --target install
- name: Build native code
env:
SCCACHE_GHA_ENABLED: "true"
run: |
cmake -B cmake_build -S . -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_INSTALL_PREFIX=cmake_build -DOPENCV_ARCH=linuxarm64 ${{ matrix.extra-cmake-args }} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
sudo cmake --build cmake_build --target install -- -j 4
- run: |
./gradlew build ${{ (startsWith(github.event_name, 'push') && 'publish') || '' }} -PArchOverride=linuxarm64 -PPublishType=${{ matrix.publish-type }} -x check
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
- uses: actions/upload-artifact@v4
with:
name: libhailo-${{ matrix.jar-name }}
path: cmake_build/*.so
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: 'Dev'
rm: true
files: |
cmake_build/*.so
if: github.event_name == 'push' && (startsWith(matrix.build-type, 'Release'))
- uses: softprops/action-gh-release@v1
with:
files: |
cmake_build/*.so
if: startsWith(github.ref, 'refs/tags/v') && (startsWith(matrix.build-type, 'Release'))
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}