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

CBMC version 6 release process changes #7987

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/regular-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
tag_name: cbmc-${{ env.CBMC_VERSION }}
release_name: cbmc-${{ env.CBMC_VERSION }}
prerelease: true
body: |
This is CBMC version ${{ env.CBMC_VERSION }}.

Expand Down
120 changes: 60 additions & 60 deletions .github/workflows/release-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,35 +149,35 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 20.04 package built and uploaded successfully' || 'Ubuntu 20.04 package build failed' }}"

homebrew-pr:
runs-on: macos-11
steps:
- name: Get release tag name
# The GITHUB_REF we get has refs/tags/ in front of the tag name so we
# strip that here
run: echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
- name: Configure git user name and email
uses: Homebrew/actions/git-user-config@07da0794847043a11761f14c97cc682577c74d5d
with:
username: db-ci-cprover
- name: Create homebrew PR
run: |
brew update-reset
brew bump-formula-pr --tag "$RELEASE_TAG" --revision "$GITHUB_SHA" cbmc
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.DB_CI_CPROVER_ACCESS_TOKEN }}
- name: Checkout CBMC project source code to obtain access to scripts
if: always()
uses: actions/checkout@v3
- name: Slack notification of CI status
if: success() || failure()
env:
SLACK_CHANNEL: team_open_source
SLACK_COLOR: ${{ job.status }}
SLACK_USERNAME: Github Actions CI bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: "${{ job.status == 'success' && 'Homebrew PR submitted successfully' || 'Homebrew PR failed' }}"
run: go run scripts/slack_notification_action.go
# homebrew-pr:
Copy link
Collaborator

Choose a reason for hiding this comment

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

⛏️ It might be good to put a short comment on each of these disabled sections to explain why it is disabled. It is possible that someone might see that they are not receiving new versions from Docker / homebrew and go looking here. So some comments could save some confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will consider this for a next PR, but I want to move this one forward to unblock us.

In the meantime, I'm hoping that someone coming across this change would see the blame long which would lead him to the commit 2d14e99 and its message that explains the situation.

# runs-on: macos-11
# steps:
# - name: Get release tag name
# # The GITHUB_REF we get has refs/tags/ in front of the tag name so we
# # strip that here
# run: echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
# - name: Configure git user name and email
# uses: Homebrew/actions/git-user-config@07da0794847043a11761f14c97cc682577c74d5d
# with:
# username: db-ci-cprover
# - name: Create homebrew PR
# run: |
# brew update-reset
# brew bump-formula-pr --tag "$RELEASE_TAG" --revision "$GITHUB_SHA" cbmc
# env:
# HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.DB_CI_CPROVER_ACCESS_TOKEN }}
# - name: Checkout CBMC project source code to obtain access to scripts
# if: always()
# uses: actions/checkout@v3
# - name: Slack notification of CI status
# if: success() || failure()
# env:
# SLACK_CHANNEL: team_open_source
# SLACK_COLOR: ${{ job.status }}
# SLACK_USERNAME: Github Actions CI bot
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_MESSAGE: "${{ job.status == 'success' && 'Homebrew PR submitted successfully' || 'Homebrew PR failed' }}"
# run: go run scripts/slack_notification_action.go

windows-msi-package:
runs-on: windows-2019
Expand Down Expand Up @@ -273,34 +273,34 @@ jobs:
SLACK_MESSAGE: "${{ job.status == 'success' && 'Windows package built and uploaded successfully' || 'Windows package build failed' }}"
run: go run scripts/slack_notification_action.go

