forked from sqlanywhere/node-sqlanywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.9 KB
/
nodejs-arm64.yml
File metadata and controls
64 lines (53 loc) · 1.9 KB
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
name: Node.js CI - ARM64
on:
push:
branches: [ master, main ]
pull_request:
jobs:
build-arm64:
name: Build and Test on Node 22.x - Linux ARM64
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and Test on ARM64
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu22.04
# Docker options to improve QEMU compatibility
dockerRunArgs: |
--platform linux/arm64/v8
# Install dependencies in the container
install: |
apt-get update -q -y
apt-get install -q -y ca-certificates curl gnupg build-essential python3 git
# Install Node.js 22
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update -q -y
apt-get install -q -y nodejs
node --version
npm --version
# Run build and tests
run: |
echo "Running on ARM64 architecture"
node --version
npm --version
# Set environment variables to help with QEMU/node-gyp compatibility
export npm_config_jobs=1
export JOBS=1
echo "Installing dependencies..."
npm install
echo "Running tests..."
npm test
echo "Verifying native module..."
if [ -f "build/Release/sqlanywhere.node" ]; then
echo "✓ Native module built successfully"
ls -lh build/Release/sqlanywhere.node
file build/Release/sqlanywhere.node || true
else
echo "✗ Native module NOT found"
exit 1
fi