Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
5e26a728
Commit
5e26a728
authored
Mar 21, 2017
by
tsufeki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add electron builds to travis.
parent
b39b56a9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
5 deletions
+63
-5
.travis.yml
.travis.yml
+7
-1
build-appveyor.bat
scripts/build-appveyor.bat
+0
-4
build_against_electron.sh
scripts/build_against_electron.sh
+49
-0
createdb-electron.js
test/support/createdb-electron.js
+7
-0
No files found.
.travis.yml
View file @
5e26a728
...
...
@@ -130,7 +130,13 @@ before_script:
fi
script
:
-
if [[ "${NODE_VERSION}" ]]; then ./scripts/build_against_node.sh; fi;
-
if [[ "${NODE_VERSION}" ]]; then
if [[ "${ELECTRON_VERSION}" ]]; then
./scripts/build_against_electron.sh;
else
./scripts/build_against_node.sh;
fi;
fi
-
if [[ "${NODE_VERSION}" -eq "4" ]]; then ./node_modules/.bin/eslint lib; fi;
# disabled for now: need to port to sudo:false
#- if [[ "${NODE_WEBKIT}" ]]; then ./scripts/build_against_node_webkit.sh; fi;
scripts/build-appveyor.bat
View file @
5e26a728
...
...
@@ -162,10 +162,6 @@ CALL npm install -g "electron@%NODE_RUNTIME_VERSION%"
ECHO installing electron-mocha
CALL npm install -g electron-mocha
ECHO preparing tests
(
ECHO var {app} = require('electron'^);
ECHO require('./createdb.js'^)(function (^) { app.quit(^); }^);
) >"test\support\createdb-electron.js"
CALL electron "test/support/createdb-electron.js"
DEL "test\support\createdb-electron.js"
ECHO calling electron-mocha
...
...
scripts/build_against_electron.sh
0 → 100755
View file @
5e26a728
#!/usr/bin/env bash
source
~/.nvm/nvm.sh
set
-e
-u
export
DISPLAY
=
":99.0"
GYP_ARGS
=
"--runtime=electron --target=
${
ELECTRON_VERSION
}
--dist-url=https://atom.io/download/electron"
NPM_BIN_DIR
=
"
$(
npm bin
-g
2>/dev/null
)
"
function
publish
()
{
if
[[
${
PUBLISHABLE
:-
false
}
==
true
]]
&&
[[
${
COMMIT_MESSAGE
}
=
~
"[publish binary]"
]]
;
then
node-pre-gyp package
node-pre-gyp publish
node-pre-gyp info
fi
}
function
electron_pretest
()
{
npm install
-g
electron
npm install
-g
electron-mocha
sh
-e
/etc/init.d/xvfb start
sleep 3
}
function
electron_test
()
{
"
$NPM_BIN_DIR
"
/electron
test
/support/createdb-electron.js
"
$NPM_BIN_DIR
"
/electron-mocha
-R
spec
--timeout
480000
}
# test installing from source
npm install
--build-from-source
--clang
=
1
$GYP_ARGS
electron_pretest
electron_test
publish
make clean
# now test building against shared sqlite
export
NODE_SQLITE3_JSON1
=
no
if
[[
$(
uname
-s
)
==
'Darwin'
]]
;
then
brew install sqlite
npm install
--build-from-source
--sqlite
=
$(
brew
--prefix
)
--clang
=
1
$GYP_ARGS
else
npm install
--build-from-source
--sqlite
=
/usr
--clang
=
1
$GYP_ARGS
fi
electron_test
export
NODE_SQLITE3_JSON1
=
yes
test/support/createdb-electron.js
0 → 100644
View file @
5e26a728
var
{
app
}
=
require
(
'electron'
);
var
createdb
=
require
(
'./createdb.js'
);
createdb
(
function
()
{
app
.
quit
();
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment