* flake.nix: static build support
Adds a "redistributable" flavor of Echidna that is fully static on
Linux, and mostly static on macOS.
* ci: add Nix & release workflow
Replaces previous Nix workflow
* ci: release: add job timeouts
* ci: release: configure Cachix
* README: update echidna-bundle references to echidna-redistributable
* Fix TERMINFO path for Nix release builds on Linux
ncurses in Nix is built with a TERMINFO path that references `/nix`.
This causes the binaries fail when ran on non-nix systems, unless
TERMINFO=/usr/share/terminfo is exported. This patches the binaries
to use a more sensible default TERMINFO path.
See also commit f76a7f4a
* flake.nix: remove redundant stripping
* Update to GHC 9.4
* ci: Update to GHC 9.4
* ci: fix GHC 9.4 support on Windows
GHC 9.4 has changed toolchains to Clang, which causes issues when building
with our current setup. We perform the following changes to support
GHC 9.4 and later:
* Use MSYS2 CLANG64 MSYS. See https://gitlab.haskell.org/ghc/ghc/-/issues/22561
* Use MSYS2 minimal $PATH. There's many things in the default GitHub
environment that cause conflicts. To achieve this, we have to also
manually re-add the Stack, Cabal and GHC paths.
* Bump the Stack resolver. GHC 9.4.7 has some compilation fixes that
are good to have around.
* Replace the GHC linker with our MSYS2 linker. The GHC linker is old
(~LLVM 14?) and does not fully understand the static libraries
produced by the newer Clang 17 in MSYS2.
* Refactor the way we invoke Stack and take advantage of the Stack
config to indicate extra library and include paths.
* Drop the 'strip' workaround for the test suite, as it is not needed
any longer.
* Fix the linking of the standard C++ library. GHC 9.4 introduces a
nice way to do it in a platform-independent way, but unfortunately
it does not work properly in Nix and it attempts to link clang++
instead of libc++.so, so we have to use some trickery.
addDLL: stdc++ or dependencies not loaded. (Win32 error 126)
See also:
* https://gitlab.haskell.org/ghc/ghc/-/issues/22738
* https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.4?version_id=b60e52482a666d25638d59cd7e86851ddf971dc1#link-against-system-cxx-std-lib-instead-of-stdc
* hevm: pin to newer version supporting GHC 9.4
* ci: linux: update to GHC 9.4.7
* ci: do not cache Stack config
---------
Co-authored-by: Emilio López <emilio.lopez@trailofbits.com>
* Build static Linux binaries with musl
Statically building glibc can be problematic, e.g. it requires the same
(dynamic) glibc version in the system you're running the binary:
function hsnet_getaddrinfo: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
This changes the build workflow to build the Linux binaries on a musl environment.
* Add container used for static builds
* Adjust package guards to match after merge
* ci: Fix defaults duplication after merge
* ci: disable haskell setup when using a container
* ci: bump GHC to 9.2.7
* ci: Add README documenting container
* ci: unify cache artifacts
* ci: remove `mstksg/get-package`
This action has not been updated since 2019, and is currently causing
some deprecation warnings to show up. This replaces it with a few run
steps for each OS.
* ci: drop redundant Linux dependencies
These are already pre-installed on the GitHub runners:
autoconf is already the newest version (2.69-11.1).
automake is already the newest version (1:1.16.1-4ubuntu6).
libtool is already the newest version (2.4.6-14).
* ci: adjust caching
The stack rule missed the local workdir, and some keys were missing
hashes to make them get cleared when necessary.
* Actions: update action versions
* Actions: bump python to 3.8
Newer crytic-compile and slither support 3.8+
* Actions: remove old actions/cache workaround
* Actions: bump cachix action
* Actions: remove leftover branches in triggers
* Actions: run echidna tests in 0.8.x
* Actions: enable dependabot version updates
* Actions: fix cache version
* Revert "Actions: run echidna tests in 0.8.x"
This reverts commit e3749aff39.
harvey_baz.sol test fails too frequently under 0.8, it will need more
investigation.
* Dockerfile: make image slimmer, based on distroless
* GitHub Actions: configure docker buildx
* GitHub Actions: move to ghcr.io
* Move dockerfile, add solc-install wrapper
* Add solc-select to python environment
* Disable wheel caching
* Add debian-based image
* Build and tag both debian and distroless images
* Reorganize tags, use build and push action
* Add NVM variant
* Indicate Dockerfile path correctly
* Unify Debian variants
* Switch to Docker metadata action
* Improve Docker section on README
* Enable caching of layers
* Update action versions
* Move back to Ubuntu
To keep the same distro we were using previously
* Disable building distroless
* Publish the images under the previous names
* Fix naming and publishing
* Use ubuntu focal
Try fixing missing __xmknod symbol with ubuntu jammy
* Make apt-get installs non-interactive
* Remove 'ubuntu' ghcr image name
* Add setuptools, distutils and pip
Otherwise the final environment is slightly broken if someone tries
to install extra packages
* Add UTF-8 locale
Echidna prints emojis and will throw an error if the locale is not
set correctly.
* README: fix some markdownlint warnings
* README: adjust Docker documentation
* nix: Bump slither-analyzer and crytic-compile dependencies
hevm is currently marked broken, so only reference the dependencies
from the newer snapshot.
* nix: re-enable tests