-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #536 from diffblue/ebmc-release-flow
CI: add release flow for Debian 22.04 binaries
- Loading branch information
Showing
2 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
name: Upload additional release assets | ||
jobs: | ||
ubuntu-22_04-package: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Fetch dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends -yq gcc g++ jq flex bison libxml2-utils ccache | ||
- name: Prepare ccache | ||
uses: actions/cache@v4 | ||
with: | ||
save-always: true | ||
path: .ccache | ||
key: ${{ runner.os }}-20.04-make-gcc-${{ github.ref }}-${{ github.sha }}-PR | ||
restore-keys: | | ||
${{ runner.os }}-20.04-make-gcc-${{ github.ref }} | ||
${{ runner.os }}-20.04-make-gcc | ||
- name: ccache environment | ||
run: | | ||
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV | ||
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV | ||
- name: Get minisat | ||
run: make -C lib/cbmc/src minisat2-download | ||
- name: Build with make | ||
run: make -C src -j2 CXX="ccache g++" | ||
- name: Run the ebmc tests with SAT | ||
run: make -C regression/ebmc test | ||
- name: Run the verilog tests | ||
run: make -C regression/verilog test | ||
- name: Print ccache stats | ||
run: ccache -s | ||
- name: Create packages | ||
id: create_packages | ||
run: | | ||
VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2) | ||
mkdir -p ebmc-${VERSION}/DEBIAN | ||
mkdir -p ebmc-${VERSION}/usr/bin | ||
cp src/ebmc/ebmc ebmc-${VERSION}/usr/bin | ||
cat << EOM > ebmc-${VERSION}/DEBIAN/control | ||
Package: ebmc | ||
Version: ${VERSION} | ||
Architecture: amd64 | ||
Maintainer: Daniel Kroening <[email protected]> | ||
Depends: | ||
Installed-Size: 6600 | ||
Homepage: http://www.cprover.org/ebmc/ | ||
Description: The EBMC Model Checker | ||
EOM | ||
chown root:root -R ebmc-${VERSION} | ||
dpkg -b ebmc-${VERSION} | ||
deb_package_name="$(ls *.deb)" | ||
echo "deb_package=./build/$deb_package_name" >> $GITHUB_OUTPUT | ||
echo "deb_package_name=ubuntu-22.04-$deb_package_name" >> $GITHUB_OUTPUT | ||
- name: Get release info | ||
id: get_release_info | ||
uses: bruceadams/[email protected] | ||
- name: Upload binary packages | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.get_release_info.outputs.upload_url }} | ||
asset_path: ${{ steps.create_packages.outputs.deb_package }} | ||
asset_name: ${{ steps.create_packages.outputs.deb_package_name }} | ||
asset_content_type: application/x-deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'ebmc-*' | ||
|
||
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 | ||
with: | ||
msg: ${{ github.ref }} | ||
seperator: '/' | ||
- uses: jungwinter/split@v2 | ||
id: split-version | ||
with: | ||
msg: ${{ steps.split.outputs._2 }} | ||
seperator: '-' | ||
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: | ||
EBMC_VERSION: ${{ needs.get-version-information.outputs.version }} | ||
with: | ||
tag_name: ebmc-${{ env.EBMC_VERSION }} | ||
release_name: ebmc-${{ env.EBMC_VERSION }} | ||
draft: false | ||
prerelease: false | ||
body: | | ||
This is EBMC version ${{ env.EBMC_VERSION }}. | ||
## Ubuntu | ||
On Ubuntu, install EBMC by downloading the *.deb package below for your version of Ubuntu and install with | ||
```sh | ||
# Ubuntu 22: | ||
$ dpkg -i ubuntu-22.04-ebmc-${{ env.EBMC_VERSION }}-Linux.deb | ||
``` |