Skip to content

Commit 5bac2cb

Browse files
committedMar 26, 2020
Add build test
1 parent 511c3e9 commit 5bac2cb

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed
 

‎.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ jobs:
99
- name: Linux Release
1010
if: tag IS present
1111
script:
12-
- travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
12+
- travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh && ./ci/build-test.sh"
1313
- ./ci/release-image/push.sh
1414
- name: Linux ARM64 Release
1515
if: tag IS present
1616
script:
17-
- ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
17+
- ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh && ./ci/build-test.sh"
1818
- ./ci/release-image/push.sh
1919
arch: arm64
2020
- name: MacOS Release
2121
if: tag IS present
2222
os: osx
2323
language: node_js
2424
node_js: 12
25-
script: yarn && yarn vscode && travis_wait 60 ci/release.sh
25+
script: yarn && yarn vscode && travis_wait 60 ci/release.sh && ./ci/build-test.sh
2626

2727
before_deploy:
2828
- echo "$JSON_KEY" | base64 --decode > ./ci/key.json

‎ci/build-test.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
# build-test.bash -- Make sure the build worked.
3+
# This is to make sure we don't have Node version errors or any other
4+
# compilation-related errors.
5+
6+
set -euo pipefail
7+
8+
function main() {
9+
cd "$(dirname "${0}")/.." || exit 1
10+
11+
local output
12+
output=$(node ./build/out/node/entry.js --list-extensions 2>&1)
13+
if echo "$output" | grep 'was compiled against a different Node.js version'; then
14+
echo "$output"
15+
exit 1
16+
else
17+
echo "Build ran successfully"
18+
fi
19+
}
20+
21+
main "$@"

0 commit comments

Comments
 (0)
Please sign in to comment.