|
1 | 1 | on: |
2 | 2 | release: |
3 | | - types: [created] |
| 3 | + types: [published] |
4 | 4 |
|
5 | 5 | name: Upload additional release assets |
6 | 6 | jobs: |
7 | 7 | ubuntu-22_04-package: |
| 8 | + name: Ubuntu 22.04 |
8 | 9 | runs-on: ubuntu-22.04 |
9 | 10 | steps: |
10 | 11 | - uses: actions/checkout@v4 |
|
69 | 70 | asset_path: ${{ steps.create_packages.outputs.deb_package }} |
70 | 71 | asset_name: ${{ steps.create_packages.outputs.deb_package_name }} |
71 | 72 | asset_content_type: application/x-deb |
| 73 | + |
| 74 | + centos8-package: |
| 75 | + name: CentOS 8 |
| 76 | + runs-on: ubuntu-22.04 |
| 77 | + container: |
| 78 | + image: centos:8 |
| 79 | + steps: |
| 80 | + - name: Install Packages |
| 81 | + run: | |
| 82 | + sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Linux-* |
| 83 | + yum -y install make gcc-c++ flex bison git rpmdevtools wget |
| 84 | + wget --no-verbose https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz |
| 85 | + tar xJf ccache-4.8.3-linux-x86_64.tar.xz |
| 86 | + cp ccache-4.8.3-linux-x86_64/ccache /usr/bin/ |
| 87 | + - name: cache for ccache |
| 88 | + uses: actions/cache@v4 |
| 89 | + with: |
| 90 | + path: /github/home/.cache/ccache |
| 91 | + save-always: true |
| 92 | + key: ${{ runner.os }}-centos8-make-gcc-${{ github.ref }}-${{ github.sha }}-PR |
| 93 | + restore-keys: ${{ runner.os }}-centos8-make-gcc- |
| 94 | + - uses: actions/checkout@v4 |
| 95 | + with: |
| 96 | + submodules: recursive |
| 97 | + - name: Zero ccache stats and limit in size |
| 98 | + run: ccache -z --max-size=500M |
| 99 | + - name: ccache path |
| 100 | + run: ccache -p | grep cache_dir |
| 101 | + - name: Get minisat |
| 102 | + run: make -C lib/cbmc/src minisat2-download |
| 103 | + - name: Build with make |
| 104 | + run: make CXX="ccache g++ -Wno-class-memaccess" LIBS="-lstdc++fs" -C src -j2 |
| 105 | + - name: Run the ebmc tests with SAT |
| 106 | + run: | |
| 107 | + rm regression/ebmc/neural-liveness/counter1.desc |
| 108 | + make -C regression/ebmc test |
| 109 | + - name: Run the verilog tests |
| 110 | + run: make -C regression/verilog test |
| 111 | + - name: Create .rpm |
| 112 | + run | |
| 113 | + VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2) |
| 114 | + rpmdev-setuptree |
| 115 | + |
| 116 | + cat > ~/rpmbuild/SPECS/ebmc.spec << EOM |
| 117 | + #This is a spec file for ebmc |
| 118 | + |
| 119 | + Summary: EBMC Model Checker |
| 120 | + License: BSD 3-clause |
| 121 | + Name: ebmc |
| 122 | + Version: ${VERSION} |
| 123 | + Release: 1 |
| 124 | + Prefix: /usr |
| 125 | + Group: Development/Tools |
| 126 | + Requires: |
| 127 | + |
| 128 | + %description |
| 129 | + EBMC is a formal verification tool for hardware designs. |
| 130 | + |
| 131 | + %prep |
| 132 | + |
| 133 | + %build |
| 134 | + |
| 135 | + %install |
| 136 | + mkdir %{buildroot}/usr |
| 137 | + mkdir %{buildroot}/usr/lib |
| 138 | + mkdir %{buildroot}/usr/bin |
| 139 | + mkdir %{buildroot}/usr/lib/ebmc |
| 140 | + cp ${SRC}/src/ebmc/jcover %{buildroot}/usr/bin/ |
| 141 | + |
| 142 | + %files |
| 143 | + /usr/bin/ebmc |
| 144 | + EOM |
| 145 | + |
| 146 | + echo Building ebmc-${VERSION}-1.x86_64.rpm |
| 147 | + (cd ~/rpmbuild/SPECS ; rpmbuild -v -bb ebmc.spec ) |
| 148 | + - name: Print ccache stats |
| 149 | + run: ccache -s |
0 commit comments