STT/.github/actions/check_artifact_exists
2021-04-27 14:58:14 +02:00
..
dist Try to reduce API calls in check_artifact_exists 2021-04-27 14:58:14 +02:00
action.yml GitHub Actions for macOS 2021-03-27 11:23:59 +01:00
main.js Try to reduce API calls in check_artifact_exists 2021-04-27 14:58:14 +02:00
package-lock.json Try to reduce API calls in check_artifact_exists 2021-04-27 14:58:14 +02:00
package.json Windows base CI 2021-04-19 10:48:14 +02:00
README.md Windows base CI 2021-04-19 10:48:14 +02:00

Building and using a TensorFlow cache:

The present action will check the existence of an artifact in the list of the repo artifacts. Since we don't want always to download the artifact, we can't rely on the official download-artifact action.

Rationale:

Because of the amount of code required to build TensorFlow, the library build is split into two main parts to make it much faster to run PRs:

  • a TensorFlow prebuild cache
  • actual code of the library

The TensorFlow prebuild cache exists because building tensorflow (even just the libtensorflow_cpp.so) is a huge amount of code and it will take several hours even on decent systems. So we perform a cache build of it, because the tensorflow version does not change that often.

However, each PR might have changes to the actual library code, so we rebuild this everytime.

The tensorflow_opt-macOS job checks whether such build cache exists alrady. Those cache are stored as artifacts because GitHub Actions cache has size limitations.

The build-tensorflow-macOS job has a dependency against the cache check to know whether it needs to run an actual build or not.

Hacking:

For hacking into the action, please follow the GitHub JavaScript Actions and specifically the usage of ncc.

$ npm install
$ npx ncc build main.js --license licenses.txt
$ git add dist/