Skip to content

Commit feefc29

Browse files
committed
Merge master into m1-builds-github branch
Resolved conflicts in CI workflow: - Used CACHE_VERSION v9 from master - Kept ARM64 macOS support variables (EXTRA_INCLUDE_MAC_AARCH64, EXTRA_LIB_MAC_AARCH64) - Used updated Windows cache path from master (D:\a\_temp\msys64) - Added runner.arch to cache key for architecture-specific caching
2 parents b86c6e2 + 9870b1a commit feefc29

File tree

120 files changed

+5012
-2368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+5012
-2368
lines changed

.codeclimate.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/container-linux-static/Dockerfile

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,13 @@
1-
FROM alpine:3.18.4
2-
# Based on https://github.com/fpco/alpine-haskell-stack/blob/9.2.8v2/ghc-Dockerfile
1+
FROM docker.io/benz0li/ghc-musl:9.8.4
2+
# https://gitlab.com/benz0li/ghc-musl
33

44
RUN apk upgrade --no-cache &&\
55
apk add --no-cache \
6-
curl \
7-
gcc \
8-
git \
9-
libc-dev \
10-
xz \
11-
gmp-dev \
126
autoconf \
137
automake \
14-
binutils \
15-
build-base \
16-
coreutils \
17-
cpio \
18-
linux-headers \
19-
libffi-dev \
20-
musl-dev \
21-
zlib-dev \
22-
zlib-static \
23-
ncurses-dev \
24-
ncurses-libs \
25-
ncurses-static \
26-
bash \
27-
lld \
28-
shadow # for stack --docker, provides groupadd
29-
30-
RUN curl -sSLo /usr/local/bin/stack https://github.com/commercialhaskell/stack/releases/download/v2.13.1/stack-2.13.1-linux-x86_64-bin && \
31-
chmod +x /usr/local/bin/stack
32-
33-
# https://stackoverflow.com/a/41517423
34-
RUN ln -s /usr/lib/libncurses.a /usr/lib/libtinfo.a
35-
36-
COPY stack-config.yaml /root/.stack/config.yaml
37-
38-
RUN cd /tmp && \
39-
curl -sSLo /tmp/ghc.tar.xz https://downloads.haskell.org/~ghc/9.4.7/ghc-9.4.7-x86_64-alpine3_12-linux.tar.xz && \
40-
tar xf ghc.tar.xz && \
41-
cd ghc-9.4.7-x86_64-unknown-linux && \
42-
./configure --prefix=/usr/local && \
43-
make install && \
44-
rm -rf /tmp/ghc.tar.xz /tmp/ghc-9.4.7-x86_64-unknown-linux
45-
46-
RUN apk upgrade --no-cache &&\
47-
apk add --no-cache \
8+
binutils-gold \
489
cmake \
49-
libtool \
50-
openssl-dev \
51-
tar \
52-
zlib-dev \
53-
zlib-static
10+
libtool
5411

5512
RUN addgroup \
5613
--gid 115 \
@@ -65,8 +22,7 @@ RUN addgroup \
6522
runneruser
6623

6724
RUN mkdir -p /etc/stack &&\
68-
{ cat /root/.stack/config.yaml ;\
69-
echo "system-ghc: true" ;\
25+
{ echo "system-ghc: true" ;\
7026
echo "install-ghc: false" ;\
7127
echo "skip-ghc-check: true" ;\
7228
} >> /etc/stack/config.yaml &&\

.github/container-linux-static/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This container is used as part of `.github/workflows/ci.yml` to produce
44
statically-linked amd64 linux builds of Echidna. It is based on the following
5-
container produced by FP Complete and maintained in the
6-
[`fpco/alpine-haskell-stack`](https://github.com/fpco/alpine-haskell-stack/tree/ghc927)
7-
repository, and contains a few extra dependencies and configuration to make it
5+
container produced by Olivier Benz and maintained in the
6+
[`benz0li/ghc-musl`](https://gitlab.com/benz0li/ghc-musl)
7+
repository, and contains a few extra dependencies and configurations to make it
88
suitable for the GitHub Actions environment.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -eux -o pipefail
3+
4+
VERSION=0.8.2
5+
6+
mkdir -p "$HOME/.local/bin/"
7+
8+
if [ "$HOST_OS" = "Linux" ]; then
9+
if [ $(uname -m) = "aarch64" ]; then
10+
curl -fsSL -o bitwuzla.zip https://github.com/bitwuzla/bitwuzla/releases/download/0.8.2/Bitwuzla-Linux-arm64-static.zip
11+
elif [ $(uname -m) = "x86_64" ]; then
12+
curl -fsSL -o bitwuzla.zip https://github.com/bitwuzla/bitwuzla/releases/download/0.8.2/Bitwuzla-Linux-x86_64-static.zip
13+
fi
14+
unzip bitwuzla.zip
15+
cp Bitwuzla*/bin/bitwuzla "$HOME/.local/bin/"
16+
fi
17+
if [ "$HOST_OS" = "Windows" ]; then
18+
curl -fsSL "https://github.com/bitwuzla/bitwuzla/releases/download/$VERSION/Bitwuzla-Win64-x86_64-static.zip" -o bitwuzla.zip
19+
unzip bitwuzla.zip
20+
cp Bitwuzla*/bin/bitwuzla.exe "$HOME/.local/bin/"
21+
fi
22+
23+
rm -rf bitwuzla.zip Bitwuzla*/

.github/scripts/install-libff.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cd libff
1818
git checkout v0.2.1
1919
git submodule init && git submodule update
2020

21-
ARGS=("-DCMAKE_INSTALL_PREFIX=$PREFIX" "-DWITH_PROCPS=OFF")
21+
ARGS=("-DCMAKE_INSTALL_PREFIX=$PREFIX" "-DWITH_PROCPS=OFF" "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
2222
CXXFLAGS=""
2323
if [ "$HOST_OS" = "macOS" ]; then
2424
OPENSSL_PREFIX=$(brew --prefix openssl)
@@ -35,8 +35,16 @@ if [ "$HOST_OS" = "Linux" ] && [ "$(uname -m)" = "aarch64" ]; then
3535
fi
3636

3737
if [ "$HOST_OS" = "Windows" ]; then
38-
ARGS+=("-G" "Ninja")
38+
ARGS+=("-G" "Ninja" "-DCMAKE_TOOLCHAIN_FILE=$PWD/../.github/scripts/windows-ghc-toolchain.cmake")
3939
sed -i 's/find_library(GMP_LIBRARY gmp)/find_library(GMP_LIBRARY NAMES libgmp.a)/' CMakeLists.txt
40+
41+
# This ends up causing the system headers to be included with -I and
42+
# thus they override the GHC mingw compiler ones. So this removes it
43+
# and re-adds the include with idirafter via the toolchain file
44+
sed -i '/INCLUDE_DIRECTORIES.*OPENSSL_INCLUDE_DIR/d' CMakeLists.txt
45+
46+
# Apply windows-specific libff patch carried by hevm
47+
curl -fsSL https://raw.githubusercontent.com/ethereum/hevm/1abe4c79eeada928acc279b631c48eeb2a1376c2/.github/scripts/libff.patch | patch -p1
4048
fi
4149

4250
mkdir -p build

.github/scripts/install-libsecp256k1.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ if [ -f $HOME/.local/lib/libsecp256k1.a ]; then
99
exit 0
1010
fi
1111

12-
gitRef="21ffe4b22a9683cf24ae0763359e401d1284cc7a"
13-
curl -LO "https://github.com/bitcoin-core/secp256k1/archive/$gitRef.zip"
12+
INSTALL_VERSION=0.6.0
13+
curl -LO "https://github.com/bitcoin-core/secp256k1/archive/v$INSTALL_VERSION.zip"
1414

15-
unzip "$gitRef.zip"
16-
cd "secp256k1-$gitRef"
15+
unzip "v$INSTALL_VERSION.zip" && rm "v$INSTALL_VERSION.zip"
16+
cd "secp256k1-$INSTALL_VERSION"
1717

1818
./autogen.sh
1919
# hevm needs reecovery module

.github/scripts/install-z3.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -eux -o pipefail
3+
4+
if [ "$HOST_OS" = "Linux" ]; then
5+
if [ $(uname -m) = "aarch64" ]; then
6+
curl -fsSL -o z3.zip https://github.com/Z3Prover/z3/releases/download/z3-4.15.2/z3-4.15.2-arm64-glibc-2.34.zip
7+
elif [ $(uname -m) = "x86_64" ]; then
8+
curl -fsSL -o z3.zip https://github.com/Z3Prover/z3/releases/download/z3-4.15.2/z3-4.15.2-x64-glibc-2.39.zip
9+
fi
10+
unzip z3.zip
11+
cp -a z3-*/bin/z3 "$HOME/.local/bin/"
12+
rm -rf z3-*/ z3.zip
13+
fi
14+
if [ "$HOST_OS" = "Windows" ]; then
15+
choco install z3
16+
fi
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
set(CMAKE_SYSTEM_NAME Windows)
2+
3+
set(CMAKE_C_COMPILER "$ENV{HASKELL_MINGW_PATH}/bin/cc.exe")
4+
set(CMAKE_CXX_COMPILER "$ENV{HASKELL_MINGW_PATH}/bin/c++.exe")
5+
6+
set(CMAKE_C_FLAGS "-idirafter $ENV{SYSTEM_MINGW_PATH}/include")
7+
set(CMAKE_CXX_FLAGS "-idirafter $ENV{SYSTEM_MINGW_PATH}/include")
8+
9+
set(CMAKE_FIND_ROOT_PATH "$ENV{HASKELL_MINGW_PATH}")
10+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
11+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
12+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)

.github/workflows/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Assert test
1919
uses: crytic/echidna-action@v2

0 commit comments

Comments
 (0)