-
Notifications
You must be signed in to change notification settings - Fork 125
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
release-libs.yaml
automatically triggered on PRs to main
#790
release-libs.yaml
automatically triggered on PRs to main
#790
Conversation
b634bb5
to
4c6ac21
Compare
release-libs.yaml
automatically triggered on push to main
Bencher
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
It would be nice to have a script that look at diff with main and for the crates that do diff, it run cargo release --dry run. So that we can run the script as an action before merging to main and spot if we forgot to change a version of a changed crate. (less thing to think about when we review release that is not bad) |
that's a good idea, I'll write a new script and add to this PR |
4c6ac21
to
7e7c94b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
83733a8
to
9e60c67
Compare
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.
Great idea to have a script to check that before merging dev
into main
👏
48cef22
to
432ffae
Compare
for crate in "${crates[@]}"; do | ||
cd "$crate" | ||
|
||
# Check if there were any changes between dev and main | ||
git diff --quiet "origin/dev" "origin/main" -- . | ||
if [ $? -ne 0 ]; then | ||
|
||
# Check if crate versions on dev and main are identical | ||
version_dev=$(git show origin/dev:./Cargo.toml | awk -F' = ' '$1 == "version" {gsub(/[ "]+/, "", $2); print $2}') | ||
version_main=$(git show origin/main:./Cargo.toml | awk -F' = ' '$1 == "version" {gsub(/[ "]+/, "", $2); print $2}') | ||
if [ "$version_dev" = "$version_main" ]; then | ||
echo "Changes detected in crate $crate between dev and main branches! Versions on dev and main branches are identical ($version_dev), so you should bump the crate version on dev before merging into main." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
cd - >/dev/null | ||
done |
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.
here's an example of how this shell script will prevent us from merging to main
if we forget to bump some crate's version on a PR from dev
to main
:
https://github.com/plebhash/stratum/actions/runs/8530384769/job/23368058479?pr=47#step:3:15
I suspect this is because this workflow is being triggered from my fork, which doesn't have the login info to crates.io configured. Also, this failed workflow is not blocking the PR from being merged. IMO I would ignore this and merge (if reviews ok). After merging, I can do a dummy PR from |
905710b
to
2ca3bf0
Compare
This reverts commit d6ac089.
release-libs.yaml
automatically triggered on push to main
release-libs.yaml
automatically triggered on PRs to main
Every time we merge some PR from
dev
tomain
, we need to make sure every modified crate version is properly increased. Otherwise, we will mess up the dependency chain of whoever is fetching from crates.ioThis PR:
release-libs.yaml
so that theRelease Libs
workflow is triggered every time a PR is created againstmain
.check-versioning-lib-release.sh
) that checks the diff betweenmain
anddev
branches... if some lib crate has been changed but its version wasn't bumped, the CI will trigger an error and stop (here's an example on my fork)roles
from being published to crates.io (it doesn't make sense until high-level SRI APIs for external consumption #702 is completed, which will take a long time)