From 8501ef9bb0fa6ef43b9153a96b6b74b70375d9f2 Mon Sep 17 00:00:00 2001 From: Na Li Date: Fri, 13 Mar 2020 17:32:24 -0700 Subject: [PATCH 1/4] Fix integration test. --- tfjs-node/scripts/test-ci.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tfjs-node/scripts/test-ci.sh b/tfjs-node/scripts/test-ci.sh index 3a53d02037b..133d9ed8548 100755 --- a/tfjs-node/scripts/test-ci.sh +++ b/tfjs-node/scripts/test-ci.sh @@ -10,6 +10,11 @@ set -e yarn build-addon-from-source +yarn build-core-ci +yarn build-layers-ci +yarn build-converter-ci +yarn build-data-ci +yarn build-union-ci yarn build-ci yarn lint yarn test From c5b652eb94298af7ce56d00ca93e1b768412e6e6 Mon Sep 17 00:00:00 2001 From: Na Li Date: Fri, 13 Mar 2020 17:38:35 -0700 Subject: [PATCH 2/4] Refactor. --- tfjs-node/cloudbuild.yml | 40 ------------------------------------ tfjs-node/package.json | 4 +++- tfjs-node/scripts/test-ci.sh | 6 +----- 3 files changed, 4 insertions(+), 46 deletions(-) diff --git a/tfjs-node/cloudbuild.yml b/tfjs-node/cloudbuild.yml index dcd4bcff4a2..0c1a5f2d2d5 100644 --- a/tfjs-node/cloudbuild.yml +++ b/tfjs-node/cloudbuild.yml @@ -5,46 +5,6 @@ steps: entrypoint: 'yarn' args: ['install'] -# Build core from master. -- name: 'node:10' - dir: 'tfjs-node' - id: 'build-core' - entrypoint: 'yarn' - args: ['build-core-ci'] - waitFor: ['yarn-common'] - -# Build layers from master. -- name: 'node:10' - dir: 'tfjs-node' - id: 'build-layers' - entrypoint: 'yarn' - args: ['build-layers-ci'] - waitFor: ['build-core'] - -# Build converter from master. -- name: 'node:10' - dir: 'tfjs-node' - id: 'build-converter' - entrypoint: 'yarn' - args: ['build-converter-ci'] - waitFor: ['build-core'] - -# Build data from master. -- name: 'node:10' - dir: 'tfjs-node' - id: 'build-data' - entrypoint: 'yarn' - args: ['build-data-ci'] - waitFor: ['build-layers', 'build-converter'] - -# Build union package from master. -- name: 'node:10' - dir: 'tfjs-node' - id: 'build-union' - entrypoint: 'yarn' - args: ['build-union-ci'] - waitFor: ['build-data'] - # Install tfjs-node dependencies. - name: 'node:10' dir: 'tfjs-node' diff --git a/tfjs-node/package.json b/tfjs-node/package.json index 833b6c2850b..89263fd7fc9 100644 --- a/tfjs-node/package.json +++ b/tfjs-node/package.json @@ -24,6 +24,8 @@ "build-data-ci": "cd ../tfjs-data && yarn && yarn build-ci", "build-union": "cd ../tfjs && yarn && yarn build", "build-union-ci": "cd ../tfjs && yarn && yarn build-ci", + "build-deps": "yarn build-core && yarn build-layers && yarn build-converter && yarn build-data && yarn build-union", + "build-deps-ci": "yarn build-core-ci && yarn build-layers-ci && yarn build-converter-ci && yarn build-data-ci && yarn build-union-ci", "build-npm": "./scripts/build-npm.sh", "build-addon": "./scripts/build-and-upload-addon.sh", "build-addon-from-source": "node-pre-gyp install --build-from-source", @@ -39,7 +41,7 @@ "lint": "tslint -p . -t verbose", "prep": "cd node_modules/@tensorflow/tfjs-core && yarn && yarn build", "publish-local": "yarn prep && yalc push", - "test": "yarn link-master && yarn && yarn build-core && yarn build-layers && yarn build-converter && yarn build-data && yarn build-union && ts-node src/run_tests.ts", + "test": "yarn link-master && yarn && yarn build-deps && ts-node src/run_tests.ts", "test-ci": "./scripts/test-ci.sh", "test-ts-integration": "./scripts/test-ts-integration.sh", "upload-windows-addon": "./scripts/build-and-upload-windows-addon.bat" diff --git a/tfjs-node/scripts/test-ci.sh b/tfjs-node/scripts/test-ci.sh index 133d9ed8548..51212f599af 100755 --- a/tfjs-node/scripts/test-ci.sh +++ b/tfjs-node/scripts/test-ci.sh @@ -10,11 +10,7 @@ set -e yarn build-addon-from-source -yarn build-core-ci -yarn build-layers-ci -yarn build-converter-ci -yarn build-data-ci -yarn build-union-ci +yarn build-deps-ci yarn build-ci yarn lint yarn test From 4d5ca5f34d50abe3173451f726d1be1f2aa0d6dc Mon Sep 17 00:00:00 2001 From: Na Li Date: Fri, 13 Mar 2020 17:44:05 -0700 Subject: [PATCH 3/4] Fix. --- tfjs-node/cloudbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfjs-node/cloudbuild.yml b/tfjs-node/cloudbuild.yml index 0c1a5f2d2d5..1dfe558c30a 100644 --- a/tfjs-node/cloudbuild.yml +++ b/tfjs-node/cloudbuild.yml @@ -11,7 +11,7 @@ steps: entrypoint: 'yarn' id: 'yarn' args: ['install'] - waitFor: ['build-union'] + waitFor: ['yarn-common'] # Unit tests. - name: 'node:10' From 55961d82e228d9b0695db0671925bb5346b5ecde Mon Sep 17 00:00:00 2001 From: Na Li Date: Sat, 14 Mar 2020 08:56:46 -0700 Subject: [PATCH 4/4] Make the same change to tfjs-node-gpu. --- tfjs-node-gpu/cloudbuild.yml | 42 +----------------------------------- tfjs-node-gpu/package.json | 4 +++- 2 files changed, 4 insertions(+), 42 deletions(-) diff --git a/tfjs-node-gpu/cloudbuild.yml b/tfjs-node-gpu/cloudbuild.yml index 205a13fedd3..31919f3756b 100644 --- a/tfjs-node-gpu/cloudbuild.yml +++ b/tfjs-node-gpu/cloudbuild.yml @@ -13,53 +13,13 @@ steps: args: ['install'] waitFor: ['prep-gpu'] -# Build core from master. -- name: 'node:10' - dir: 'tfjs-node-gpu' - id: 'build-core' - entrypoint: 'yarn' - args: ['build-core-ci'] - waitFor: ['yarn-common'] - -# Build layers from master. -- name: 'node:10' - dir: 'tfjs-node-gpu' - id: 'build-layers' - entrypoint: 'yarn' - args: ['build-layers-ci'] - waitFor: ['build-core'] - -# Build converter from master. -- name: 'node:10' - dir: 'tfjs-node-gpu' - id: 'build-converter' - entrypoint: 'yarn' - args: ['build-converter-ci'] - waitFor: ['build-core'] - -# Build data from master. -- name: 'node:10' - dir: 'tfjs-node-gpu' - id: 'build-data' - entrypoint: 'yarn' - args: ['build-data-ci'] - waitFor: ['build-layers', 'build-converter'] - -# Build union package from master. -- name: 'node:10' - dir: 'tfjs-node-gpu' - id: 'build-union' - entrypoint: 'yarn' - args: ['build-union-ci'] - waitFor: ['build-data'] - # Install tfjs-node dependencies. - name: 'node:10' dir: 'tfjs-node-gpu' entrypoint: 'yarn' id: 'yarn' args: ['install'] - waitFor: ['build-union'] + waitFor: ['yarn-common'] # Unit tests. - name: 'node:10' diff --git a/tfjs-node-gpu/package.json b/tfjs-node-gpu/package.json index 1c0cda63bfe..1abc761b444 100644 --- a/tfjs-node-gpu/package.json +++ b/tfjs-node-gpu/package.json @@ -24,6 +24,8 @@ "build-data-ci": "cd ../tfjs-data && yarn && yarn build-ci", "build-union": "cd ../tfjs && yarn && yarn build", "build-union-ci": "cd ../tfjs && yarn && yarn build-ci", + "build-deps": "yarn build-core && yarn build-layers && yarn build-converter && yarn build-data && yarn build-union", + "build-deps-ci": "yarn build-core-ci && yarn build-layers-ci && yarn build-converter-ci && yarn build-data-ci && yarn build-union-ci", "build-npm": "yarn prep-gpu && ./scripts/build-npm.sh", "build-addon": "./scripts/build-and-upload-addon.sh", "build-addon-from-source": "node-pre-gyp install --build-from-source", @@ -41,7 +43,7 @@ "prep-gpu": "./prep-gpu.sh", "prep-gpu-windows": "./prep-gpu-windows.bat", "publish-local": "yarn prep && yalc push", - "test": "yarn link-master && yarn && yarn build-core && yarn build-layers && yarn build-converter && yarn build-data && yarn build-union && ts-node src/run_tests.ts", + "test": "yarn link-master && yarn && yarn build-deps && ts-node src/run_tests.ts", "test-ci": "./scripts/test-ci.sh", "test-ts-integration": "./scripts/test-ts-integration.sh", "upload-windows-addon": "prep-gpu-windows.bat && ./scripts/build-and-upload-windows-addon-gpu.bat"