Skip to content

Commit

Permalink
Fix cbmc installation in CI
Browse files Browse the repository at this point in the history
The step 'install latest CBMC' in 'run_cbmc_proofs' CI workflow seems to be failing sporadically.
Sometimes the failure disappears when the CI job is re-run but sometimes the failure does not disappear.

The error looks like:

jq: error (at <stdin>:1): Cannot index string with string "assets"
Error: Process completed with exit code 1.

This commit tries to fix the error by changing the source of CBMC package to https://api.github.com/repos/diffblue/cbmc/releases/latest.
  • Loading branch information
qinheping committed Sep 26, 2023
1 parent 2c8f025 commit 159b633
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/proof_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
if: ${{ env.CBMC_VERSION == 'latest' }}
shell: bash
run: |
# Search within 5 most recent releases for latest available package
CBMC_REL="https://api.github.com/repos/diffblue/cbmc/releases?page=1&per_page=5"
CBMC_DEB=$(curl -s $CBMC_REL | jq -r '.[].assets[].browser_download_url' | grep -e 'ubuntu-20.04' | head -n 1)
# Install the latest available package
CBMC_REL="https://api.github.com/repos/diffblue/cbmc/releases/latest"
CBMC_DEB=$(curl -s $CBMC_REL | jq -r '.assets[].browser_download_url' | grep -e 'ubuntu-20.04' | head -n 1)
CBMC_ARTIFACT_NAME=$(basename $CBMC_DEB)
curl -o $CBMC_ARTIFACT_NAME -L $CBMC_DEB
sudo dpkg -i $CBMC_ARTIFACT_NAME
Expand Down

0 comments on commit 159b633

Please sign in to comment.