|
| 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 |
0 commit comments