-
Notifications
You must be signed in to change notification settings - Fork 263
106 lines (85 loc) · 3.78 KB
/
regular-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
on:
push:
tags:
- 'cbmc-*'
name: Create Release
jobs:
get-version-information:
name: Get Version Information
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.split-version.outputs._1 }}
steps:
- uses: jungwinter/split@v2
id: split-ref
with:
msg: ${{ github.ref }}
separator: '/'
- uses: jungwinter/split@v2
id: split-version
with:
msg: ${{ steps.split-ref.outputs._2 }}
separator: '-'
perform-release:
name: Perform Release
runs-on: ubuntu-20.04
needs: get-version-information
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.DB_CI_CPROVER_ACCESS_TOKEN }}
CBMC_VERSION: ${{ needs.get-version-information.outputs.version }}
with:
tag_name: cbmc-${{ env.CBMC_VERSION }}
release_name: cbmc-${{ env.CBMC_VERSION }}
draft: false
prerelease: false
body: |
This is CBMC version ${{ env.CBMC_VERSION }}.
## MacOS
On MacOS, install CBMC using [Homebrew](https://brew.sh/) with
```sh
brew install cbmc
```
or upgrade (if it's already been installed) with:
```sh
brew upgrade cbmc
```
## Ubuntu
On Ubuntu, install CBMC by downloading the *.deb package below for your version of Ubuntu and install with
```sh
# Ubuntu 20:
$ dpkg -i ubuntu-20.04-cbmc-${{ env.CBMC_VERSION }}-Linux.deb
```
## Windows
On Windows, install CBMC by downloading the `cbmc-${{ env.CBMC_VERSION }}-win64.msi` installer below, double-clicking on the installer to run it, and adding the folder `C:\Program Files\cbmc\bin` in your `PATH` environment variable.
For installation from the windows command prompt, run:
```sh
msiexec /i cbmc-${{ env.CBMC_VERSION }}-win64.msi
PATH="C:\Program Files\cbmc\bin";%PATH%
```
Note that we depend on the Visual C++ redistributables. You likely already have these, if not please download and run vcredist.x64.exe from Microsoft to install them prior to running cbmc, or make sure you have Visual Studio 2019 installed.
You can download either [Visual Studio 2019 Community Edition](https://visualstudio.microsoft.com/vs/community/) or the [Visual C++ Redistributables](https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads) from Microsoft for free.
## Docker
We are also releasing new versions as images in [Dockerhub](https://hub.docker.com/r/diffblue/cbmc).
To run the CProver suite of tools under a Docker container, make sure that
[Docker](https://www.docker.com/) is already installed in your system and
set up correctly, and then issue:
```sh
$ docker run -it diffblue/cbmc:${{ env.CBMC_VERSION }}
#
```
That will initialise an execution of the container based on the image pushed
as part of this release. The CProver tools are present in the `$PATH` of the
container.
- name: Slack notification of successful release
uses: rtCamp/action-slack-notify@v2
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' && 'Successful creation of new CBMC release page' || 'Failed to create new CBMC release page' }}"