push-docker-image-dockerhub:
runs-on: ubuntu-20.04
steps:
- name: Checkout CBMC source
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set Image Tag
run: |
# Isolate the version number from a reference to a tag, for example,
# '5.20.3' from a string like 'refs/tags/cbmc-5.20.3-exp'
VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)
echo "IMAGE_TAG=diffblue/cbmc:$VERSION" >> $GITHUB_ENV
- name: Build docker image
run: docker build -t "$IMAGE_TAG" .
- name: Push docker image to DockerHub
run: |
echo ${{ secrets.DOCKERHUB_ACCESS_DB_CI_CPROVER }} | docker login --username=dbcicprover --password-stdin
docker image push "$IMAGE_TAG"
# For security reasons remove stored login credentials from
# configuration file they are stored at by docker login.
docker logout
- name: Slack notification of CI status
uses: rtCamp/action-slack-notify@v2
if: success() || failure()
env:
SLACK_CHANNEL: team_open_source
SLACK_COLOR: ${{ job.status }}
SLACK_USERNAME: Github Actions CI bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: "${{ job.status == 'success' && 'Docker Image built and submitted to DockerHub successfully' || 'Docker Image build failed' }}"
# push-docker-image-dockerhub:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout CBMC source
# uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Set Image Tag
# run: |
# # Isolate the version number from a reference to a tag, for example,
# # '5.20.3' from a string like 'refs/tags/cbmc-5.20.3-exp'
# VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)
# echo "IMAGE_TAG=diffblue/cbmc:$VERSION" >> $GITHUB_ENV
# - name: Build docker image
# run: docker build -t "$IMAGE_TAG" .
# - name: Push docker image to DockerHub
# run: |
# echo ${{ secrets.DOCKERHUB_ACCESS_DB_CI_CPROVER }} | docker login --username=dbcicprover --password-stdin
# docker image push "$IMAGE_TAG"
# # For security reasons remove stored login credentials from
# # configuration file they are stored at by docker login.
# docker logout
# - name: Slack notification of CI status
# uses: rtCamp/action-slack-notify@v2
# if: success() || failure()
# env:
# SLACK_CHANNEL: team_open_source
# SLACK_COLOR: ${{ job.status }}
# SLACK_USERNAME: Github Actions CI bot
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_MESSAGE: "${{ job.status == 'success' && 'Docker Image built and submitted to DockerHub successfully' || 'Docker Image build failed' }}"
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ endif()
# filenames)
file(
STRINGS src/config.inc CBMC_VERSION
REGEX "CBMC_VERSION = (.*)")
string(REGEX REPLACE "CBMC_VERSION = (.*)" "\\1" CBMC_VERSION ${CBMC_VERSION})
REGEX "CBMC_VERSION = ([0-9.]+).*")
string(REGEX REPLACE "CBMC_VERSION = ([0-9.]+).*" "\\1" CBMC_VERSION ${CBMC_VERSION})
Comment on lines +43 to +44
Copy link
Contributor

Choose a reason for hiding this comment

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

This section is to avoid a problem with CMake.

Essentially CMake accepts version of type major[.minor[.patch[.tweak]]] and fails if anything else is fed.

Before we were passing anything specified in config.inc as version and leaving CMake to validate it.

In this way we are just passing the part of the version that is composed of digits and .s, so 6.0.0-preview is considered a valid version and for CMake it is interpreted as 6.0.0 allowing CBMC itself to use the full version specified in config.inc.

message(STATUS "Building CBMC version ${CBMC_VERSION}")

project(CBMC VERSION ${CBMC_VERSION})
Expand Down
2 changes: 1 addition & 1 deletion src/config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ endif
OSX_IDENTITY="Developer ID Application: Daniel Kroening"

# Detailed version information
CBMC_VERSION = 5.95.1
CBMC_VERSION = 6.0.0-preview
thomasspriggs marked this conversation as resolved.
Show resolved Hide resolved

# Use the CUDD library for BDDs, can be installed using `make -C src cudd-download`
# CUDD = ../../cudd-3.0.0
2 changes: 1 addition & 1 deletion src/libcprover-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libcprover_rust"
version = "5.95.1"
version = "6.0.0-preview"
edition = "2021"
description = "Rust API for CBMC and assorted CProver tools"
repository = "https://github.com/diffblue/cbmc"
Expand Down
17 changes: 17 additions & 0 deletions v6_undo_stack.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Temporary changes for v6

This is a temporary file, containing changes done to release process for v6,
that need to be reverted back.

It's a file in the repository to allow for easier tracking of the status
of things among the broader community, and to allow everyone to add/delete
things they believe should be in here.

The file is scheduled for deletion by the actual release of `v6` and subsequent
rollback of the changes.

## Stack

* Revert changes to homebrew PR push (`.github/workflows/release-packages.yaml`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Commit hashes could be really handy here, assuming that we can avoid invalidating them in a re-base before the PR is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if we need commit hashes here - this was supposed to be a casual thing just to verify our reverted changes against the log here, sort of a double-entry bookkeeping practice but for the purpose of managing the process.

But if keen, I can also add this in a new PR.

* Revert changes to docker image push (`.github/workflows/releas-packages.yaml`)
* Remove marking of release as `prerelease` (`.github/workflows/regular-release.yaml`)
Loading