Refactor code around compute_{common,local}_version.py
#19050
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
As soon as #19034 lands,
build_tools/python_deploy/compute_common_version.py
andbuild_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: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).
The text was updated successfully, but these errors were encountered: