Adding SMT2 queries from hevm
symbolic execution framework running on the eth-sc-comp
set
#55
Workflow file for this run
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
name: Check Pull Request | |
on: [pull_request] | |
jobs: | |
basic-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check if pull request removes benchmarks | |
run: | | |
if [[ $(git diff --diff-filter=D --name-only HEAD^1 HEAD) != "" ]] ; then | |
echo "This pull requests removes benchmarks!" ; exit 1 | |
fi | |
- name: Check if duplicated benchmarks are present | |
run: | | |
DUPES=`find . ! -empty -type f -name *smt2 -exec md5sum {} + | sort | uniq -w32 -d | cut -d ' ' -f 3` | |
if ! [[ "[$DUPES]" = "[]" ]]; then | |
echo "Some benchmarks are duplicates of other benchmarks." | |
echo $DUPES | |
exit 1 | |
fi | |
- name: Check if folder structure and filenames are correct | |
run: | | |
valid_filenames="^(incremental|non-incremental)\/[A-Z_]+\/20[012][0-9][01][0-9][0123][0-9]-.+\/.+\.smt2$" | |
status=0 | |
for added_file in `git diff --diff-filter=ACR --name-only HEAD^1 HEAD`; do | |
if ! [[ ${added_file} =~ $valid_filenames ]] ; then | |
echo "The file ${added_file} has an inappropriate path!" | |
status=1 | |
fi | |
if ! ./quick-check.sh ${added_file} ; then | |
status=1 | |
fi | |
done | |
exit $status | |
check-with-dolmen: | |
needs: basic-checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Cache Dolmen | |
id: dolmen-cache | |
uses: actions/cache@v3 | |
with: | |
key: dolmen-linux-amd64 | |
path: ./dolmen-linux-amd64 | |
- name: Install dolmen | |
run: | | |
if [ "[${{steps.dolmen-cache.outputs.cache-hit}}]" = "[]" ]; then | |
wget https://github.com/Gbury/dolmen/releases/download/v0.9/dolmen-linux-amd64 | |
fi | |
chmod +x ./dolmen-linux-amd64 | |
- name: Check files | |
run: | | |
status=0 | |
for added_file in `git diff --diff-filter=ACRM --name-only HEAD^1 HEAD`; do | |
./dolmen-linux-amd64 -i smt2 --strict=false --check-headers=true --header-lang-version=2.6 ${added_file} | |
if [ $? -ne 0 ] ; then | |
echo "Dolmen reported problems with ${added_file}." | |
status=1 | |
fi | |
done | |
exit $status | |