Skip to content

Build debug with asan #78

Build debug with asan

Build debug with asan #78

Workflow file for this run

name: Build rknn_java
on:
push:
branches: [ "main" ]
tags:
- 'v*'
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- build-type: Release
publish-type: ""
extra-cmake-args: ""
- build-type: Debug
publish-type: "debug"
extra-cmake-args: ""
- build-type: Debug with ASAN
publish-type: "debug"
extra-cmake-args: "-DENABLE_ASAN=ON"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- run: git describe --tags
- name: Install Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- uses: pguyot/arm-runner-action@v2
with:
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.30/ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5.img.xz
cpu: cortex-a7
image_additional_mb: 1500
bind_mount_repository: true
commands: |
apt-get update
apt-get install -y cmake build-essential default-jdk openjdk-17-jdk
ls
find .
pwd
cmake -B cmake_build -S . -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_INSTALL_PREFIX=cmake_build -DOPENCV_ARCH=linuxarm64 ${{ matrix.extra-cmake-args }}
cmake --build cmake_build --target install -- -j 4
- run: find .
- run: |
chmod +x gradlew
./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
name: Upload jar
with:
name: librknn-jar-pi-${{matrix.build-type}}
path: ${{ github.workspace }}/build/libs/*.jar
- uses: actions/upload-artifact@v4
with:
name: librknn-${{ matrix.build-type }}
path: cmake_build/*.so
# Push to dev release on pushes to master
- 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'))
# Push to actual release, if tagged
- 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 }}