Skip to content

Commit

Permalink
try without mkdirp
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Jan 26, 2024
1 parent dc5a6ed commit 56bd4f0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/nodejs-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ jobs:
strategy:
fail-fast: false
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]
include:
- machine: rpi2
num_test_iterations: 20
init_performance_threshold_sec: 1.0
proc_performance_threshold_sec: 1.0
- machine: rpi3-32
num_test_iterations: 50
init_performance_threshold_sec: 1.0
Expand All @@ -87,10 +83,6 @@ jobs:
num_test_iterations: 50
init_performance_threshold_sec: 1.0
proc_performance_threshold_sec: 1.0
- machine: beaglebone
num_test_iterations: 10
init_performance_threshold_sec: 1.0
proc_performance_threshold_sec: 1.0

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]

steps:
- uses: actions/checkout@v3
Expand Down
13 changes: 11 additions & 2 deletions binding/nodejs/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@
//
'use strict';

const { mkdirp } = require('mkdirp');
const fs = require('fs');
const ncp = require('ncp').ncp;

const createDirectory = dir => {
try {
fs.mkdirSync(dir, { recursive: true });
console.log(`Directory '${dir}' created.`);
} catch (err) {
console.error(`Error creating directory '${dir}':`, err);
}
};

console.log('Copying library files...');

// Library & Model
mkdirp.sync('./lib/common');
createDirectory('./lib');

ncp('../../lib/node', './lib', function (err) {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion demo/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"license": "Apache-2.0",
"dependencies": {
"@picovoice/cobra-node": "file:../../binding/nodejs",
"@picovoice/pvrecorder-node": "^1.2.1",
"@picovoice/pvrecorder-node": "~1.2.1",
"commander": "^6.1.0",
"readline": "^1.3.0",
"wavefile": "^11.0.0"
Expand Down

0 comments on commit 56bd4f0

Please sign in to comment.