-
Notifications
You must be signed in to change notification settings - Fork 58
Initial skeleton for using ABI checks for automated versioning checks #1612
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
base: develop
Are you sure you want to change the base?
Conversation
- Each project/package has a `VERSION` file and a `versioning.yml` file. - The VERSION file is a text file and contains the major.minor.patch version and a md5sum of the files when the version was last updated — the intention here is to force a git conflict when two PRs are updating the version and their CI has already run. The VERSION file is the single source of truth for the version. - The `versioning.yml` is used for various specs: specifying the files to generate the md5sum from, which build products to check for ABI breaks, and some other miscellaneous parameters. - `cmake/rocm_versioning.cmake` is provided to parse VERSION file and get the values into CMake. - `.github/workflows/abi-guard.yml` is a reusable workflow for performing ABI checks; it uses `scripts/abi-guard.py` and is passed a `versioning.yml`. - `scripts/abi-guard.py` is provided to do various workflows: check for ABI breakages (via libabigail), compute the hash for a version change, etc. - This PR includes a VERSION and versioning.yml for rocprofiler-sdk according to this schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an ABI (Application Binary Interface) guard system for versioning and compatibility checking across ROCm projects. The implementation uses libabigail to detect API/ABI changes and enforce semantic versioning policies.
- Adds a Python script (
abi-guard.py) for version management, hash computation, and ABI checking - Provides a Jinja2 template for generating versioning configuration files
- Integrates versioning infrastructure into the build system via CMake modules
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/abi-guard.py | Main Python tool for ABI checking, version management, and hash computation |
| scripts/templates/versioning.yml.j2 | Jinja2 template for generating versioning configuration files |
| scripts/requirements.txt | Python dependencies for the ABI guard tool |
| projects/rocprofiler-sdk/versioning.yml | Example versioning configuration for rocprofiler-sdk project |
| projects/rocprofiler-sdk/VERSION | Updated version file with hash comment |
| cmake/rocm_versioning.cmake | CMake module for reading version files and installing version artifacts |
| projects/rocprofiler-sdk/CMakeLists.txt | Integration of versioning system into project build configuration |
| projects/rocprofiler-sdk/cmake/rocprofiler_config_install.cmake | Installation of version files |
| CONTRIBUTING.md | Documentation on versioning practices and workflows |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Motivation
Currently, project versioning is done ad-hoc and lacks automated enforcement. This PR is a prototype for automating checks which enforce versioning updates. A reusable github workflow and an example of using this automated workflow for rocprofiler-sdk will be included soon.
The workflow relies on a combination of libabigail and (per-project)
VERSIONandversioning.ymlfiles. The single source of truth for the project's version is in the VERSION file. Theversioning.ymlis used for the automated workflows using libabigail.Enforcing Versioning Updates
sourcesorheaderssection of theversioning.ymlis modified (excluding modifications solely to code comments and/or formatting), a patch version increase is required.Please see the updates to the
CONTRIBUTING.mdfor more details.Technical Details
VERSIONfile and aversioning.ymlfile.VERSIONfile is a text file and contains the<major>.<minor>.<patch>version and a md5sum of the files when the version was last updatedversioning.ymlis used for various specs: specifying the files to generate the md5sum from, which build products to check for ABI breaks, and some other miscellaneous parameters.cmake/rocm_versioning.cmakeis provided to parse VERSION file and get the values into CMake. An example of its usage is in rocprofiler-sdk..github/workflows/abi-guard.ymlis a reusable workflow for performing ABI checks; it usesscripts/abi-guard.pyand is passed aversioning.yml.scripts/abi-guard.pyis provided to do various workflows: check for ABI breakages (via libabigail), update aVERSIONfile, compute the hash for a version change, etc.Test Plan
VERSIONand/orversioning.ymlfile.Test Result
Submission Checklist