-
Notifications
You must be signed in to change notification settings - Fork 451
95 lines (78 loc) · 2.45 KB
/
test-nodejs-addon-npm-aarch64.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: test-node-addon-npm-aarch64
on:
push:
branches:
- master
paths:
- '.github/workflows/test-nodejs-addon-npm-aarch64.yaml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'scripts/node-addon-api/**'
- 'scripts/node-addon-api/*.js'
- 'nodejs-addon-examples/package.json'
pull_request:
branches:
- master
paths:
- '.github/workflows/test-nodejs-addon-npm-aarch64.yaml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'scripts/node-addon-api/*.js'
- 'nodejs-addon-examples/package.json'
workflow_dispatch:
concurrency:
group: test-node-addon-npm-aarch64-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-node-addon-npm-aarch64:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Test sherpa-onnx
uses: addnab/docker-run-action@v3
with:
image: quay.io/pypa/manylinux2014_aarch64
options: |
--platform linux/arm64
--volume ${{ github.workspace }}/:/shared/
shell: bash
run: |
git config --global --add safe.directory /shared
echo $HOME
uname -a
cat /etc/*release
cmake --version
curl -sL https://rpm.nodesource.com/setup_16.x | bash -
yum install -y nodejs
node --version
cd /shared
d=nodejs-addon-examples
echo "dir: $d"
cd $d
npm install --verbose
git status
ls -lh
ls -lh node_modules
export DYLD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-darwin-x64:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-darwin-arm64:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-linux-x64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-linux-arm64:$LD_LIBRARY_PATH
cd ../
.github/scripts/test-nodejs-addon-npm.sh