Skip to content

Commit 6d09bc2

Browse files
authored
Merge pull request #1377 from crytic/dev-update-hevm
Update `hevm`, move to GHC 9.8
2 parents 49a804e + efa7a3d commit 6d09bc2

File tree

17 files changed

+233
-171
lines changed

17 files changed

+233
-171
lines changed

.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.6
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.6.5/ghc-9.6.5-x86_64-alpine3_12-linux.tar.xz && \
40-
tar xf ghc.tar.xz && \
41-
cd ghc-9.6.5-x86_64-unknown-linux && \
42-
./configure --prefix=/usr/local && \
43-
make install && \
44-
rm -rf /tmp/ghc.tar.xz /tmp/ghc-9.6.5-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: 2 additions & 2 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)
5+
container produced by Olivier Benz and maintained in the
6+
[`benz0li/ghc-musl`](https://gitlab.com/benz0li/ghc-musl)
77
repository, and contains a few extra dependencies and configurations to make it
88
suitable for the GitHub Actions environment.

.github/container-linux-static/stack-config.yaml

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

.github/scripts/install-libsecp256k1.sh

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

12-
INSTALL_VERSION=0.5.0
12+
INSTALL_VERSION=0.6.0
1313
curl -LO "https://github.com/bitcoin-core/secp256k1/archive/v$INSTALL_VERSION.zip"
1414

1515
unzip "v$INSTALL_VERSION.zip" && rm "v$INSTALL_VERSION.zip"

.github/workflows/ci.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
include:
2323
- os: ubuntu-latest
2424
shell: bash
25-
container: "{\"image\": \"elopeztob/alpine-haskell-stack-echidna:ghc-9.6.5\", \"options\": \"--user 1001\"}"
25+
container: "{\"image\": \"elopeztob/alpine-haskell-stack-echidna:ghc-9.8.4\", \"options\": \"--user 1001\"}"
2626
- os: macos-13 # x86_64 macOS
2727
shell: bash
2828
- os: windows-latest
@@ -65,14 +65,24 @@ jobs:
6565
id: stack
6666
if: matrix.container == ''
6767
with:
68-
ghc-version: '9.6.5'
68+
ghc-version: '9.8.4'
6969
enable-stack: true
7070
stack-version: 'latest'
7171

7272
- name: Configure Stack environment
7373
run: |
7474
HOME="${{ (runner.os == 'Windows' && '$(cygpath -m ~)') || '$HOME' }}"
75+
# This relative path works only if GHC was installed using chocolatey, but not when it was installed with ghcup
7576
GHC_MINGW_PATH="${{ (runner.os == 'Windows' && '$(cygpath -m "$GHC_BIN_PATH/../mingw")') || '' }}"
77+
if [ -n "$GHC_MINGW_PATH" ] && [ ! -d "$GHC_MINGW_PATH" ]; then
78+
echo "The expected GHC_MINGW_PATH directory $GHC_MINGW_PATH does not exist"
79+
echo "Trying to locate it via ghcup"
80+
GHCUP_PATH=$(cygpath -m "C:\ghcup\bin\ghcup.exe")
81+
GHC_REAL_PATH=$("$GHCUP_PATH" whereis ghc "$GHC_VERSION" | tr -d '\r')
82+
GHC_MINGW_PATH="$(cygpath -m "$(dirname $GHC_REAL_PATH)"/../mingw)"
83+
fi
84+
echo "GHC_MINGW_PATH=$GHC_MINGW_PATH" >> "$GITHUB_ENV"
85+
7686
mkdir -p "$STACK_ROOT"
7787
{ echo "extra-include-dirs:";
7888
echo "- $HOME/.local/include";
@@ -100,12 +110,13 @@ jobs:
100110
REPLACE_LINKER_WIN: ${{ (runner.os == 'Windows' && 'true') || 'false' }}
101111
SKIP_MSYS: ${{ (runner.os == 'Windows' && 'true') || 'false' }}
102112
GHC_BIN_PATH: ${{ steps.stack.outputs.ghc-path }}
113+
GHC_VERSION: ${{ steps.stack.outputs.ghc-version }}
103114

104115
- name: Configure Haskell paths (Windows)
105116
if: runner.os == 'Windows'
106117
run: |
107118
HASKELL_PATHS="$(cygpath -u "$GHC_PATH"):$(cygpath -u "$CABAL_PATH"):$(cygpath -u "$STACK_PATH")"
108-
HASKELL_MINGW_PATH="$(cygpath -u "$GHC_PATH/../mingw")"
119+
HASKELL_MINGW_PATH="$(cygpath -u "$GHC_MINGW_PATH")"
109120
SYSTEM_MINGW_PATH="$(cygpath -m "$MSYS2_LOCATION/$MSYSTEM")"
110121
echo "HASKELL_PATHS=$HASKELL_PATHS" >> "$GITHUB_ENV"
111122
echo "HASKELL_MINGW_PATH=$HASKELL_MINGW_PATH" >> "$GITHUB_ENV"

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
name: Linux (x86_64)
2626
tuple: x86_64-linux
2727
timeout: 180
28+
- os: ubuntu-24.04-arm
29+
name: Linux (aarch64)
30+
tuple: aarch64-linux
31+
timeout: 180
2832
- os: macos-13
2933
name: macOS (x86_64)
3034
tuple: x86_64-macos

flake.lock

Lines changed: 73 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)