Skip to content

Commit

Permalink
Making it work with node v12 and electron 6
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoelg committed Sep 17, 2019
1 parent 81865ad commit 08c6307
Show file tree
Hide file tree
Showing 13 changed files with 667 additions and 497 deletions.
58 changes: 32 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
env:
matrix:
- export NODE_VERSION="6.9"
- export NODE_VERSION="5.9"
- export NODE_VERSION="4.4"
- export NODE_VERSION="0.10"
- export NODE_VERSION="0.10.48"
- export NODE_VERSION="0.12.18"
- export NODE_VERSION="4.9.1"
- export NODE_VERSION="5.9.1"
- export NODE_VERSION="6.17.1"
- export NODE_VERSION="8.16.1"
- export NODE_VERSION="10.16.0"
- export NODE_VERSION="11.15.0"
- export NODE_VERSION="12.10.0"
matrix:
fast_finish: true
allow_failures:
- env: NODE_VERSION="0.10"
- env: NODE_VERSION="iojs"
- env: export NODE_VERSION="0.10.48"
- env: export NODE_VERSION="0.12.18"

before_script:
- git config --global user.name "Ion Lupascu"
- git config --global user.email [email protected]

before_install:
- git clone https://github.com/creationix/nvm.git ./.nvm
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION 64
- echo $NODE_VERSION
- nvm use $NODE_VERSION
- nvm install 12 64
- nvm use 12
- npm -v
- node -v
- if [ $TRAVIS_OS_NAME == "linux" ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get -qq update;
Expand All @@ -23,34 +34,29 @@ before_install:
sudo apt-get install -qq debhelper autotools-dev cups-ppdc libcups2-dev cups imagemagick ghostscript;
fi
- "export JOBS=4"
- npm install -g node-gyp
- npm install -g node-gyp node-pre-gyp
- BUILD_ONLY=true npm install --build-from-source
before_script:
- git config --global user.name "Ion Lupascu"
- git config --global user.email [email protected]

after_script:
- node-pre-gyp configure
- node-pre-gyp build package

- node-pre-gyp configure
- node-pre-gyp build package --target_arch=ia32
- npm test
script:
- node-pre-gyp configure --target=$NODE_VERSION
- node-pre-gyp build package --target=$NODE_VERSION --target_arch=x64
- node-pre-gyp configure --target=$NODE_VERSION
- node-pre-gyp build package --target=$NODE_VERSION --target_arch=ia32

# Need S3 Upload for Artifacts
# addons:
# artifacts:
# debug: true
# paths:
# - ./build/stage/**/*.tar.gz
addons:
artifacts:
debug: true
paths:
- ./build/stage/**/*.tar.gz

git:
depth: 1

branches:
only:
- master

os:
- linux
- osx
script: npm test
12 changes: 0 additions & 12 deletions .vscode/settings.json

This file was deleted.

38 changes: 22 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ version: "{build}"

platform: x64

image: Visual Studio 2015
image: Visual Studio 2017

# Set a known clone folder
clone_folder: c:\projects\node-printer
clone_folder: c:\p

# fix lineendings in Windows
init:
Expand All @@ -20,35 +20,41 @@ init:
environment:
matrix:
# Node.js
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4.4"
- nodejs_version: "5.8"
- nodejs_version: "6.9"
- nodejs_version: "0.10.48"
- nodejs_version: "0.12.18"
- nodejs_version: "4.9.1"
- nodejs_version: "5.9.1"
- nodejs_version: "6.17.1"
- nodejs_version: "8.16.1"
- nodejs_version: "10.16.0"
- nodejs_version: "11.15.0"
- nodejs_version: "12.10.0"
build_electron: "true"

matrix:
fast_finish: true
allow_failures:
- nodejs_version: "0.10"
- nodejs_version: "0.10.48"
- nodejs_version: "0.12.18"

# Get the latest stable version of Node 0.STABLE.latest
install:
- ps: Install-Product node $env:nodejs_version x64
- ps: Install-Product node 12.6 x64
- cmd: SET PATH=c:\python27;%PATH%
- cmd: SET JOBS=4
- cmd: SET BUILD_ONLY=true
- npm install -g node-gyp node-pre-gyp
- npm install --build-from-source --msvs_version=2013
- cmd: npm install node-gyp node-pre-gyp
- cmd: echo 'Building for node version '
- cmd: echo %nodejs_version%
- cmd: node_modules\.bin\node-pre-gyp.cmd configure --target=%nodejs_version%
- cmd: node_modules\.bin\node-pre-gyp.cmd build package --target=%nodejs_version% --target_arch=x64
- cmd: node_modules\.bin\node-pre-gyp.cmd configure --target=%nodejs_version%
- cmd: node_modules\.bin\node-pre-gyp.cmd build package --target=%nodejs_version% --target_arch=ia32
- ps: ./tools/buildWindows.ps1

test_script:
- node --version
- npm --version
- npm test

after_test:
- node-gyp clean
- ps: ./tools/buildWindows.ps1

build: off

Expand Down
14 changes: 7 additions & 7 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
'variables': {
'module_name%': 'node_printer',
'module_path%': './lib/'
"variables": {
"module_name%": "node_printer",
"module_path%": "lib"
},
'targets': [
{
Expand All @@ -26,7 +26,7 @@
"<!(node -e \"require('nan')\")"
],
'cflags_cc+': [
"-Wno-cast-function-type"
"-Wno-deprecated-declarations"
],
'conditions': [
# common exclusions
Expand All @@ -51,9 +51,9 @@
#'-lcups -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lz -lpthread -lm -lcrypt -lz'
],
'link_settings': {
'libraries': [
'<!(cups-config --libs)'
]
'libraries': [
'<!(cups-config --libs)'
]
}
}]
]
Expand Down
Loading

0 comments on commit 08c6307

Please sign in to comment.