Skip to content

Commit ef93eaa

Browse files
authored
Merge pull request #557 from diffblue/ebmc-packages-fixup11
Fix ebmc release workflow
2 parents f9b5379 + 6f00d35 commit ef93eaa

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

.github/workflows/ebmc-release.yaml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
prerelease: false
4646

4747
ubuntu-22_04-package:
48-
name: Package for Ubuntu 22.04
48+
name: Package .deb
4949
runs-on: ubuntu-22.04
5050
needs: [perform-draft-release]
5151
outputs:
@@ -64,17 +64,17 @@ jobs:
6464
save-always: true
6565
path: .ccache
6666
key: ${{ runner.os }}-22.04-make-gcc-${{ github.ref }}-${{ github.sha }}-PR
67-
restore-keys: |
68-
${{ runner.os }}-22.04-make-gcc-${{ github.ref }}
69-
${{ runner.os }}-22.04-make-gcc
67+
restore-keys: ${{ runner.os }}-22.04-make-gcc
7068
- name: ccache environment
7169
run: |
7270
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
7371
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
7472
- name: Get minisat
7573
run: make -C lib/cbmc/src minisat2-download
7674
- name: Build with make
77-
run: make -C src -j4 CXX="ccache g++"
75+
run: |
76+
# -static-libstdc++ is insufficient, owing to varying GLIBC versions
77+
make -C src -j4 CXX="ccache g++" LINKFLAGS="-static"
7878
- name: Run the ebmc tests with SAT
7979
run: make -C regression/ebmc test
8080
- name: Run the verilog tests
@@ -100,10 +100,11 @@ jobs:
100100
Description: The EBMC Model Checker
101101
EOM
102102
sudo chown root:root -R ebmc-${VERSION}
103-
dpkg -b ebmc-${VERSION}
103+
# we give -Zxz since older Debian versions do not uncompress zstd
104+
dpkg-deb -Zxz -b ebmc-${VERSION}
104105
deb_package_name="$(ls *.deb)"
105106
echo "deb_package_path=$PWD/$deb_package_name" >> $GITHUB_OUTPUT
106-
echo "deb_package_name=ubuntu-22.04-$deb_package_name" >> $GITHUB_OUTPUT
107+
echo "deb_package_name=$deb_package_name" >> $GITHUB_OUTPUT
107108
- name: Upload binary packages
108109
uses: actions/upload-release-asset@v1
109110
env:
@@ -115,7 +116,7 @@ jobs:
115116
asset_content_type: application/x-deb
116117

117118
centos8-package:
118-
name: Package for CentOS 8
119+
name: Package .rpm
119120
runs-on: ubuntu-22.04
120121
needs: [perform-draft-release]
121122
outputs:
@@ -126,10 +127,12 @@ jobs:
126127
- name: Install Packages
127128
run: |
128129
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-*
129-
yum -y install make gcc-c++ flex bison git rpmdevtools wget
130-
wget --no-verbose https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz
131-
tar xJf ccache-4.8.3-linux-x86_64.tar.xz
132-
cp ccache-4.8.3-linux-x86_64/ccache /usr/bin/
130+
yum install -y dnf-plugins-core
131+
yum config-manager --set-enabled powertools
132+
yum -y install make gcc-c++ flex bison git rpmdevtools wget libstdc++-static
133+
wget --no-verbose https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1-linux-x86_64.tar.xz
134+
tar xJf ccache-4.9.1-linux-x86_64.tar.xz
135+
cp ccache-4.9.1-linux-x86_64/ccache /usr/bin/
133136
- name: cache for ccache
134137
uses: actions/cache@v4
135138
with:
@@ -147,7 +150,9 @@ jobs:
147150
- name: Get minisat
148151
run: make -C lib/cbmc/src minisat2-download
149152
- name: Build with make
150-
run: make CXX="ccache g++ -Wno-class-memaccess" LIBS="-lstdc++fs" -C src -j4
153+
run: |
154+
# -static-libstdc++ suffices -- tested on CentOS, Fedora, Amazon Linux
155+
make CXX="ccache g++ -Wno-class-memaccess" LIBS="-lstdc++fs" LINKFLAGS="-static-libstdc++" -C src -j4
151156
- name: Print ccache stats
152157
run: ccache -s
153158
- name: Run the ebmc tests with SAT
@@ -196,7 +201,7 @@ jobs:
196201
(cd ~/rpmbuild/SPECS ; rpmbuild -v -bb ebmc.spec )
197202
rpm_package_name=ebmc-${VERSION}-1.x86_64.rpm
198203
echo "rpm_package_path=$HOME/rpmbuild/RPMS/x86_64/$rpm_package_name" >> $GITHUB_OUTPUT
199-
echo "rpm_package_name=centos8-$rpm_package_name" >> $GITHUB_OUTPUT
204+
echo "rpm_package_name=$rpm_package_name" >> $GITHUB_OUTPUT
200205
- name: Upload binary packages
201206
uses: actions/upload-release-asset@v1
202207
env:
@@ -217,23 +222,24 @@ jobs:
217222
EBMC_VERSION: ${{ needs.get-version-information.outputs.version }}
218223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219224
run: |
220-
cat > body << EOM
225+
cat << EOM > body
221226
This is EBMC version ${{ env.EBMC_VERSION }}.
222227
223-
## Ubuntu
228+
## Debian, Ubuntu and derivates
224229
225-
On Ubuntu, install EBMC by downloading the *.deb package below for your version of Ubuntu and install with
230+
For Debian and Ubuntu, install EBMC by downloading the *.deb package below and then run
226231
227-
```sh
232+
\`\`\`sh
228233
dpkg -i ${{ needs.ubuntu-22_04-package.outputs.deb_package_name }}
229-
```
234+
\`\`\`
230235
231-
## CentOS
236+
## Red Hat Linux and derivates
232237
233-
On CentOS, install EBMC by downloading the *.rpm package below for your version of CentOS and install with
238+
For Red Hat, CentOS, Fedora, Amazon Linux,
239+
install EBMC by downloading the *.rpm package below and then run
234240
235-
```sh
241+
\`\`\`sh
236242
rpm -i ${{ needs.centos8-package.outputs.rpm_package_name }}
237-
```
243+
\`\`\`
238244
EOM
239-
gh release edit ebmc-${{ env.EBMC_VERSION }} --draft=false --notes-file body
245+
gh release edit ebmc-${{ env.EBMC_VERSION }} --repo ${{ github.repository }} --draft=false --notes-file body

0 commit comments

Comments
 (0)