Skip to content

Commit

Permalink
Merge pull request #1600 from GaloisInc/T1598-1599-ci-fixes
Browse files Browse the repository at this point in the history
CI fixes for #1598, #1599
  • Loading branch information
RyanGlScott authored Jan 4, 2024
2 parents d23add7 + 5e0ea61 commit 8b0d188
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
with:
poetry-version: 1.4.2

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc-version }}
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:22.04 AS build

ARG GHCVER="9.2.8"
ARG CABALVER="3.10.1.0"
RUN apt-get update && \
apt-get install -y \
# ghcup requirements
Expand All @@ -24,15 +26,15 @@ RUN z3 --version
ARG CRYPTOLPATH="/cryptol/.cryptol"
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
COPY cabal.GHC-9.2.8.config cabal.project.freeze
COPY cabal.GHC-${GHCVER}.config cabal.project.freeze
RUN mkdir -p /home/cryptol/.local/bin && \
curl -L https://downloads.haskell.org/~ghcup/0.1.19.4/x86_64-linux-ghcup-0.1.19.4 -o /home/cryptol/.local/bin/ghcup && \
chmod +x /home/cryptol/.local/bin/ghcup
RUN mkdir -p /home/cryptol/.ghcup && \
ghcup --version && \
ghcup install cabal 3.6.2.0 && \
ghcup install ghc 9.2.8 && \
ghcup set ghc 9.2.8
ghcup install cabal ${CABALVER} && \
ghcup install ghc ${GHCVER} && \
ghcup set ghc ${GHCVER}
RUN cabal v2-update && \
cabal v2-build -j cryptol:exe:cryptol && \
cp $(cabal v2-exec which cryptol) rootfs/usr/local/bin && \
Expand Down
17 changes: 14 additions & 3 deletions cryptol-remote-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
ARG GHCVER="9.2.8"
ARG CABALVER="3.10.1.0"
# This is the version of GHC that we use as part of the process of building a
# separate copy of GHC from source. The version of GHC that we build from source
# is determined by the value of GHCVER.
ARG GHCVER_BOOTSTRAP="8.10.2"
# We pin specific versions of alex and happy that are necessary to build
# GHC. In general, we don't want to build the latest versions of each
# tool, as GHC may not support them (see, for example,
# https://github.com/GaloisInc/cryptol/issues/1599). If you update GHCVER, you
# may need to update ALEXVER and HAPPYVER as well.
ARG ALEXVER="3.4.0.1"
ARG HAPPYVER="1.20.1.1"
FROM ubuntu:22.04 AS toolchain
ARG PORTABILITY=false
RUN apt-get update && \
Expand All @@ -15,10 +26,10 @@ RUN apt-get update && \
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
ENV GHCUP_INSTALL_BASE_PREFIX=/opt \
PATH=/opt/.ghcup/bin:$PATH
PATH=/opt/.ghcup/bin:/root/.local/bin:$PATH
RUN curl -o /usr/local/bin/ghcup "https://downloads.haskell.org/~ghcup/0.1.19.4/x86_64-linux-ghcup-0.1.19.4" && \
chmod +x /usr/local/bin/ghcup
RUN ghcup install cabal --set
RUN ghcup install cabal ${CABALVER} --set
ENV PATH=/root/.cabal/bin:$PATH
ADD ./cryptol-remote-api/ghc-portability.patch .
ARG GHCVER
Expand All @@ -27,7 +38,7 @@ RUN if ${PORTABILITY}; then \
ghcup install ghc ${GHCVER_BOOTSTRAP} && \
ghcup set ghc ${GHCVER_BOOTSTRAP} && \
cabal v2-update && \
cabal v2-install alex happy-1.20.1.1 && \
cabal v2-install alex-${ALEXVER} happy-${HAPPYVER} && \
git clone --recurse-submodules --depth 1 --branch ghc-${GHCVER}-release https://gitlab.haskell.org/ghc/ghc.git && \
cd ./ghc && \
git apply ../ghc-portability.patch && \
Expand Down

0 comments on commit 8b0d188

Please sign in to comment.