From fc0d12486b51e3621620437be3c208df69e8af1b Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 12:51:34 -0400 Subject: [PATCH 01/12] core worker test fix --- tfjs-core/karma.conf.js | 4 ++-- tfjs-core/scripts/test-ci.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tfjs-core/karma.conf.js b/tfjs-core/karma.conf.js index e9bd0e855d8..e59a3f1888a 100644 --- a/tfjs-core/karma.conf.js +++ b/tfjs-core/karma.conf.js @@ -55,8 +55,8 @@ const browserstackConfig = { const webworkerConfig = { ...browserstackConfig, files: [ - 'src/setup_test.ts', - 'src/worker_test.ts', + 'dist/setup_test.ts', + 'dist/worker_test.ts', // Serve dist/tf-core.min.js and tf-backend-cpu.min.js as a static // resource, but do not include in the test runner {pattern: 'dist/tf-core.min.js', included: false}, diff --git a/tfjs-core/scripts/test-ci.sh b/tfjs-core/scripts/test-ci.sh index 0bd570c3c62..76e2283fb37 100755 --- a/tfjs-core/scripts/test-ci.sh +++ b/tfjs-core/scripts/test-ci.sh @@ -31,7 +31,8 @@ then echo "Start webworker test." # Make a dist/tf-core.min.js file to be imported by the web worker. yarn rollup -c --ci - # copy the cpu backend bundle somewhere the test can access it + # copy core & cpu backend bundle somewhere the test can access it + cp -v ../tfjs-backend-cpu/dist/tf-core.min.js dist/ cp -v ../tfjs-backend-cpu/dist/tf-backend-cpu.min.js dist/ yarn test-webworker --browsers=bs_safari_mac,bs_chrome_mac else From a7fd60f2106e01df84bd456a54a8c79faa1558cd Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 12:53:56 -0400 Subject: [PATCH 02/12] turn on nightly for this pr --- scripts/run-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-build.sh b/scripts/run-build.sh index 8c15e147117..b4b08c28058 100755 --- a/scripts/run-build.sh +++ b/scripts/run-build.sh @@ -19,5 +19,5 @@ set -e DIR=$1 if [[ -f "$DIR/run-ci" || "$NIGHTLY" = true ]]; then gcloud builds submit . --config=$DIR/cloudbuild.yml \ - --substitutions _NIGHTLY=$NIGHTLY + --substitutions _NIGHTLY=true fi From e26e400b92e5ddf69f56d96c3885cf8587fb7c50 Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 13:21:47 -0400 Subject: [PATCH 03/12] save --- tfjs-core/scripts/test-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfjs-core/scripts/test-ci.sh b/tfjs-core/scripts/test-ci.sh index 76e2283fb37..e84b83fdb0c 100755 --- a/tfjs-core/scripts/test-ci.sh +++ b/tfjs-core/scripts/test-ci.sh @@ -32,7 +32,7 @@ then # Make a dist/tf-core.min.js file to be imported by the web worker. yarn rollup -c --ci # copy core & cpu backend bundle somewhere the test can access it - cp -v ../tfjs-backend-cpu/dist/tf-core.min.js dist/ + cp -v ../tfjs-core/dist/tf-core.min.js dist/ cp -v ../tfjs-backend-cpu/dist/tf-backend-cpu.min.js dist/ yarn test-webworker --browsers=bs_safari_mac,bs_chrome_mac else From 1c0a7621f5c7b49d7e77fd13cd57e4dca85355c4 Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 13:44:41 -0400 Subject: [PATCH 04/12] save --- tfjs-core/scripts/test-ci.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tfjs-core/scripts/test-ci.sh b/tfjs-core/scripts/test-ci.sh index e84b83fdb0c..0bd570c3c62 100755 --- a/tfjs-core/scripts/test-ci.sh +++ b/tfjs-core/scripts/test-ci.sh @@ -31,8 +31,7 @@ then echo "Start webworker test." # Make a dist/tf-core.min.js file to be imported by the web worker. yarn rollup -c --ci - # copy core & cpu backend bundle somewhere the test can access it - cp -v ../tfjs-core/dist/tf-core.min.js dist/ + # copy the cpu backend bundle somewhere the test can access it cp -v ../tfjs-backend-cpu/dist/tf-backend-cpu.min.js dist/ yarn test-webworker --browsers=bs_safari_mac,bs_chrome_mac else From a68240c3b1e2c8888b7de1b571fb67829a6a767d Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 13:57:49 -0400 Subject: [PATCH 05/12] fix line break --- tfjs-backend-webgl/scripts/test-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfjs-backend-webgl/scripts/test-ci.sh b/tfjs-backend-webgl/scripts/test-ci.sh index 17bd9025334..c96d84d85b1 100755 --- a/tfjs-backend-webgl/scripts/test-ci.sh +++ b/tfjs-backend-webgl/scripts/test-ci.sh @@ -27,7 +27,7 @@ then npm-run-all -p -c --aggregate-output \ "run-browserstack --browsers=bs_firefox_mac,bs_chrome_mac" \ "run-browserstack --browsers=bs_chrome_mac,win_10_chrome,bs_android_9 --testEnv webgl2 --flags '{\"WEBGL_CPU_FORWARD\": false, \"WEBGL_SIZE_UPLOAD_UNIFORM\": 0}'" \ - "run-browserstack --browsers=bs_chrome_mac --testEnv webgl2 --flags '{\"WEBGL_PACK\": false}'" \ + "run-browserstack --browsers=bs_chrome_mac --testEnv webgl2 --flags '{\"WEBGL_PACK\": false}'" else yarn run-browserstack --browsers=bs_chrome_mac fi From ff6d59e8f2855f17d1e07c3f4763d221881ff09d Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 13:59:15 -0400 Subject: [PATCH 06/12] save --- tfjs-core/karma.conf.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfjs-core/karma.conf.js b/tfjs-core/karma.conf.js index e59a3f1888a..82b7a84f77b 100644 --- a/tfjs-core/karma.conf.js +++ b/tfjs-core/karma.conf.js @@ -55,8 +55,8 @@ const browserstackConfig = { const webworkerConfig = { ...browserstackConfig, files: [ - 'dist/setup_test.ts', - 'dist/worker_test.ts', + 'dist/setup_test.js', + 'dist/worker_test.js', // Serve dist/tf-core.min.js and tf-backend-cpu.min.js as a static // resource, but do not include in the test runner {pattern: 'dist/tf-core.min.js', included: false}, From a34198c9468a0997e115b29dbf3c7ee934964eda Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 14:20:30 -0400 Subject: [PATCH 07/12] save --- tfjs-core/karma.conf.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfjs-core/karma.conf.js b/tfjs-core/karma.conf.js index 82b7a84f77b..3fa31f049ce 100644 --- a/tfjs-core/karma.conf.js +++ b/tfjs-core/karma.conf.js @@ -55,8 +55,8 @@ const browserstackConfig = { const webworkerConfig = { ...browserstackConfig, files: [ - 'dist/setup_test.js', - 'dist/worker_test.js', + {pattern: 'dist/setup_test.js', type: 'module'}, + {pattern: 'dist/worker_test.js', type: 'module'}, // Serve dist/tf-core.min.js and tf-backend-cpu.min.js as a static // resource, but do not include in the test runner {pattern: 'dist/tf-core.min.js', included: false}, From b1051cd941480796d1b584e76c1290923a45489a Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 22:02:13 -0400 Subject: [PATCH 08/12] update core karma conf for worker --- tfjs-core/karma.conf.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tfjs-core/karma.conf.js b/tfjs-core/karma.conf.js index 3fa31f049ce..6dad6092516 100644 --- a/tfjs-core/karma.conf.js +++ b/tfjs-core/karma.conf.js @@ -55,22 +55,27 @@ const browserstackConfig = { const webworkerConfig = { ...browserstackConfig, files: [ - {pattern: 'dist/setup_test.js', type: 'module'}, - {pattern: 'dist/worker_test.js', type: 'module'}, + {pattern: 'src/setup_test.ts'}, + {pattern: 'src/worker_test.ts'}, + // Include src files for core, except for the tests + {pattern: 'src/**/!(*_test).ts'}, // Serve dist/tf-core.min.js and tf-backend-cpu.min.js as a static // resource, but do not include in the test runner - {pattern: 'dist/tf-core.min.js', included: false}, - {pattern: 'dist/tf-backend-cpu.min.js', included: false}, + {pattern: 'dist/tf-core.min.js', included: false, served: true}, + {pattern: 'dist/tf-backend-cpu.min.js', included: false, served: true}, + ], + exclude: [ + 'src/tests.ts', + 'src/test_node.ts', + 'src/test_async_backends.ts', ], - exclude: [], - hostname: 'bs-local.com', port: 12345 }; module.exports = function(config) { const args = []; - // If no test environment is set unit tests will run against all registered - // test environments. + // If no test environment is set unit tests will run against all + // registered test environments. if (config.testEnv) { args.push('--testEnv', config.testEnv); } From d2942e997db3d69eb365e2ca32b0589a3db1b31a Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 22:46:36 -0400 Subject: [PATCH 09/12] kick build From 28972bd20e1d99793aef60b30b9b595d87964639 Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Tue, 5 May 2020 23:34:31 -0400 Subject: [PATCH 10/12] disable cloud benchmark --- tfjs/scripts/test-ci.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfjs/scripts/test-ci.sh b/tfjs/scripts/test-ci.sh index 1056341e595..85f5fd0cb50 100755 --- a/tfjs/scripts/test-ci.sh +++ b/tfjs/scripts/test-ci.sh @@ -18,8 +18,8 @@ set -e yarn karma start --browsers='bs_firefox_mac,bs_chrome_mac' --singleRun -cd integration_tests -yarn benchmark-cloud +# cd integration_tests +# yarn benchmark-cloud # Reinstall the following line once https://github.com/tensorflow/tfjs/pull/1663 # is resolved. # yarn benchmark --layers --tfjs-node From 6a69452235df88a8c94e6daadf02d19ec28e0556 Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Wed, 6 May 2020 09:35:55 -0400 Subject: [PATCH 11/12] turn off forced nightly --- scripts/run-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-build.sh b/scripts/run-build.sh index b4b08c28058..8c15e147117 100755 --- a/scripts/run-build.sh +++ b/scripts/run-build.sh @@ -19,5 +19,5 @@ set -e DIR=$1 if [[ -f "$DIR/run-ci" || "$NIGHTLY" = true ]]; then gcloud builds submit . --config=$DIR/cloudbuild.yml \ - --substitutions _NIGHTLY=true + --substitutions _NIGHTLY=$NIGHTLY fi From fcdfed65855f5deafb34ececb53d7b3fce660e57 Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Wed, 6 May 2020 10:36:34 -0400 Subject: [PATCH 12/12] kick build