Skip to content

Fix update-pr workflow #117

Fix update-pr workflow

Fix update-pr workflow #117

name: Run Differential Tests
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
run-differential-tests:
if: "!contains(github.event.pull_request.labels.*.name, 'no-test')"
name: Run Differential Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" |
jq -r '.tag_name'
}
cbmc_latest_release=$(get_latest_release diffblue/cbmc)
litani_latest_release=$(get_latest_release awslabs/aws-build-accumulator)
curl -o cbmc.deb -L \
https://github.com/diffblue/cbmc/releases/download/$cbmc_latest_release/ubuntu-20.04-$cbmc_latest_release-Linux.deb
curl -o litani.deb -L \
https://github.com/awslabs/aws-build-accumulator/releases/download/$litani_latest_release/litani-$litani_latest_release.deb
sudo apt-get update \
&& sudo apt-get install --no-install-recommends --yes \
./cbmc.deb \
./litani.deb \
ninja-build \
universal-ctags
rm -f cbmc.deb litani.deb
python3 -m pip install jinja2 cbmc-viewer
- name: Proof Run
run: |
cd tests/repo-tests/coreHTTP
make clone
make build
- name: Run Differential Test
run: |
git checkout -b pr
./tests/bin/difference.py --proofs tests/repo-tests/coreHTTP/coreHTTP/test/cbmc/proofs \
--viewer-repository $(pwd) \
--commits ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}