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

Semantic versioning and release publishing #35

Conversation

AlexandruAntonescuKeysight
Copy link
Contributor

Summary

This PR is intended to enhance the CI pipeline and simplify the modules calling. It has the following additions:

In the main github workflow:

  1. adds ref to HEAD in PR context when calling checkout action
  2. installs protolock for backward compatibility checking
  3. adds semantic versioning and backward compatibility checking
  • a few files have been added: VERSION, version.py, proto.lock

    • VERSION contains the version (major.minor.patch) in plain text; it is necessary for manually updating the major and dynamic version retrieval in pyproject.toml when installing with pip
    • proto.lock is a file generated by running the command protolock init (only once, after that when there are modification it is ran protolock commit); this tool is used for checking protobuff backward compatibility
    • protolock_check.sh is a script that checks if backward compatibility is broken by calling protolock status and if so, the minor version is incremented, otherwise the patch number is incremented
    • version.py is a python script that checks if backward compatibility is broken by calling protolock status and if so, the minor version is incremented, otherwise the patch number is incremented. Also, it manages the incrementing step of the version and also updates the VERSION file with the new version
  • the pyproject.toml was also updated to dynamically read the version from the VERSION file when building or installing

  • also after the version is updated, a commit is made for submitting the new VERSION and proto.lock files to the repo

  1. adds steps for publishing the release on the main project page under the Releases section
  2. adds steps for building a python wheel of the project and publishing it to the assets section of the last added release

Test Plan

I've tested this by locally running version.py script after randomly making changes to the proto (to check if protolock is working fine).
Also, I've made test branches on my fork to see if the main workflow is working good on github runners.

@AlexandruAntonescuKeysight AlexandruAntonescuKeysight requested a review from a team as a code owner April 5, 2024 16:18
Copy link

github-actions bot commented Apr 5, 2024

MLCommons CLA bot:
Thank you very much for your submission, we really appreciate it. Before we can accept your contribution, we ask that you sign the MLCommons CLA (Apache 2). Please use this [Google form] (https://forms.gle/Ew1KkBVpyeJDuRw67) to initiate authorization. If you are from an MLCommons member organization, we will request that you be added to the CLA. If you are not from a member organization, we will email you a CLA to sign. For any questions, please contact [email protected].
1 out of 2 committers have signed the MLCommons CLA.
@AlexandruAntonescuKeysight
❌ @github-actions
github-actions seems not to be a GitHub user. You need a GitHub account after you become MLCommons member. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request

@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant