Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cbmc-viewer ci issues with Mac11 #1844

Merged
merged 7 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
shell: bash

- name: Install cbmc-viewer
run: ./scripts/setup/install_viewer.sh
run: ./scripts/setup/${{ inputs.os }}/install_viewer.sh
shell: bash

- name: Install Rust toolchain
Expand Down
20 changes: 20 additions & 0 deletions scripts/setup/macos/install_viewer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT

set -eu

# Install cbmc-viewer

# Source kani-dependencies to get CBMC_VIEWER_VERSION
source kani-dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not installing a specific version, then we shouldn't need to source kani-dependencies.


if [ -z "${CBMC_VIEWER_VERSION:-}" ]; then
echo "$0: Error: CBMC_VIEWER_VERSION is not specified"
exit 1
fi

set -x

# brew doesn't recognize specific versions of viewer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we likely to care? Should we ask the tap owners to keep pinned versions in the tap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't imagine this becoming a problem since viewer isn't updated that often and also brew install installs the latest version of viewer anyway. This patch is also just temporary I imagine, till the issue in github-actions gets fixed or till we find a way to add a path to pip install. This was just the quickest solution, to get everyone's PR's unblocked by CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the issue that's causing ci to break, I imagine - actions/runner-images#6507.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we push the fix to unblock us and we can figure out a better long term plan later? If actions/runner-images#6507 gets fixed, we could probably just revert these changes.

brew install aws/tap/cbmc-viewer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this always set at this point? Where is this tap added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brew install repo mitigates the need to add a tap but I could make that more explicit if it's safer.