diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a465f232a164a..2391b383e55aa 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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 diff --git a/scripts/setup/macos/install_viewer.sh b/scripts/setup/macos/install_viewer.sh new file mode 100755 index 0000000000000..55c8d019f715b --- /dev/null +++ b/scripts/setup/macos/install_viewer.sh @@ -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 + +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 +brew install aws/tap/cbmc-viewer diff --git a/scripts/setup/install_viewer.sh b/scripts/setup/ubuntu/install_viewer.sh similarity index 100% rename from scripts/setup/install_viewer.sh rename to scripts/setup/ubuntu/install_viewer.sh