Skip to content

Simplify CI build job Python setup#7113

Merged
samanoelton merged 2 commits into
tensorflow:masterfrom
psamanoelton:ci_upgrade
Jun 1, 2026
Merged

Simplify CI build job Python setup#7113
samanoelton merged 2 commits into
tensorflow:masterfrom
psamanoelton:ci_upgrade

Conversation

@psamanoelton
Copy link
Copy Markdown
Contributor

Summary

This PR simplifies the Python setup used by the main Bazel build job in CI.

Previously, the self-hosted/container-based build job relied on actions/setup-python, and the workflow had to manually copy Python headers into the hosted-toolcache layout so Bazel's @system_python repository could find Python.h correctly. This PR removes that workaround by using container-managed Python 3.10 directly inside the build job.

The goal is to keep the same Bazel build/test/package behavior while making the CI setup simpler and easier to maintain.

What changed

  • removed actions/setup-python from the main build job
  • installed Python 3.10, python3.10-dev, and python3.10-venv directly in the container
  • created a local virtualenv for the job and used that interpreter for pip/Bazel-related steps
  • removed the manual Python header-copy workaround
  • removed the temporary debug steps that were only needed to diagnose the hosted-toolcache/header mismatch
  • kept the rest of the build/test/package flow unchanged

Validation

This change has been validated against the same CI behaviors as before:

  • bazel fetch //tensorboard/...
  • bazel build //tensorboard/...
  • bazel test //tensorboard/...
  • bazel test //tensorboard/... --test_tag_filters="support_notf"
  • bazel build //tensorboard/pip_package:test_pip_package
  • ./bazel-bin/tensorboard/pip_package/test_pip_package --tf-version tf-nightly
  • ./bazel-bin/tensorboard/pip_package/test_pip_package --tf-version notf

Copy link
Copy Markdown
Member

@arcra arcra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread .github/workflows/ci.yml Outdated
@samanoelton samanoelton merged commit 03e8e04 into tensorflow:master Jun 1, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants