Skip to content

Commit

Permalink
Fix iOS framework in GitHub CI (#6)
Browse files Browse the repository at this point in the history
* Remove slash to fix copying path on iOS

* Bump to v0.1.7

* Fix again

* Test only iOS downloading on GitHub Actions

* Fix mkdir path

* Stop using matrix

* Revert comments in download script
  • Loading branch information
asus4 authored Jan 16, 2024
1 parent e1ed2f8 commit 96e8e52
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 25 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ on:
types: [created]
workflow_dispatch:
jobs:
publish:
strategy:
matrix:
publish-packages: [
com.github.asus4.onnxruntime,
com.github.asus4.onnxruntime.unity,
com.github.asus4.onnxruntime.linux-x64-gpu,
com.github.asus4.onnxruntime.win-x64-gpu
]
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -24,6 +16,18 @@ jobs:
- run: ./download-binaries.sh v1.16.3
# Publish all packages in matrix
- run: npm publish
working-directory: ${{ matrix.publish-packages }}
working-directory: com.github.asus4.onnxruntime
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
working-directory: com.github.asus4.onnxruntime.unity
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
working-directory: com.github.asus4.onnxruntime.linux-x64-gpu
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
working-directory: com.github.asus4.onnxruntime.win-x64-gpu
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ Pre-built libraries are available on [NPM](https://www.npmjs.com/package/com.git
]
"dependencies": {
// Core library
"com.github.asus4.onnxruntime": "0.1.6",
"com.github.asus4.onnxruntime": "0.1.8",
// (Optional) Utilities for Unity
"com.github.asus4.onnxruntime.unity": "0.1.6",
"com.github.asus4.onnxruntime.unity": "0.1.8",
// (Optional) GPU provider extensions for Windows/Linux (each 300mb+)
// CPU for Windows/Linux is included in core library
"com.github.asus4.onnxruntime.win-x64-gpu": "0.1.6",
"com.github.asus4.onnxruntime.linux-x64-gpu": "0.1.6",
"com.github.asus4.onnxruntime.win-x64-gpu": "0.1.8",
"com.github.asus4.onnxruntime.linux-x64-gpu": "0.1.8",
... other dependencies
}
```
Expand Down
4 changes: 2 additions & 2 deletions com.github.asus4.onnxruntime-extensions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.asus4.onnxruntime-extensions",
"version": "0.1.6",
"version": "0.1.8",
"displayName": "ONNX Runtime Extensions",
"description": "ONNX Runtime Extensions for Unity",
"keywords": [
Expand All @@ -10,7 +10,7 @@
"unity": "2022.3",
"unityRelease": "0f1",
"dependencies": {
"com.github.asus4.onnxruntime": "0.1.6"
"com.github.asus4.onnxruntime": "0.1.8"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions com.github.asus4.onnxruntime.linux-x64-gpu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.asus4.onnxruntime.linux-x64-gpu",
"version": "0.1.6",
"version": "0.1.8",
"displayName": "ONNX Runtime - Linux x64 GPU",
"description": "ONNX Runtime for Unity - Linux x64 GPU Provider",
"keywords": [
Expand All @@ -10,7 +10,7 @@
"unity": "2022.3",
"unityRelease": "0f1",
"dependencies": {
"com.github.asus4.onnxruntime": "0.1.6"
"com.github.asus4.onnxruntime": "0.1.8"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions com.github.asus4.onnxruntime.unity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.asus4.onnxruntime.unity",
"version": "0.1.6",
"version": "0.1.8",
"displayName": "ONNX Runtime Unity Utilities",
"description": "ONNX Runtime Utilities for Unity",
"keywords": [
Expand All @@ -10,7 +10,7 @@
"unity": "2022.3",
"unityRelease": "0f1",
"dependencies": {
"com.github.asus4.onnxruntime": "0.1.6"
"com.github.asus4.onnxruntime": "0.1.8"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions com.github.asus4.onnxruntime.win-x64-gpu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.asus4.onnxruntime.win-x64-gpu",
"version": "0.1.6",
"version": "0.1.8",
"displayName": "ONNX Runtime - Windows x64 GPU",
"description": "ONNX Runtime for Unity - Windows x64 GPU Provider",
"keywords": [
Expand All @@ -10,7 +10,7 @@
"unity": "2022.3",
"unityRelease": "0f1",
"dependencies": {
"com.github.asus4.onnxruntime": "0.1.6"
"com.github.asus4.onnxruntime": "0.1.8"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion com.github.asus4.onnxruntime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.asus4.onnxruntime",
"version": "0.1.6",
"version": "0.1.8",
"displayName": "ONNX Runtime",
"description": "ONNX Runtime Plugin for Unity",
"keywords": [
Expand Down
5 changes: 3 additions & 2 deletions download-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ cp $TMP_DIR/onnxruntime-linux-x64-gpu-$TAG/lib/libonnxruntime_providers_*.so $PR

# iOS
download_package pod-archive-onnxruntime-c-$TAG.zip https://onnxruntimepackages.z14.web.core.windows.net
mkdir -p $PLUGINS_CORE_DIR/iOS~/onnxruntime.xcframework
cp -R $TMP_DIR/onnxruntime.xcframework $PLUGINS_CORE_DIR/iOS~/onnxruntime.xcframework
mkdir -p $PLUGINS_CORE_DIR/iOS~/onnxruntime.xcframework/
cp -R $TMP_DIR/onnxruntime.xcframework/* $PLUGINS_CORE_DIR/iOS~/onnxruntime.xcframework/
ls $PLUGINS_CORE_DIR/iOS~/onnxruntime.xcframework/

# Android
curl -L https://repo1.maven.org/maven2/com/microsoft/onnxruntime/onnxruntime-android/$TAG/onnxruntime-android-$TAG.aar -o $PLUGINS_CORE_DIR/Android/onnxruntime-android.aar
Expand Down

0 comments on commit 96e8e52

Please sign in to comment.