Skip to content

Commit

Permalink
Merge pull request #709 from GaloisInc/fix-yices-ci
Browse files Browse the repository at this point in the history
CI updates to assist in diagnosing dependency installation failures and add cache flushing ability for all workflows.
  • Loading branch information
kquick authored Mar 31, 2021
2 parents 6916fea + 9e6278b commit 427bfaf
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
18 changes: 9 additions & 9 deletions .github/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ install_z3() {
macOS) file="osx-10.14.6.zip" ;;
Windows) file="win.zip" ;;
esac
curl -o z3.zip -sL "https://github.com/Z3Prover/z3/releases/download/z3-$Z3_VERSION/z3-$Z3_VERSION-x64-$file"
curl -o z3.zip -L "https://github.com/Z3Prover/z3/releases/download/z3-$Z3_VERSION/z3-$Z3_VERSION-x64-$file"

if $IS_WIN; then 7z x -bd z3.zip; else unzip z3.zip; fi
cp z3-*/bin/z3$EXT $BIN/z3$EXT
Expand All @@ -65,9 +65,9 @@ install_cvc4() {
esac
# Temporary workaround
if [[ "$RUNNER_OS" == "Linux" ]]; then
curl -o cvc4$EXT -sL "https://cvc4.cs.stanford.edu/downloads/builds/x86_64-linux-opt/unstable/cvc4-2020-08-18-x86_64-linux-opt"
curl -o cvc4$EXT -L "https://cvc4.cs.stanford.edu/downloads/builds/x86_64-linux-opt/unstable/cvc4-2020-08-18-x86_64-linux-opt"
else
curl -o cvc4$EXT -sL "https://github.com/CVC4/CVC4/releases/download/$version/cvc4-$version-$file"
curl -o cvc4$EXT -L "https://github.com/CVC4/CVC4/releases/download/$version/cvc4-$version-$file"
fi
$IS_WIN || chmod +x cvc4$EXT
mv cvc4$EXT "$BIN/cvc4$EXT"
Expand All @@ -81,7 +81,7 @@ install_yices() {
macOS) file="apple-darwin18.7.0-static-gmp.tar.gz" ;;
Windows) file="pc-mingw32-static-gmp.zip" && ext=".zip" ;;
esac
curl -o "yices$ext" -sL "https://yices.csl.sri.com/releases/$YICES_VERSION/yices-$YICES_VERSION-x86_64-$file"
curl -o "yices$ext" -L "https://yices.csl.sri.com/releases/$YICES_VERSION/yices-$YICES_VERSION-x86_64-$file"

if $IS_WIN; then
7z x -bd "yices$ext"
Expand Down Expand Up @@ -123,7 +123,7 @@ install_llvm() {
if [[ "$RUNNER_OS" = "Linux" ]]; then
sudo apt-get update -q && sudo apt-get install -y clang-10 llvm-10-tools
elif [[ "$RUNNER_OS" = "macOS" ]]; then
brew install llvm@10
brew install llvm@11
elif [[ "$RUNNER_OS" = "Windows" ]]; then
choco install llvm
else
Expand All @@ -133,11 +133,11 @@ install_llvm() {
}

install_system_deps() {
install_z3 &
install_z3
# install_cvc4 &
install_yices &
install_llvm &
wait
install_yices
install_llvm
# wait
export PATH=$PWD/$BIN:$PATH
echo "$PWD/$BIN" >> $GITHUB_PATH
is_exe "$BIN" z3 && is_exe "$BIN" yices
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/crucible-wasm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
pull_request:
workflow_dispatch:

# The CACHE_VERSION can be updated to force the use of a new cache if
# the current cache contents become corrupted/invalid. This can
# sometimes happen when (for example) the OS version is changed but
# older .so files are cached, which can have various effects
# (e.g. cabal complains it can't find a valid version of the "happy"
# tool).
#
# This also periodically happens on MacOS builds due to a tar bug
# (symptom: "No suitable image found ... unknown file type, first
# eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00")
env:
CACHE_VERSION: 1

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -54,9 +67,9 @@ jobs:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
key: ${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
restore-keys: |
cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
- shell: bash
run: .github/ci.sh install_system_deps
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/crux-llvm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ on:
pull_request:
workflow_dispatch:

# The CACHE_VERSION can be updated to force the use of a new cache if
# the current cache contents become corrupted/invalid. This can
# sometimes happen when (for example) the OS version is changed but
# older .so files are cached, which can have various effects
# (e.g. cabal complains it can't find a valid version of the "happy"
# tool).
#
# This also periodically happens on MacOS builds due to a tar bug
# (symptom: "No suitable image found ... unknown file type, first
# eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00")
env:
CACHE_VERSION: 1

jobs:
outputs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,9 +84,9 @@ jobs:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
key: ${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
restore-keys: |
cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
- shell: bash
run: .github/ci.sh install_system_deps
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/crux-mir-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ on:
# older .so files are cached, which can have various effects
# (e.g. cabal complains it can't find a valid version of the "happy"
# tool).
#
# This also periodically happens on MacOS builds due to a tar bug
# (symptom: "No suitable image found ... unknown file type, first
# eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00")
env:
CACHE_VERSION: 1
CACHE_VERSION: 2

jobs:
outputs:
Expand Down

0 comments on commit 427bfaf

Please sign in to comment.