Skip to content

Commit f10e6c7

Browse files
authored
Merge pull request #5517 from NlightNFotis/ada-637-release-page-instructions
Update Release Process script and add Installation Instructions to the Release Page
2 parents 1c42123 + b86bf12 commit f10e6c7

File tree

4 files changed

+156
-50
lines changed

4 files changed

+156
-50
lines changed

.github/workflows/regular-release.yaml

Lines changed: 67 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,83 @@
11
on:
2-
schedule:
3-
# ┌───────────── minute (0 - 59)
4-
# │ ┌───────────── hour (0 - 23)
5-
# │ │ ┌───────────── day of the month (1 - 31)
6-
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
7-
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
8-
# │ │ │ │ │
9-
# │ │ │ │ │
10-
# │ │ │ │ │
11-
- cron: '0 9 * * THU'
12-
# ^ this means 9:00 AM every thursday
13-
# I can’t figure out the right syntax
14-
# for ‘every other thursday’
2+
push:
3+
tags:
4+
- 'cbmc-*'
5+
6+
name: Create Release
157

168
jobs:
17-
bump_cbmc_version:
18-
runs-on: ubuntu-20.04
9+
get-version-information:
10+
name: Get Version Information
11+
runs-on: ubuntu-latest
1912
outputs:
20-
cbmc_version: ${{ steps.cbmc_version_number.outputs.CBMC_VERSION }}
21-
bump_git_sha: ${{ steps.commit_bump.outputs.bump_git_sha }}
13+
version: ${{ steps.split.outputs._2 }}
2214
steps:
23-
- uses: actions/checkout@v2
15+
- uses: jungwinter/split@v1
16+
id: split
2417
with:
25-
submodules: recursive
26-
- name: Get new CBMC version number
27-
id: cbmc_version_number
28-
run: |
29-
NEW_CBMC_VERSION=$(grep '^CBMC_VERSION =' src/config.inc | cut -d = -f 2 | scripts/increment_version.sh)
30-
echo ::set-env name=CBMC_VERSION::$NEW_CBMC_VERSION
31-
echo ::set-output name=CBMC_VERSION::$NEW_CBMC_VERSION
32-
- name: Update CBMC version
33-
run: |
34-
sed -i "s/CBMC_VERSION = .*/CBMC_VERSION = $CBMC_VERSION/" src/config.inc
35-
- name: Set git identity to github bot
36-
run: |
37-
git config --local user.name db-ci-cprover
38-
git config --local user.email "[email protected]"
39-
- name: Commit changes
40-
id: commit_bump
41-
run: |
42-
git commit -a -m "Bump version to $CBMC_VERSION"
43-
echo "::set-output name=bump_git_sha::$(git rev-parse HEAD)"
44-
- name: Push changes
45-
run: |
46-
git push
18+
msg: ${{ github.ref }}
19+
seperator: '/'
4720
perform-release:
48-
needs: bump_cbmc_version
21+
name: Perform Release
4922
runs-on: ubuntu-20.04
23+
needs: get-version-information
5024
steps:
51-
- uses: actions/checkout@v2
52-
with:
53-
# We just added a commit to master, so the default GITHUB_REF doesn’t work anymore
54-
ref: master
55-
- name: DEBUG show bump version
56-
run: echo ${{ needs.bump_cbmc_version.outputs.CBMC_VERSION }}
25+
- name: Checkout code
26+
uses: actions/checkout@v2
5727
- name: Create release
5828
uses: actions/create-release@v1
5929
env:
6030
GITHUB_TOKEN: ${{ secrets.DB_CI_CPROVER_ACCESS_TOKEN }}
31+
CBMC_TAG: ${{ needs.get-version-information.outputs.version }}
6132
with:
62-
tag_name: cbmc-${{ needs.bump_cbmc_version.outputs.CBMC_VERSION }}
63-
release_name: cbmc-${{ needs.bump_cbmc_version.outputs.CBMC_VERSION }}
33+
tag_name: ${{ env.CBMC_TAG }}
34+
release_name: ${{ env.CBMC_TAG }}
35+
body: |
36+
This is CBMC version ${{ env.CBMC_TAG }}.
37+
38+
## MacOS
39+
40+
On MacOS, install CBMC using [Homebrew](https://brew.sh/) with
41+
```sh
42+
brew install cbmc
43+
```
44+
45+
or upgrade (if it's already been installed) with:
46+
47+
```sh
48+
brew upgrade cbmc
49+
```
50+
51+
## Ubuntu
52+
53+
On Ubuntu, install CBMC by downloading the *.deb package below for your version of Ubuntu
54+
and install with one of
55+
56+
```sh
57+
# Ubuntu 18:
58+
$ dpkg -i ubuntu-18.04-${{ env.CBMC_TAG }}-Linux.deb
59+
# Ubuntu 20:
60+
$ dpkg -i ubuntu-20.04-${{ env.CBMC_TAG }}-Linux.deb
61+
```
62+
63+
## Windows
64+
65+
On Windows, install CBMC by downloading the `${{ env.CBMC_TAG }}-win64.msi` installer
66+
below, double-clicking on the installer to run it, and adding the folder
67+
`C:\Program Files\cbmc\bin` in your `PATH` environment variable.
68+
69+
For installation from the windows command prompt, run:
70+
71+
```sh
72+
msiexec /i ${{ env.CBMC_TAG }}-win64.msi
73+
PATH="c:\program files\cbmc\bin";%PATH%
74+
```
75+
76+
Note that we depend on the Visual C++ redistributables. You likely already have these,
77+
if not please download and run vcredist.x64.exe from Microsoft to install them prior
78+
to running cbmc, or make sure you have Visual Studio 2019 installed.
79+
80+
You can download either [Visual Studio 2019 Community Edition](https://visualstudio.microsoft.com/vs/community/)
81+
or the [Visual C++ Redistributables](https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads) from Microsoft for free.
6482
draft: false
6583
prerelease: false
66-
commitish: ${{ needs.bump_cbmc_version.outputs.bump_git_sha }}

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ already have these, if not please download and run vcredist.x64.exe from
4343
[Microsoft](https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads) to install them prior to running
4444
cbmc.
4545

46+
### Linux
47+
48+
For different linux environments, you have these choices:
49+
50+
1. Install CBMC through the distribution's repositories, with the downside
51+
that this might install an older version of cbmc, depending on what the
52+
package maintenance policy of the distribution is, or
53+
2. Install CBMC through the `.deb` package built by each release, available
54+
on the [releases](https://github.com/diffblue/cbmc/releases) page. To
55+
do that, download the `.deb` package and run `apt install cbmc-x.y.deb`
56+
with `root` privileges, with `x.y` being substituted for the version
57+
you are attempting to install.
58+
59+
*NOTE*: Because of libc/libc++ ABI compatibility and package
60+
dependency names, if you follow this path make sure you install the
61+
package appropriate for the version of operating system you are using.
62+
3. Compile from source using the instructions [here](COMPILING.md)
63+
4664
### macOS
4765

4866
For macOS there is a [Homebrew](https://brew.sh) package

doc/ADR/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Architecture Decision Records
2+
3+
This folder is designated to contain our ADRs (Architecture
4+
Decision Records) - documentation for why specific decision
5+
where taken at the time they were, so that future maintainers
6+
can more easily identify constraints that shaped the architecture
7+
of the system and the surrounding infrastructure.
8+
9+
## Release & Packaging
10+
11+
* [Release Process](release_process.md)

doc/ADR/release_process.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Release Process
2+
3+
**Date**: 8-10-2020
4+
**Author**: Fotis Koutoulakis, [email protected]
5+
**Domain**: Release & Packaging
6+
7+
## Process
8+
9+
The current process we follow through to make a new release is the following:
10+
11+
1. At the point in time we want to make the release, we make a change to
12+
`src/config.inc`, and update the configuration variable `CBMC_VERSION`.
13+
This is important as it informs the various tools of the current version
14+
of CBMC.
15+
16+
(This needs to be pushed as a PR, and after it gets merged we move on to:)
17+
18+
2. Then we make a `git tag` out of that commit, and push it to github. The
19+
tag needs to be of the form `cbmc-<version>` with version being a version
20+
number of the form of `x.y.z`, with `x` denoting the major version, `y`
21+
denoting the minor version, and `z` identifying the patch version (useful
22+
for a hotfix or patch.)
23+
24+
At this point, the rest of the process is automated, so we don't need to do
25+
anything more, but the process is described below for reference:
26+
27+
3. `.github/workflows/regular-release.yaml` gets triggered on the `push`
28+
of the tag, and creates a Github release of the version that was
29+
described in thetag pushed (so, tag `cbmc-5.15.20` is going to
30+
create the release titled `cbmc-5.15.20` on the release page).
31+
32+
4. `.github/workflows/release-packages.yaml` gets triggered automatically
33+
at the creation of the release, and its job is to build packages for
34+
Windows, Ubuntu 18.04 and Ubuntu 20.04 (for now, we may support more
35+
specific Ubuntu versions later) and attaches them (after it has finished
36+
building them) to the release page as release artifacts.
37+
38+
It also makes a PR to the homebrew repository that updates the version
39+
of CBMC in homebrew. That's then approved and merged by the maintainers
40+
of homebrew.
41+
42+
## Constraints
43+
44+
Initial design of the release process suggested that the release cadence
45+
of CBMC was going to be one regular release (incrementing the `y` part
46+
of the version) every two weeks, on Thursday.
47+
48+
Originally we wanted to automate this part, but we were limited by the
49+
fact that we needed to update `src/config.inc` before doing the release,
50+
and that couldn't be done in an automated fashion, as any update needs
51+
to go through a PR, and gets stuck on code-owners approvals, making the
52+
whole process more manual than intended.
53+
54+
Following this original limitation, we decided to settle on doing manual
55+
releases every two weeks, but having the process being initiated by a
56+
developer manually making the change to `src/config.inc`, and after that
57+
has been merged, mark that specific commit as with a version tag, and push
58+
that version tag to Github. At that point, the rest of the process is automated.
59+
60+
The change to the current implementation was part of https://github.com/diffblue/cbmc/pull/5517.

0 commit comments

Comments
 (0)