Skip to content

Commit 05fecdd

Browse files
authored
Merge pull request #536 from diffblue/ebmc-release-flow
CI: add release flow for Debian 22.04 binaries
2 parents 8c12e38 + 72c1a77 commit 05fecdd

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed

.github/workflows/ebmc-packages.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
name: Upload additional release assets
6+
jobs:
7+
ubuntu-22_04-package:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
submodules: recursive
13+
- name: Fetch dependencies
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install --no-install-recommends -yq gcc g++ jq flex bison libxml2-utils ccache
17+
- name: Prepare ccache
18+
uses: actions/cache@v4
19+
with:
20+
save-always: true
21+
path: .ccache
22+
key: ${{ runner.os }}-20.04-make-gcc-${{ github.ref }}-${{ github.sha }}-PR
23+
restore-keys: |
24+
${{ runner.os }}-20.04-make-gcc-${{ github.ref }}
25+
${{ runner.os }}-20.04-make-gcc
26+
- name: ccache environment
27+
run: |
28+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
29+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
30+
- name: Get minisat
31+
run: make -C lib/cbmc/src minisat2-download
32+
- name: Build with make
33+
run: make -C src -j2 CXX="ccache g++"
34+
- name: Run the ebmc tests with SAT
35+
run: make -C regression/ebmc test
36+
- name: Run the verilog tests
37+
run: make -C regression/verilog test
38+
- name: Print ccache stats
39+
run: ccache -s
40+
- name: Create packages
41+
id: create_packages
42+
run: |
43+
VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)
44+
mkdir -p ebmc-${VERSION}/DEBIAN
45+
mkdir -p ebmc-${VERSION}/usr/bin
46+
cp src/ebmc/ebmc ebmc-${VERSION}/usr/bin
47+
cat << EOM > ebmc-${VERSION}/DEBIAN/control
48+
Package: ebmc
49+
Version: ${VERSION}
50+
Architecture: amd64
51+
Maintainer: Daniel Kroening <[email protected]>
52+
Depends:
53+
Installed-Size: 6600
54+
Homepage: http://www.cprover.org/ebmc/
55+
Description: The EBMC Model Checker
56+
EOM
57+
chown root:root -R ebmc-${VERSION}
58+
dpkg -b ebmc-${VERSION}
59+
deb_package_name="$(ls *.deb)"
60+
echo "deb_package=./build/$deb_package_name" >> $GITHUB_OUTPUT
61+
echo "deb_package_name=ubuntu-22.04-$deb_package_name" >> $GITHUB_OUTPUT
62+
- name: Get release info
63+
id: get_release_info
64+
uses: bruceadams/[email protected]
65+
- name: Upload binary packages
66+
uses: actions/upload-release-asset@v1
67+
with:
68+
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
69+
asset_path: ${{ steps.create_packages.outputs.deb_package }}
70+
asset_name: ${{ steps.create_packages.outputs.deb_package_name }}
71+
asset_content_type: application/x-deb

.github/workflows/ebmc-release.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on:
2+
push:
3+
tags:
4+
- 'ebmc-*'
5+
6+
name: Create Release
7+
8+
jobs:
9+
get-version-information:
10+
name: Get Version Information
11+
runs-on: ubuntu-20.04
12+
outputs:
13+
version: ${{ steps.split-version.outputs._1 }}
14+
steps:
15+
- uses: jungwinter/split@v2
16+
id: split
17+
with:
18+
msg: ${{ github.ref }}
19+
seperator: '/'
20+
- uses: jungwinter/split@v2
21+
id: split-version
22+
with:
23+
msg: ${{ steps.split.outputs._2 }}
24+
seperator: '-'
25+
perform-release:
26+
name: Perform Release
27+
runs-on: ubuntu-20.04
28+
needs: get-version-information
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
- name: Create release
33+
uses: actions/create-release@v1
34+
env:
35+
EBMC_VERSION: ${{ needs.get-version-information.outputs.version }}
36+
with:
37+
tag_name: ebmc-${{ env.EBMC_VERSION }}
38+
release_name: ebmc-${{ env.EBMC_VERSION }}
39+
draft: false
40+
prerelease: false
41+
body: |
42+
This is EBMC version ${{ env.EBMC_VERSION }}.
43+
44+
## Ubuntu
45+
46+
On Ubuntu, install EBMC by downloading the *.deb package below for your version of Ubuntu and install with
47+
48+
```sh
49+
# Ubuntu 22:
50+
$ dpkg -i ubuntu-22.04-ebmc-${{ env.EBMC_VERSION }}-Linux.deb
51+
```

0 commit comments

Comments
 (0)