Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code around compute_{common,local}_version.py #19050

Open
marbre opened this issue Nov 6, 2024 · 0 comments
Open

Refactor code around compute_{common,local}_version.py #19050

marbre opened this issue Nov 6, 2024 · 0 comments
Assignees
Labels
bindings/python Python wrapping IREE's C API infrastructure Relating to build systems, CI, or testing quality of life 😊 Nice things are nice; let's have some

Comments

@marbre
Copy link
Member

marbre commented Nov 6, 2024

As soon as #19034 lands, build_tools/python_deploy/compute_common_version.py and build_tools/python_deploy/compute_local_version.py are used in the workflows .github/workflows/oneshot_candidate_release.yml and .github/workflows/schedule_candidate_release.yml to compute the version numbers. Each script execution prints a computed version number which is temporarily saved in a bash variable and passed to $GITHUB_ENV , for example:

package_version="$(python3 build_tools/python_deploy/compute_common_version.py -rc)"
echo "package_version=${package_version}" >> $GITHUB_ENV

Parts of this bash scripting should be moved to Python scripts, that allow to freely log and write outputs all in a single process and without needing to juggle between bash and Python. The script could detect if it is being run locally or on CI by the presence of $GITHUB_ENV and log what it would do on GitHub if you run it locally. If run on CI, the script should set variables accordingly. See https://stackoverflow.com/a/70123641 for tips on writing to $GITHUB_ENV from Python.

Also see the original discussion started with #19034 (comment) as well as comment #19034 (comment).

@marbre marbre added bindings/python Python wrapping IREE's C API infrastructure Relating to build systems, CI, or testing quality of life 😊 Nice things are nice; let's have some labels Nov 6, 2024
@marbre marbre self-assigned this Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings/python Python wrapping IREE's C API infrastructure Relating to build systems, CI, or testing quality of life 😊 Nice things are nice; let's have some
Projects
None yet
Development

No branches or pull requests

1 participant