Skip to content

Commit

Permalink
Fix cbmc-update CI job (rust-lang#3156)
Browse files Browse the repository at this point in the history
We had a spurious update attempt logged in rust-lang#3155 for the job prior to
this fix would empty out the version strings. This was caused by use of
undefined variables.

Resolves: rust-lang#3155

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 23, 2024
1 parent a4e69eb commit 180e10c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cbmc-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
grep ^CBMC_VERSION kani-dependencies >> $GITHUB_ENV
grep ^CBMC_VERSION kani-dependencies | sed 's/"//g' >> $GITHUB_ENV
CBMC_LATEST=$(gh -R diffblue/cbmc release list | grep Latest | awk '{print $1}' | cut -f2 -d-)
echo "CBMC_LATEST=$CBMC_LATEST" >> $GITHUB_ENV
# check whether the version has changed at all
Expand All @@ -47,8 +47,8 @@ jobs:
elif ! git ls-remote --exit-code origin cbmc-$CBMC_LATEST ; then
CBMC_LATEST_MAJOR=$(echo $CBMC_LATEST | cut -f1 -d.)
CBMC_LATEST_MINOR=$(echo $CBMC_LATEST | cut -f2 -d.)
sed -i "s/^CBMC_MAJOR=.*/CBMC_MAJOR=\"$CBMC_MAJOR\"/" kani-dependencies
sed -i "s/^CBMC_MINOR=.*/CBMC_MINOR=\"$CBMC_MINOR\"/" kani-dependencies
sed -i "s/^CBMC_MAJOR=.*/CBMC_MAJOR=\"$CBMC_LATEST_MAJOR\"/" kani-dependencies
sed -i "s/^CBMC_MINOR=.*/CBMC_MINOR=\"$CBMC_LATEST_MINOR\"/" kani-dependencies
sed -i "s/^CBMC_VERSION=.*/CBMC_VERSION=\"$CBMC_LATEST\"/" kani-dependencies
git diff
if ! ./scripts/kani-regression.sh ; then
Expand Down

0 comments on commit 180e10c

Please sign in to comment.