Skip to content

Commit 808632c

Browse files
committed
drm crossbuild skips building twice
1 parent fa58b35 commit 808632c

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,21 @@ jobs:
5151
path: ./node_modules
5252
key: modules-${{ hashFiles('package-lock.json') }}
5353
- name: Build for arm
54-
run: docker run --platform linux/arm --rm -v "${PWD}:/work" -w /work node ./tools/crossbuild.sh
54+
run: docker run --platform linux/arm --rm -v "${PWD}:/work" -w /work node ./tools/crossbuild.sh
55+
build-linux-arm-drm:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: checkout
59+
uses: actions/checkout@v2
60+
with:
61+
fetch-depth: 0
62+
- name: Set up QEMU
63+
uses: docker/setup-qemu-action@v2
64+
- name: Cache Node Dependencies
65+
id: cache
66+
uses: actions/cache@v2
67+
with:
68+
path: ./node_modules
69+
key: modules-${{ hashFiles('package-lock.json') }}
70+
- name: Build for arm
71+
run: docker run --platform linux/arm --rm -v "${PWD}:/work" -w /work node ./tools/crossbuild-drm.sh

tools/crossbuild-drm.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55

66
apt-get update
77
apt-get install -y xorg-dev libglu1-mesa-dev cmake
8-
npm ci
8+
# npm ci
9+
# rm -r build
910
npm run compile-drm

tools/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function main () {
5757
console.error(e.message)
5858
}
5959

60-
if (process.arch == 'arm' || process.arch == 'arm64') {
60+
if (process.arch === 'arm' || process.arch === 'arm64') {
6161
targetPath = path.join(__dirname, '..', 'build', 'Release', 'node-raylib-drm.node')
6262
url = `https://github.com/RobLoach/node-raylib/releases/download/v${process.env.npm_package_version}/node-raylib-${process.platform}-${process.arch}-drm.node`
6363
try {

0 commit comments

Comments
 (0)