From 56250ae8a89c9319b67510a984a70a0c01bb4a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sat, 4 Feb 2023 01:39:54 -0300 Subject: [PATCH] Try dynamic build --- .github/scripts/install-libff.sh | 1 + .github/workflows/ci.yml | 6 ++++++ package.yaml | 5 ++--- src/Main.hs | 3 --- stack.yaml | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/install-libff.sh b/.github/scripts/install-libff.sh index 8678c380..678567f3 100755 --- a/.github/scripts/install-libff.sh +++ b/.github/scripts/install-libff.sh @@ -36,6 +36,7 @@ fi if [ "$HOST_OS" = "Windows" ]; then ARGS+=("-G" "Ninja") + sed -i 's/find_library(GMP_LIBRARY gmp)/find_library(GMP_LIBRARY NAMES libgmp.a)/' CMakeLists.txt fi mkdir -p build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61dca822..c8c65dc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,12 @@ jobs: env: HOST_OS: ${{ runner.os }} + - name: Add libraries to PATH (Windows) + if: runner.os == 'Windows' + run: | + echo "${HOME}/.local/bin" >> $GITHUB_PATH + echo "${HOME}/.local/lib" >> $GITHUB_PATH + - name: Build Dependencies run: | stack build --ghc-options="-Werror" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies diff --git a/package.yaml b/package.yaml index a3af09c2..a301737f 100644 --- a/package.yaml +++ b/package.yaml @@ -62,15 +62,14 @@ when: - condition: os(darwin) extra-libraries: c++ ld-options: -Wl,-keep_dwarf_unwind + - condition: os(windows) + extra-libraries: stdc++ - condition: "!os(windows)" cpp-options: -DINTERACTIVE_UI dependencies: - brick - unix - vty - - condition: os(windows) - extra-libraries: - - gmp executables: echidna: diff --git a/src/Main.hs b/src/Main.hs index c2b65fdb..974a0bb9 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} module Main where @@ -158,9 +157,7 @@ overrideConfig config Options{..} = where overrideFormat cfg = case maybe cfg.uiConf.operationMode NonInteractive cliOutputFormat of -#ifdef INTERACTIVE_UI Interactive -> cfg -#endif NonInteractive Text -> cfg { uiConf = cfg.uiConf { operationMode = NonInteractive Text }} nonInteractive -> cfg { uiConf = cfg.uiConf { operationMode = nonInteractive } , solConf = cfg.solConf { quiet = True } diff --git a/stack.yaml b/stack.yaml index c5aec022..86962572 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,7 +5,7 @@ packages: extra-deps: - git: https://github.com/elopez/hevm.git - commit: 7aabbec288ad46604869bbb77a3285b95b85fb12 + commit: a108d8f344e2e2086ca2ada1fc8dd4227ea80bbf - restless-git-0.7@sha256:346a5775a586f07ecb291036a8d3016c3484ccdc188b574bcdec0a82c12db293,968 - s-cargot-0.1.4.0@sha256:61ea1833fbb4c80d93577144870e449d2007d311c34d74252850bb48aa8c31fb,3525