1
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
# SPDX-License-Identifier: MIT-0
3
- # CBMC starter kit 2.9
3
+ # CBMC starter kit 2.10
4
4
name : Run CBMC proofs
5
5
on :
6
6
push :
@@ -38,11 +38,11 @@ jobs:
38
38
- name : Parse config file
39
39
run : |
40
40
CONFIG_FILE='.github/workflows/proof_ci_resources/config.yaml'
41
- for setting in cadical-tag cbmc-version cbmc-viewer-version kissat-tag litani-version proofs-dir run-cbmc-proofs-command; do
41
+ for setting in cadical-tag cbmc-version cbmc-viewer-version kissat-tag litani-version z3-version bitwuzla-version proofs-dir run-cbmc-proofs-command; do
42
42
VAR=$(echo $setting | tr "[:lower:]" "[:upper:]" | tr - _)
43
43
echo "${VAR}"=$(yq .$setting $CONFIG_FILE) >> $GITHUB_ENV
44
44
done
45
- - name : Ensure CBMC, CBMC viewer, Litani versions have been specified
45
+ - name : Ensure CBMC, CBMC viewer, Litani, Z3, Bitwuzla versions have been specified
46
46
shell : bash
47
47
run : |
48
48
should_exit=false
58
58
echo "You must specify a Litani version (e.g. 'latest' or '1.27.0')"
59
59
should_exit=true
60
60
fi
61
+ if [ "${{ env.Z3_VERSION }}" == "" ]; then
62
+ echo "You must specify a Z3 version (e.g. '4.13.0')"
63
+ should_exit=true
64
+ fi
65
+ if [ "${{ env.Z3_VERSION }}" == "latest" ]; then
66
+ echo "Z3 latest not supported at this time. You must specify an exact Z3 version (e.g. '4.13.0')"
67
+ should_exit=true
68
+ fi
69
+ if [ "${{ env.BITWUZLA_VERSION }}" == "" ]; then
70
+ echo "You must specify a Bitwuzla version (e.g. '0.5.0')"
71
+ should_exit=true
72
+ fi
73
+ if [ "${{ env.BITWUZLA_VERSION }}" == "latest" ]; then
74
+ echo "Bitwuzla latest not supported at this time. You must specify an exact version (e.g. '0.5.0')"
75
+ should_exit=true
76
+ fi
61
77
if [[ "$should_exit" == true ]]; then exit 1; fi
62
78
- name : Install latest CBMC
63
79
if : ${{ env.CBMC_VERSION == 'latest' }}
@@ -84,15 +100,15 @@ jobs:
84
100
run : |
85
101
CBMC_VIEWER_REL="https://api.github.com/repos/model-checking/cbmc-viewer/releases/latest"
86
102
CBMC_VIEWER_VERSION=$(curl -s $CBMC_VIEWER_REL --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r .name | sed 's/viewer-//')
87
- pip3 install cbmc-viewer==$CBMC_VIEWER_VERSION
103
+ sudo pip3 install cbmc-viewer==$CBMC_VIEWER_VERSION
88
104
- name : Install CBMC viewer ${{ env.CBMC_VIEWER_VERSION }}
89
105
if : ${{ env.CBMC_VIEWER_VERSION != 'latest' }}
90
106
shell : bash
91
107
run : |
92
108
sudo apt-get update
93
109
sudo apt-get install --no-install-recommends --yes \
94
110
build-essential universal-ctags
95
- pip3 install cbmc-viewer==${{ env.CBMC_VIEWER_VERSION }}
111
+ sudo pip3 install cbmc-viewer==${{ env.CBMC_VIEWER_VERSION }}
96
112
- name : Install latest Litani
97
113
if : ${{ env.LITANI_VERSION == 'latest' }}
98
114
shell : bash
@@ -114,6 +130,37 @@ jobs:
114
130
sudo apt-get update
115
131
sudo apt-get install --no-install-recommends --yes ./litani.deb
116
132
rm ./litani.deb
133
+ - name : Install Z3 ${{ env.Z3_VERSION }}
134
+ if : ${{ env.Z3_VERSION != 'latest' }}
135
+ shell : bash
136
+ run : |
137
+ curl -o z3.zip -L \
138
+ https://github.com/Z3Prover/z3/releases/download/z3-${{ env.Z3_VERSION }}/z3-${{ env.Z3_VERSION }}-x64-glibc-2.31.zip
139
+ sudo apt-get install --no-install-recommends --yes unzip
140
+ unzip z3.zip
141
+ cd z3-${{ env.Z3_VERSION }}-x64-glibc-2.31/bin \
142
+ && echo "Adding $(pwd) to PATH for Z3" \
143
+ && echo "$(pwd)" >> $GITHUB_PATH
144
+ rm ../../z3.zip
145
+ - name : Build and Install Bitwuzla ${{ env.BITWUZLA_VERSION }}
146
+ if : ${{ env.BITWUZLA_VERSION != 'latest' }}
147
+ shell : bash
148
+ run : |
149
+ echo "Installing Bitwuzla dependencies"
150
+ sudo apt-get update
151
+ sudo apt-get install --no-install-recommends --yes libgmp-dev cmake
152
+ sudo pip3 install meson
153
+ echo "Building Bitwuzla"
154
+ BITWUZLA_TAG_NAME=${{ env.BITWUZLA_VERSION }}
155
+ git clone https://github.com/bitwuzla/bitwuzla.git \
156
+ && cd bitwuzla \
157
+ && git checkout $BITWUZLA_TAG_NAME \
158
+ && ./configure.py \
159
+ && cd build \
160
+ && ninja;
161
+ cd src/main \
162
+ && echo "Adding $(pwd) to PATH for Bitwuzla" \
163
+ && echo "$(pwd)" >> $GITHUB_PATH
117
164
- name : Install ${{ env.KISSAT_TAG }} kissat
118
165
if : ${{ env.KISSAT_TAG != '' }}
119
166
shell : bash
0 commit comments