|
1 | 1 | 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 |
15 | 7 |
|
16 | 8 | 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 |
19 | 12 | 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 }} |
22 | 14 | steps: |
23 | | - - uses: actions/checkout@v2 |
| 15 | + - uses: jungwinter/split@v1 |
| 16 | + id: split |
24 | 17 | 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 "db-ci-cprover@diffblue.com" |
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: '/' |
47 | 20 | perform-release: |
48 | | - needs: bump_cbmc_version |
| 21 | + name: Perform Release |
49 | 22 | runs-on: ubuntu-20.04 |
| 23 | + needs: get-version-information |
50 | 24 | 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 |
57 | 27 | - name: Create release |
58 | 28 | uses: actions/create-release@v1 |
59 | 29 | env: |
60 | 30 | GITHUB_TOKEN: ${{ secrets.DB_CI_CPROVER_ACCESS_TOKEN }} |
| 31 | + CBMC_TAG: ${{ needs.get-version-information.outputs.version }} |
61 | 32 | 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. |
64 | 82 | draft: false |
65 | 83 | prerelease: false |
66 | | - commitish: ${{ needs.bump_cbmc_version.outputs.bump_git_sha }} |
|
0 commit comments