Skip to content

Commit

Permalink
Publish debug symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 authored and matthew morley committed Mar 10, 2024
1 parent c0836a6 commit f912f89
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:

strategy:
fail-fast: false
matrix:
include:
- build-type: Release
publish-type: ""
- build-type: Debug
publish-type: "debug"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand All @@ -36,25 +45,28 @@ jobs:
commands: |
apt-get update
apt-get install -y cmake build-essential default-jdk openjdk-17-jdk
cmake -B cmake_build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_build -DOPENCV_ARCH=linuxarm64
ls
find .
pwd
cmake -B cmake_build -S . -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_INSTALL_PREFIX=cmake_build -DOPENCV_ARCH=linuxarm64
cmake --build cmake_build --target install -- -j 4
- run: find .

- run: |
chmod +x gradlew
./gradlew build ${{ (startsWith(github.event_name, 'push') && 'publish') || '' }} -PArchOverride=linuxarm64 -x check
./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
name: librknn-jar-pi-${{matrix.build-type}}
path: ${{ github.workspace }}/build/libs/*.jar
- uses: actions/upload-artifact@v4
with:
name: librknn
name: librknn-${{ matrix.build-type }}
path: cmake_build/*.so

# Push to dev release on pushes to master
Expand All @@ -65,13 +77,13 @@ jobs:
rm: true
files: |
cmake_build/*.so
if: github.event_name == 'push'
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')
if: startsWith(github.ref, 'refs/tags/v') && (startsWith(matrix.build-type, 'Release'))
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 7 additions & 4 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ def nativeName = wpilibTools.platformMapper.currentPlatform.platformName;
def artifactGroupId = 'org.photonvision'
def baseArtifactId = "rknn_jni"

def jniType = project.findProperty("PublishType") ?: "";
println("Building with JNI publish type: " + jniType);

task nativeLibraryJar(type: Jar, dependsOn: copyNativeLibrary) {
archiveClassifier = nativeName
archiveClassifier = nativeName + jniType
from outputsFolder
}
build.dependsOn nativeLibraryJar
Expand All @@ -16,7 +19,7 @@ publishing {
url ('https://maven.photonvision.org/repository/' + (isDev ? 'snapshots' : 'internal'))
credentials {
username 'ghactions'
password System.getenv("ARTIFACTORY_API_KEY")
password 'kCPJugusxV5i8F'
}
}
}
Expand All @@ -32,7 +35,7 @@ publishing {
mavenJNI(MavenPublication) {
groupId = artifactGroupId
artifactId = "${baseArtifactId}-jni"
version = pubVersion;// + "-" + nativeName;
version = pubVersion;

artifact nativeLibraryJar
}
Expand All @@ -41,6 +44,6 @@ publishing {

tasks.withType(PublishToMavenRepository) {
doFirst {
println("Publishing mrcal-java to " + repository.url)
println("Publishing rknn-jni to " + repository.url)
}
}

0 comments on commit f912f89

Please sign in to comment.