Add build test
This commit is contained in:
parent
511c3e95b2
commit
5bac2cbdb8
@ -9,12 +9,12 @@ jobs:
|
|||||||
- name: Linux Release
|
- name: Linux Release
|
||||||
if: tag IS present
|
if: tag IS present
|
||||||
script:
|
script:
|
||||||
- travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
|
- travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh && ./ci/build-test.sh"
|
||||||
- ./ci/release-image/push.sh
|
- ./ci/release-image/push.sh
|
||||||
- name: Linux ARM64 Release
|
- name: Linux ARM64 Release
|
||||||
if: tag IS present
|
if: tag IS present
|
||||||
script:
|
script:
|
||||||
- ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
|
- ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh && ./ci/build-test.sh"
|
||||||
- ./ci/release-image/push.sh
|
- ./ci/release-image/push.sh
|
||||||
arch: arm64
|
arch: arm64
|
||||||
- name: MacOS Release
|
- name: MacOS Release
|
||||||
@ -22,7 +22,7 @@ jobs:
|
|||||||
os: osx
|
os: osx
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js: 12
|
node_js: 12
|
||||||
script: yarn && yarn vscode && travis_wait 60 ci/release.sh
|
script: yarn && yarn vscode && travis_wait 60 ci/release.sh && ./ci/build-test.sh
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- echo "$JSON_KEY" | base64 --decode > ./ci/key.json
|
- echo "$JSON_KEY" | base64 --decode > ./ci/key.json
|
||||||
|
21
ci/build-test.sh
Executable file
21
ci/build-test.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# build-test.bash -- Make sure the build worked.
|
||||||
|
# This is to make sure we don't have Node version errors or any other
|
||||||
|
# compilation-related errors.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
cd "$(dirname "${0}")/.." || exit 1
|
||||||
|
|
||||||
|
local output
|
||||||
|
output=$(node ./build/out/node/entry.js --list-extensions 2>&1)
|
||||||
|
if echo "$output" | grep 'was compiled against a different Node.js version'; then
|
||||||
|
echo "$output"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Build ran successfully"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
Reference in New Issue
Block a user