Skip to content

Commit

Permalink
Add Cloud Build integration (migrate away from Travis) (tensorflow#192)
Browse files Browse the repository at this point in the history
Add Cloud Build integration (migrate away from Travis)

Also standardize some of the yarn scripts around models:
- move `rollup -c` out of `yarn build` into `yarn publish-local` and `yarn publish-npm`
- make sure each repo has both `publish-local` and `publish-npm`
  • Loading branch information
dsmilkov authored Apr 19, 2019
1 parent dd1233e commit 260d04f
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 36 deletions.
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

25 changes: 25 additions & 0 deletions cloudbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
steps:
- name: 'node:10'
entrypoint: 'yarn'
id: 'yarn'
args: ['install']
- name: 'node:10'
entrypoint: 'yarn'
id: 'test'
args: ['presubmit']
waitFor: ['yarn']
env: ['BROWSERSTACK_USERNAME=deeplearnjs1']
secretEnv: ['BROWSERSTACK_KEY']
- name: 'python:3.6'
entrypoint: 'bash'
args: ['./run_python_tests.sh']
waitFor: ['-']
secrets:
- kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc
secretEnv:
BROWSERSTACK_KEY: CiQAkwyoIW0LcnxymzotLwaH4udVTQFBEN4AEA5CA+a3+yflL2ASPQAD8BdZnGARf78MhH5T9rQqyz9HNODwVjVIj64CTkFlUCGrP1B2HX9LXHWHLmtKutEGTeFFX9XhuBzNExA=
timeout: 1800s
logsBucket: 'gs://tfjs-build-logs'
options:
logStreamingOption: 'STREAM_ON'
substitution_option: 'ALLOW_LOOSE'
5 changes: 3 additions & 2 deletions coco-ssd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
"yalc": "~1.0.0-pre.21"
},
"scripts": {
"build": "rimraf dist && tsc && rollup -c",
"build": "rimraf dist && tsc",
"lint": "tslint -p . -t verbose",
"publish-local": "yarn build && yalc push",
"publish-local": "yarn build && rollup -c && yalc push",
"publish-npm": "yarn build && rollup -c && npm publish",
"test": "yarn build && ts-node run_tests.ts"
},
"license": "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions knn-classifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"yalc": "~1.0.0-pre.21"
},
"scripts": {
"build": "rimraf dist && tsc && rollup -c",
"publish-npm": "yarn build && npm publish",
"publish-local": "yarn build && yalc push",
"build": "rimraf dist && tsc",
"publish-npm": "yarn build && rollup -c && npm publish",
"publish-local": "yarn build && rollup -c && yalc push",
"lint": "tslint -p . -t verbose",
"test": "ts-node run_tests.ts"
},
Expand Down
5 changes: 3 additions & 2 deletions mobilenet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"typescript": "2.9.2"
},
"scripts": {
"build": "rimraf dist && tsc && rollup -c",
"publish-npm": "yarn build && npm publish",
"build": "rimraf dist && tsc",
"publish-local": "yarn build && rollup -c && yalc push",
"publish-npm": "yarn build && rollup -c && npm publish",
"lint": "tslint -p . -t verbose",
"test": "ts-node run_tests.ts"
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "tensorflow-models",
"version": "0.0.1",
"scripts": {
"build_and_test_all": "cd posenet && yarn && yarn build && yarn lint && yarn test-travis",
"link-local": "yalc link",
"presubmit": "ts-node presubmit.ts"
},
Expand Down
5 changes: 3 additions & 2 deletions posenet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
"yalc": "~1.0.0-pre.27"
},
"scripts": {
"build": "rimraf dist && tsc && rollup -c",
"build": "rimraf dist && tsc",
"test": "ts-node run_tests.ts",
"publish-npm": "yarn build && npm publish",
"publish-local": "yarn build && rollup -c && yalc push",
"publish-npm": "yarn build && rollup -c && npm publish",
"dev": "cd demos && yarn watch",
"lint": "tslint -p . -t verbose"
},
Expand Down
9 changes: 1 addition & 8 deletions speech-commands/training/browser-fft/py_lint_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [[ -z "${TRAVIS_BUILD_NUMBER}" ]]; then
pip install -r "${SCRIPT_DIR}/requirements.txt"
else
# If in Travis, use the `--user` flag when performing `pip install` of
# dependencies.
pip install --user -r "${SCRIPT_DIR}/requirements.txt"
fi

pip install -r "${SCRIPT_DIR}/requirements.txt"
pylint --rcfile="${SCRIPT_DIR}/.pylintrc" ${SCRIPT_DIR}/*.py

for PY_TEST_FILE in ${SCRIPT_DIR}/*_test.py; do
Expand Down

0 comments on commit 260d04f

Please sign in to comment.