Skip to content

Commit cdc5b59

Browse files
committed
test building with drm in CI
1 parent f5d4d2e commit cdc5b59

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,21 @@ jobs:
3535
run: npm run compile
3636
- name: Test
3737
run: npm test
38+
build-linux-arm:
39+
runs-on: ubuntu-latest
40+
needs: create_release
41+
steps:
42+
- name: checkout
43+
uses: actions/checkout@v2
44+
with:
45+
fetch-depth: 0
46+
- name: Set up QEMU
47+
uses: docker/setup-qemu-action@v2
48+
- name: Cache Node Dependencies
49+
id: cache
50+
uses: actions/cache@v2
51+
with:
52+
path: ./node_modules
53+
key: modules-${{ hashFiles('package-lock.json') }}
54+
- name: Build for arm
55+
run: docker run --platform linux/arm --rm -v "${PWD}:/work" -w /work node ./tools/crossbuild.sh

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"clean": "rm -rf build",
1515
"precompile": "npm i --no-save node-addon-api cmake-js",
1616
"compile": "cmake-js compile",
17+
"precompile-drm": "npm i --no-save node-addon-api cmake-js",
18+
"compile-drm": "cmake-js compile --CDPLATFORM=DRM",
1719
"prepkg": "npm run build",
1820
"pkg": "node tools/pkg.js",
1921
"gen:code": "node tools/generate.js",

tools/crossbuild.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
apt-get update
77
apt-get install -y xorg-dev libglu1-mesa-dev cmake
88
npm ci
9-
npm run compile
9+
npm run compile
10+
npm run compile-drm

0 commit comments

Comments
 (0)