roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.06k stars 213 forks source link

Add version check to CI #497

Closed gavv closed 1 year ago

gavv commented 1 year ago

We already have CI check that the code is properly formatted: check-formatting.sh.

It would be nice to add check-version.sh, which would verify that version declared in src/public_api/include/roc/version.h is similar as the latest git tag reported by git describe --tags --abbrev=0.

This check should be run only when running CI build for tags that match v*.

We already have a script to parse version from header, which we can use in this check: scripts/scons_helpers/parse-version.py.

Github workflow is here: https://github.com/roc-streaming/roc-toolkit/blob/master/.github/workflows/build.yml

dheerajd5 commented 1 year ago

Hey, can I work on this issue?

gavv commented 1 year ago

You're welcome, thanks!

dheerajd5 commented 1 year ago

Hey so my code it isn't passing the android29-x86_64/macos tests, I noticed that these tests also failed on the last build workflow run on the main repo, so I was thinking maybe it didn't have anything to do with the changes I made. Other than that, it is passing all the checks. I created a new check- version-check which does the required functionality.

I had to fetch all the tags manually, so it could affect workflow times a bit, I wasn't able to find a workaround to this, when I try to fetch tags through checkout, it doesn't show up.

Here is my workflow run. Link to workflow Also I'm new to contributing, so in the future, do I mention these things here itself or in my PR?

Edit: It has passed all checks. I have put a PR.

gavv commented 1 year ago

Landed!