Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 3b2acde

Browse files
authored
add prebuild support to generate native modules (#13)
* add scripts and dependencies to prebuild * add scripts and dependencies to prebuild-install * add simple docker container to enable 32-bit Linux builds * update CI builds to run and generate prebuild assets * no need to build against all these platforms * nor this platform * add upload script * oops, order of scripts was wrong * wireup upload script * fix the JS * update dependencies * update electron prebuild targets to drop unsupported versions
1 parent e8313b4 commit 3b2acde

File tree

7 files changed

+1846
-61
lines changed

7 files changed

+1846
-61
lines changed

.npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/build
2+
/docker
3+
/script
24
/test
35
*.log
46
*~

.travis.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@ sudo: false
1313
language: node_js
1414

1515
node_js:
16-
- "8"
17-
- "10"
18-
- "11"
1916
- "12"
2017

18+
services:
19+
- docker
20+
2121
env:
2222
- CC=clang CXX=clang++ npm_config_clang=1
2323

24-
script: npm test
24+
script:
25+
- npm test
26+
- npm run prebuild-node
27+
- npm run prebuild-electron
28+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t node-fs-admin/i386 docker/i386 && docker run --rm -v ${PWD}:/project node-fs-admin/i386 /bin/bash -c "cd /project && npm run prebuild-node-ia32 && npm run prebuild-electron-ia32"; fi
29+
- if [[ -n "$TRAVIS_TAG" ]]; then npm run upload; fi
2530

2631
branches:
2732
only:

appveyor.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ image: Visual Studio 2015
22

33
environment:
44
matrix:
5-
- nodejs_version: "8"
6-
- nodejs_version: "10"
7-
- nodejs_version: "11"
85
- nodejs_version: "12"
96

107
platform:
11-
- x86
128
- x64
139

1410
install:
1511
# https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs
1612
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:PLATFORM
1713
- npm install
1814

19-
test_script:
20-
- node --version
21-
- npm --version
15+
build_script:
2216
- npm test
17+
- npm run prebuild-node
18+
- npm run prebuild-node-ia32
19+
- npm run prebuild-electron
20+
- npm run prebuild-electron-ia32
21+
- if defined APPVEYOR_REPO_TAG_NAME (npm run upload)
2322

24-
build: off
23+
test: off
24+
deploy: off
2525

2626
branches:
2727
only:

docker/i386/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM i386/debian:stretch
2+
3+
RUN apt-get update
4+
RUN apt-get install --quiet --yes \
5+
build-essential \
6+
curl \
7+
pkg-config \
8+
clang \
9+
python \
10+
libsecret-1-dev
11+
12+
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
13+
RUN apt-get install -y nodejs
14+
15+
ENV CC clang
16+
ENV CXX clang++
17+
ENV npm_config_clang 1

0 commit comments

Comments
 (0)