Skip to content

Add an action to perform automatic releases #5456

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

Conversation

hannes-steffenhagen-diffblue
Copy link
Contributor

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue commented Aug 12, 2020

This action automatically does the following every thursday at 9:00 AM:

  • Create a commit that increments the last number of CBMC_VERSION
    in src/config.inc
  • Perform a release tagged with the new CBMC_VERSION number

This only saves us a tiny bit of work right now, but we’ll add actions to
automatically create and upload binary artifacts for these releases soon.

Depends on #5454 because that sets the CBMC_VERSION to what this script expects.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue changed the title Add an action to perform automatic releases Add an action to perform automatic releases [depends: #5454] Aug 12, 2020
@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue changed the title Add an action to perform automatic releases [depends: #5454] Add an action to perform automatic releases [depends on: #5454] Aug 12, 2020
Copy link
Contributor

@NlightNFotis NlightNFotis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This action automatically does the following every thursday at 9:00 AM:

* Create a commit that increments the last number of CBMC_VERSION
  in src/config.inc
* Perform a release tagged with the new CBMC_VERSION number

This only saves us a tiny bit of work right now, but we’ll add actions to
automatically create and upload binary artifacts for these releases soon.
@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #5456 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5456   +/-   ##
========================================
  Coverage    68.23%   68.23%           
========================================
  Files         1178     1178           
  Lines        97588    97588           
========================================
  Hits         66589    66589           
  Misses       30999    30999           
Flag Coverage Δ
#cproversmt2 42.80% <ø> (ø)
#regression 65.40% <ø> (ø)
#unit 32.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d30335...fbdd9c0. Read the comment docs.

- name: Update CBMC version
run: |
sed -i "s/CBMC_VERSION = .*/CBMC_VERSION = $CBMC_VERSION/" src/config.inc
- name: Set git identity to github bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this name still valid after the change?

Copy link
Contributor Author

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err, no I need to update the name of this step.

edit github bot is probably the right name for this

- cron: '0 9 * * THU'
# ^ this means 9:00 AM every thursday
# I can’t figure out the right syntax
# for ‘every other thursday’
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually having looked into this a bit more I don't think there is a right syntax for "every other thursday". The cron syntax we have available here is very limited (see: https://crontab.guru/#0_9_*_*_THU)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think Cron syntax supports that - best you can probably do is to run this job every thursday, and then in the job check if it's a release Thursday or not (and short circuit if its not). Might want to think about timezones as well?

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue changed the title Add an action to perform automatic releases [depends on: #5454] Add an action to perform automatic releases Aug 18, 2020
echo "::set-output name=bump_git_sha::$(git rev-parse HEAD)"
- name: Push changes
run: |
git push
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ Which branch is this pushing to? Might be nice to have a comment with the answer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn’t specify a branch in checkout, so we pull from the default (develop), which automatically also sets the upstream of the branch to develop. So this will push against develop.

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this mostly looks fine. If I'm reading this correctly, this looks like it directly commits to develop ? If so, does this create a risk that we might tag a build as a 'release' when it's actually failing CI due to a previous bad merge?

- cron: '0 9 * * THU'
# ^ this means 9:00 AM every thursday
# I can’t figure out the right syntax
# for ‘every other thursday’
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think Cron syntax supports that - best you can probably do is to run this job every thursday, and then in the job check if it's a release Thursday or not (and short circuit if its not). Might want to think about timezones as well?

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline with @hannes-steffenhagen-diffblue - happy for this to go in as is.

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue merged commit cbadaa5 into diffblue:develop Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants