Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Node.js CI
permissions:
contents: read

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# Test against multiple Node.js versions
node-version: [20.x, 22.x, 24.x]
arch: [x64]
include:
- os: ubuntu-latest
arch: arm64
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.arch }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
architecture: ${{ matrix.arch }}
- name: Install dependencies
run: npm install
working-directory: js/quick-start_onnxruntime-node

- name: Run the example
run: node .
working-directory: js/quick-start_onnxruntime-node
2 changes: 1 addition & 1 deletion js/api-usage_inference-session/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"description": "This example is a demonstration of basic usage of InferenceSession.",
"main": "index.js",
"dependencies": {
"onnxruntime-node": "^1.15.1"
"onnxruntime-node": "^1.23.0"
}
}
2 changes: 1 addition & 1 deletion js/api-usage_tensor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "1.0.0",
"description": "This example is a demonstration of basic usage of Tensor.",
"dependencies": {
"onnxruntime-node": "^1.15.1"
"onnxruntime-node": "^1.23.0"
}
}
2 changes: 1 addition & 1 deletion js/quick-start_onnxruntime-node-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "webpack --config ./webpack.config.js --mode development"
},
"dependencies": {
"onnxruntime-node": "^1.15.1"
"onnxruntime-node": "^1.23.0"
},
"devDependencies": {
"copy-webpack-plugin": "^8.1.1",
Expand Down
1 change: 1 addition & 0 deletions js/quick-start_onnxruntime-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function main() {
const dataC = results.c.data;
console.log(`data of result tensor 'c': ${dataC}`);

await session.release()
} catch (e) {
console.error(`failed to inference ONNX model: ${e}.`);
}
Expand Down
2 changes: 1 addition & 1 deletion js/quick-start_onnxruntime-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"description": "This example is a demonstration of basic usage of ONNX Runtime Node.js binding.",
"main": "index.js",
"dependencies": {
"onnxruntime-node": "^1.15.1"
"onnxruntime-node": "^1.23.0"
}
}
Loading