Skip to content

Latest commit

 

History

History
67 lines (59 loc) · 4.11 KB

RELEASING.md

File metadata and controls

67 lines (59 loc) · 4.11 KB

Pre-release

  1. Clean up clippy lints
  2. Run cargo audit and fix any issues
  3. Generate protos
    1. Run cd tensorflow-proto-codegen; cargo run -- ${PATH_TO_TENSORFLOW?} $PWD/..
    2. Update Cargo.toml in root and tensorflow-op-codegen to ensure version of protobuf exactly equals version of protoc_rust used
  4. Generate ops
    1. Run cd tensorflow-op-codegen; cargo run -- ${PATH_TO_TENSORFLOW?} $PWD/..
    2. Run cd tensorflow-op-codegen; cargo run --bin eager -- ${PATH_TO_TENSORFLOW?} $PWD/..
    3. Run cargo fmt to format generated code
  5. Commit and push changes

Releasing

Note that any crate not mentioned here (e.g. tensorflow-proto-codegen, tensorflow-op-codegen) is internal-only and should not be published to crates.io.

  1. Check out a clean copy. Note that cargo publish packages up untracked files. Use --allow-dirty at your peril.
  2. Fetch from the main repo
  3. Ensure that the TensorFlow version is a real release, not a release candidate
  4. Ensure that the minimum supported Rust version in the README is up to date
  5. Update changelog.
  6. Bump version number of tensorflow-sys if necessary
    1. Run git log v${PREVIOUS_VERSION?}..HEAD tensorflow-sys and see if there were any changes. If not, skip.
    2. Bump the version in tensorflow-sys/Cargo.toml
    3. Bump the version in tensorflow-sys/README.md
    4. Bump the version for tensorflow-sys in the root Cargo.toml
  7. Bump version number of tensorflow-sys-runtime if necessary
    1. Run git log v${PREVIOUS_VERSION?}..HEAD tensorflow-sys-runtime and see if there were any changes. If not, skip.
    2. Bump the version in tensorflow-sys-runtime/Cargo.toml
    3. Bump the version in tensorflow-sys-runtime/README.md
    4. Bump the version for tensorflow-sys-runtime in the root Cargo.toml
  8. Bump version number of tensorflow-internal-macros if necessary
    1. Run git log v${PREVIOUS_VERSION?}..HEAD tensorflow-internal-macros and see if there were any changes. If not, skip.
    2. Bump the version in tensorflow-internal-macros/Cargo.toml
    3. Bump the version for tensorflow-internal-macros in the root Cargo.toml
  9. Bump the version number in Cargo.toml
  10. Bump the version number in README.md
  11. Run ./test-all
  12. Double-check that addition.py is built using the version of TensorFlow being linked against. (See "Upgrading TensorFlow" section.)
  13. Run ./run-valgrind
  14. Commit and push the changes. (Push before publishing to ensure that the changes being published are up to date.)
  15. If the version of tensorflow-sys was bumped, run cargo publish for tensorflow-sys. (Publish before tagging in case there are problems publishing and we need to add commits to fix them.)
  16. If the version of tensorflow-sys-runtime was bumped, run cargo publish for tensorflow-sys-runtime. (Publish before tagging in case there are problems publishing and we need to add commits to fix them.)
  17. If the version of tensorflow-internal-macros was bumped, run cargo publish for tensorflow-internal-macros. (Publish before tagging in case there are problems publishing and we need to add commits to fix them.)
  18. Run cargo publish. (Publish before tagging in case there are problems publishing and we need to add commits to fix them.)
  19. Add a v${VERSION?} tag and push it
  20. Run ./update-docs
  21. Announce the release to the mailing list

Post-release

  1. Update version numbers of dependencies
  2. Remove any deprecated items scheduled to be removed

Upgrading TensorFlow

  1. Update version and tag in tensorflow-sys/build.rs
  2. Update version in run-valgrind
  3. Run python examples/addition/addition.py using the version of TensorFlow being linked against. (Use pip in a virtualenv, see https://www.tensorflow.org/install/pip#2-create-a-virtual-environment-recommended)
    1. Run virtualenv --system-site-packages -p python3 ~/tensorflow-${TENSORFLOW_VERSION?}
    2. Run source ~/tensorflow-${TENSORFLOW_VERSION?}/bin/activate to activate the virtualenv
    3. Run pip install --upgrade pip
    4. Run pip install --upgrade tensorflow==${TENSORFLOW_VERSION?}
    5. Run python examples/addition/addition.py
    6. Run deactivate to exit the virtualenv