Commit Graph

302 Commits

Author SHA1 Message Date
Matthew Soulanille 51577688f1
Move nightly publishing tests and release branch tests to github actions (#8555)
[Example nightly release and publish test](https://github.com/mattsoulanille/tfjs/actions/runs/14672995746/job/41183624273)

[Example release PR test](https://github.com/mattsoulanille/tfjs/actions/runs/14674243426/job/41187438555?pr=1)
2025-04-28 09:07:00 -07:00
gaikwadrahul8 f0f981fe30
Address typos in scripts documentation strings (#8185)
DOC
2024-02-27 10:22:08 -08:00
Matthew Soulanille fe7f4f3a56
Make lockfiles branch checking more lenient (#8060)
BUG
2023-11-08 11:47:24 -08:00
Matthew Soulanille 18c42242b1
Fix missing publish tag for non-bazel packages (#8044) 2023-10-31 09:43:24 -07:00
Matthew Soulanille a6a1005704
Start verdaccio earlier and keep it alive longer (#8016)
* Start verdaccio earlier and keep it alive longer

Start the verdaccio server immediately when running publish-npm and keep it
alive until the first OTP is entered. Also, add a tip for how to access the
server from your browser. This makes it easier to verify that all packages will
be published correctly to NPM.

* Fix CI timeout from asking to quit verdaccio
2023-10-26 16:18:06 +00:00
Dedongala 6b539e834e
updated to release-utils to support rc (#8000) 2023-10-11 14:56:00 -07:00
Matthew Soulanille 93e9af4893
Build node addon before running tests (#7884)
Fix a race condition in CI where the tests may be run before the node addon is built.
2023-07-31 15:16:11 -07:00
Dedongala 95368c8bbd
Feature/pypi (#7787)
* Publish-pypi.ts file

* publish-pypi.ts file

* Update publish-pypi.ts
2023-07-05 06:36:07 -07:00
Chunnien Chan d6fffec9a4
Add WebGPU section to release note (#7754)
* Add WebGPU to release note

* Update out file display
2023-06-13 18:06:32 +00:00
Dedongala 14c3644202
Github token (#7734)
* Github token

* Github token

* Github token

Github token

* Apply suggestions from code review

Co-authored-by: Matthew Soulanille <matthew@soulanille.net>

---------

Co-authored-by: Matthew Soulanille <matthew@soulanille.net>
2023-06-05 15:14:44 -07:00
Matthew Soulanille b122429cd8
Do not throw an error when killing the verdaccio process (#7695)
Killing the verdaccio process throws an error because the disconnect event emits when the process is killed. We throw an error on a disconnect to catch any unexpected verdaccio disconnections.

Fix this by deregistering the disconnect handler before killing the verdaccio process.
2023-05-24 18:59:22 +00:00
Matthew Soulanille de94eec199
Fix tfjs-release not updating all tfjs versions of subpackages (#7550)
Some TFJS packages, like wasm, have examples or demos in them. These usually depend on the parent package, but the parent package is not marked as to be updated when updating the subpackage dependency versions. For an example of this, see #7547.

Update the TFJS dependencies of these subpackages to the release version if they are `link:` dependencies.
2023-05-17 18:50:25 +00:00
Matthew Soulanille 089efca029
Fix Verdaccio nightly e2e tests (#7644)
Replace e2e's custom local publishing logic with the publish-npm script. This more accurately represents how we release TFJS.

Fix publish-npm not waiting for Verdaccio to start before pushing packages.

Avoid testing WebGPU on platforms other than Chrome MacOS (for now).

---------

Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
2023-05-15 14:03:03 -07:00
chunnienc fd48f88aeb
Add usernames to release note script (#7680) 2023-05-11 13:32:01 -07:00
Matthew Soulanille 5a262525ad
Move WebGPU out of alpha (#7643)
Move WebGPU out of alpha and version it with the rest of the TFJS
packages.
2023-05-08 10:17:10 -07:00
Matthew Soulanille 34344eec81
Move nightly verdaccio tests to a separate cloudbuild file (#7584) 2023-04-13 13:14:51 -07:00
Matthew Soulanille c74168ca6a
Switch CI to e2-highcpu-32 (#7537)
e2 highcpu has slightly more memory (32 vs 28.8) and is the same price.
See https://cloud.google.com/build/pricing for details.
2023-04-07 16:38:04 -07:00
Matthew Soulanille a17c0b7312
Fix release script not updating all package.jsons (#7542)
release-tfjs updated only the root package.json of each package, but e2e tests
have some other package.json files that must be updated as well. Fix this by
updating all package.json files in each package so that they use the npm release
versions instead of `link:` dependencies.
2023-04-04 16:52:58 -07:00
chunnienc 9923395b76
Add e2e golden model tests (#7520)
* Add script to build golden model data

* Add graph model predict test

* Add intermediate tensor tests

* Fix

* Add script

* Add comments

* Remove unused deps

* Update e2e/integration_tests/graph_model_golden_tests.ts

Co-authored-by: Matthew Soulanille <matthew@soulanille.net>

* Update e2e/integration_tests/graph_model_golden_tests.ts

Co-authored-by: Matthew Soulanille <matthew@soulanille.net>

* Add check

* Fix

* Add script to fetch data

* Add cloudbuild step

* Fix

* Fix cloudbuild tests

* Remove parallel

* Update names

* Fix bucket name

* Add null checks

* Fix null checks in test

* Update fetch script

---------

Co-authored-by: Matthew Soulanille <matthew@soulanille.net>
2023-03-27 19:20:42 -07:00
chunnienc 5d40e01cbe
Fix latest npm package version retrieval in scripts (#7511)
* Fix getting npm latest version

* update release.ts
2023-03-23 18:52:03 -07:00
Matthew Soulanille 8e0b81af6b
Use verdaccio on 127.0.0.1 instead of localhost to avoid ipv6 (#7491)
Fix an intermittent bug in the npm publishing script that causes the script to depend on the network configuration of the host. I think what's happening is that when ipv6 is available, sometimes Verdaccio binds [::1]:5783 instead of 127.0.0.1:5783, but npm tries to publish to 127.0.0.1:5783. Explicitly specifying the loopback address 127.0.0.1 fixes this.
2023-03-20 12:27:43 -07:00
Matthew Soulanille 0a32b672ef
Improve npm publishing infra (#7287)
The current npm publishing infra is more manual than necessary. This PR makes the following improvements:

1. Publish all packages in a release unit with one command. Publishing no longer involves running yarn publish-npm multiple times.

2. Stage all packages to a local verdaccio repository before publishing. This catches any compatibility issues that may appear when publishing to npm and allows us to build all packages before publishing any to npm.

3. Publish with a single OTP. The previous infra required an OTP per package to publish to npm. This new infra publishes all packages sequentially after they're built, so it can use a single OTP for all of them. If another OTP is required due to the first one timing out, it asks for another.

A future PR will move our nightly verdaccio e2e tests to use this infra, which will allow us to avoid setting the npm registry globally. This will let us run verdaccio tests in parallel with the rest of nightly tests, which should reduce the time taken.
2023-01-23 16:27:41 -08:00
Matthew Soulanille f5db2ee503
Add '.bazel' to make-version.js's python build file path (#7263)
Fix make-version.js to work with the changes made in #7253.
2023-01-11 10:48:54 -08:00
dependabot[bot] 2e3bed82ff
build(deps): bump qs in /scripts/cloud_funcs/send_email (#7147)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 10:37:40 -08:00
Jing Jin 374db2353a
Add script to launch tfjs debugger local server (#7047)
* Add script to launch tfjs debugger local server

* use jszip

* remove admzip

* address comments

* update version to the latest

Co-authored-by: Matthew Soulanille <msoulanille@google.com>
2022-12-01 11:02:20 -08:00
Matthew Soulanille cae6fec1e8
Fix release script for tfdf (#7049)
Add tfjs-tfdf to the release script under alpha packages. Fix a bug where the release script throws an error if a package has never been published to npm.
2022-11-15 12:58:41 -08:00
Matthew Soulanille d9521cbf2d
Run verdaccio tests concurrently with bazel tests (#6999)
Previously, nightly Verdaccio tests ran exclusively with Bazel tests because it was as convenient way to make the rest of the build steps wait for Verdaccio to finish. This PR properly sets up the waitFor field of the other steps to depend on Verdaccio tests when they're present.

To do this, the PR adds a new waitedForByPackages flag to the cloudbuild config, which makes all non-bazel packages waitFor any step it's added to.
2022-11-01 14:32:53 -07:00
ahmedsabie 350bcd959d
Add TFDF build files (#6887)
* Add TFDF build files

* Add tfjs-tfdf to project files
2022-10-19 13:37:04 +04:00
Matthew Soulanille 1bc192ff5b
Do not log bazel test output in cloudbuild (#6897)
Bazel test output is already logged in the results UI. Logging it in cloudbuild makes the log very long (> 5MB) which then truncates the rest of the logs.
2022-10-04 17:03:50 -07:00
Matthew Soulanille 18034b0275
Run Verdaccio tests in nightly (#6660)
Currently, we run Verdaccio tests only when we do a release. Since they're only tested after choosing a release commit from nightly CI, they are often a point of failure. This PR makes them run during nightly tests, so we can identify issues with them before creating a release PR.

This PR also enables Bazel sandboxing, which fixes the rules_nodejs linker issue.
2022-10-04 12:14:24 -07:00
Matthew Soulanille 8cabcda90f
[webgpu] Fix publish-npm for webgpu (#6803)
* [webgpu] Remove 'yarn --cwd' from publish script

Some scripts call `yarn` multiple times. Each additional time `yarn` is nested, an additional `--` needs to be passed before arguments can be passed (since we're using yarn 1). Other packages' publishing scripts require two instances of `--`, and this is [what the publish-npm script assumes](https://github.com/tensorflow/tfjs/blob/master/scripts/publish-npm.ts#L132).

tfjs-backend-webgpu uses an additional call to yarn to change directory to the root of the monorepo, so it requires three instances of `--` before `--otp=######` can be passed during publishing.

This PR removes the extra call to yarn and instead uses the full name of the Bazel target, `//tfjs-backend-webgpu:tfjs-backend-webgpu_pkg.publish`. This should not affect the published artifacts since Bazel always creates a separate output tree for them anyway.

* Revert webgpu changes and add a special-case to publish-npm

* Fix column width of publish-npm.ts

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2022-09-01 11:25:43 -07:00
Matthew Soulanille 2745ea9de9
[wasm] Build tfjs-backend-wasm entirely with Bazel (#6458)
Build tfjs-backend-wasm with Bazel. tfjs-backend-wasm already uses Bazel for Emscripten. This PR makes it use Bazel for TypeScript as well and replaces the build scripts with a single pkg_npm target.

Fixes #5282
2022-06-14 10:18:02 -07:00
Matthew Soulanille 0d6626fdbc
Check bundle size without temp files (#6509) 2022-06-09 11:27:13 -07:00
Matthew Soulanille 07635667b8
Limit concurrent tests with --local_test_jobs instead of --jobs (#6508) 2022-06-09 11:10:27 -07:00
Matthew Soulanille 0a9fdbd450
Build link package with remote cache access in CI (#6511)
* Add option to pass bazel options when building link package

* Build link package with remote cache in CI

* Update cloudbuild golden files
2022-06-08 21:10:25 -07:00
Ping Yu 2098237dbc
Fixed nightly failures (#6488)
Disable cpu forwarding for the new gather_nd tests that target webgl implementation.

Lock windows chrome version to 101.0 on browserstack, given the latest chrome (102.0) failed to provide webgl2 context.

Remove unused karma.config files.

Temporarily limit concurrent Bazel jobs to 25 (the number of browserstack tests we can run at the same time).
2022-06-02 13:40:54 -07:00
Matthew Soulanille 983f8ed62d
Fix find_packages_with_diff.js not checking all packages (#6427)
* Use packages from package_dependencies.json for diff checking

* Clone to /tmp when checking for diffs

* Remove unused imports

* Return to original path correctly
2022-05-19 14:44:40 -07:00
Matthew Soulanille f471f97836
Improve link_package speed (#6376)
Improve link_package speed by only building the dependencies that are required and by building them all in a single bazel build command.

Remove the link_package_core package, which is no longer needed now that link_package can build just the required dependencies.
2022-05-10 17:06:05 -07:00
Matthew Soulanille 8a8b7e0201
Fix presubmit change detection for non-Bazel packages (#6390)
Fix incorrect presubmit change detection between Bazel and non-Bazel packages.
Fixes #6384
2022-05-10 14:44:14 -07:00
Matthew Soulanille b62ef2800f
Fix release unit printing (#6266)
Co-authored-by: ahmedsabie <ahmedsabie@google.com>
2022-03-28 14:49:23 -04:00
CommanderRoot d279946b7b
refactor: replace deprecated String.prototype.substr() (#6255)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

Co-authored-by: Na Li <linazhao@google.com>
2022-03-22 18:31:31 -07:00
Matthew Soulanille 51d180a4b4
Fix publish-npm.ts for packages with no dependencies (#6258) 2022-03-22 17:00:51 -04:00
Matthew Soulanille e6c8108a52
Update e2e dependencies in a release PR (#6254)
Update e2e dependencies to the versions that are released when releasing the tfjs monorepo. This fixes a failure in release tests where e2e tries to install 'link:' dependencies.

Add a '--local' option to the release-tfjs script to prevent creating a release PR. This is just for development and makes it easier to see the output of the script.
2022-03-21 15:16:59 -07:00
Matthew Soulanille 37277d7db8
Replace only packages marked as deps during a release (#6245)
* In release, replace only packages marked as deps

\#6209 made the release script overwrite every dependency in the set of packages being published. This causes tfjs-core's verdaccio tests to fail because tfjs-core has a devDependency on tfjs-backend-cpu, but core needs to be published before cpu. This PR reverts to the original behavior of overwriting dependency versions in the package.json only if they are listed in a given release phase's dependencies.

* Remove update-dependency.ts from e2e
2022-03-18 16:54:42 -07:00
Matthew Soulanille ccf4c2db07
Add WebGPU to the release script (#6209)
* Add webgpu to the release script

* Check package.json for link and file deps before publishing

* Allow alpha monorepo packages to publish a different version

* Make alpha packages publish using the tfjs branch

* Update release-util.ts

Co-authored-by: Na Li <linazhao@google.com>
2022-03-09 20:11:49 -08:00
Jing Jin 611a488708
Temporarily disable tfjs-react-native nightly test (#6151) 2022-02-14 15:11:34 -08:00
dependabot[bot] 30d255d461
Bump node-fetch from 2.6.1 to 2.6.7 in /scripts/cloud_funcs/send_email (#6070)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2022-01-24 11:14:23 -08:00
Hao Yunfei e34d7c3b74
Build tfjs-backend-webgpu with Bazel (#5362)
DEV
INTERNAL
* Build tfjs-backend-webgpu with Bazel

* update

* bazel format

* use node:11 for yarn test-ci

* Revert "use node:11 for yarn test-ci"

This reverts commit 46b2e6ddd2f7afb08e402a4d534b4371bb007be5.

* add bazel test and test-dev

* update commands in package.json

* rebase

* bazel lint

* update setup_test structure

* save

* Use central `yarn lint` instead of mono webgpu backend

* Make WebGPU local testing run chrome with flag

* update yarn.lock

* bazel format

* skip browserstack testing for WebGPU

* update dependency

* Address comments

* lint

* lint

* update tsconfig.test.json

* Address Matt's comments
2021-11-12 11:22:05 -08:00
Matthew Soulanille 441537199e
Lint Bazel packages with a central lint script (#5790)
INTERNAL
* Add global lint script

* Omit non-bazel packages from repo-wide lint

* Lint Bazel packages with a global lint script

* Fix lint errors

* [core] Remove lint script

* [cpu] Remove lint script

* [webgl] Remove lint script

* [converter] Remove tslint script

* [layers] Remove tslint script

* [tflite] Remove tslint script

* [data] Remove tslint script

* Update cloudbuild golden file tests

* [webgpu] Revert incorrect lint changes

* Add lint instructions to Bazel migration doc

* Fix lint errors

* [core] Remove circular import in platform_node

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2021-11-02 14:48:54 -07:00
Ping Yu 70d5735d03
only send build result to chat room, stopping sending to email (#5779)
FEATURE
SECURITY
2021-10-27 14:17:06 -07:00