Skip to content

Commit

Permalink
Use prebuilt haskell backend (#4473)
Browse files Browse the repository at this point in the history
This PR uses the existing infrastructure we have for the LLVM backend to
download a pre-packaged release of the Haskell backend when running the
K integration tests. It's a bit obscured currently because of degraded
CI performance generally, but this should take average-case CI run times
down to 20-25 minutes.
  • Loading branch information
Baltoli authored Jun 25, 2024
1 parent 1de58c1 commit 531652d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/actions/with-k-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ FROM ubuntu:${BASE_DISTRO}
ARG K_DEB_PATH
ARG INSTALL_BACKEND_DEBS
ARG LLVM_BACKEND_DEB_PATH
ARG HASKELL_BACKEND_DEB_PATH

COPY ${K_DEB_PATH} /kframework.deb
COPY ${LLVM_BACKEND_DEB_PATH} /llvm-backend.deb
COPY ${HASKELL_BACKEND_DEB_PATH} /haskell-backend.deb

RUN apt-get -y update \
&& apt-get -y install \
Expand All @@ -19,7 +21,7 @@ RUN apt-get -y update \
/kframework.deb

RUN if [ "${INSTALL_BACKEND_DEBS}" = "true" ]; then \
apt-get -y install /llvm-backend.deb; \
apt-get -y install /llvm-backend.deb /haskell-backend.deb; \
fi

RUN apt-get -y clean
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/with-k-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,28 @@ runs:
DOCKERFILE=${{ github.action_path }}/Dockerfile
K_DEB_PATH=${{ inputs.k-deb-path }}
LLVM_BACKEND_DEB_PATH=llvm-backend.deb
HASKELL_BACKEND_DEB_PATH=haskell-backend.deb
gh release download \
--repo runtimeverification/llvm-backend \
--pattern "*ubuntu_${BASE_DISTRO}.deb" \
--output "${LLVM_BACKEND_DEB_PATH}" \
v$(cat deps/llvm-backend_release)
gh release download \
--repo runtimeverification/haskell-backend \
--pattern "*ubuntu_${BASE_DISTRO}.deb" \
--output "${HASKELL_BACKEND_DEB_PATH}" \
$(cat deps/haskell-backend_release)
docker build . \
--file ${DOCKERFILE} \
--tag ${TAG} \
--build-arg BASE_DISTRO=${BASE_DISTRO} \
--build-arg K_DEB_PATH=${K_DEB_PATH} \
--build-arg INSTALL_BACKEND_DEBS=${INSTALL_BACKEND_DEBS} \
--build-arg LLVM_BACKEND_DEB_PATH=${LLVM_BACKEND_DEB_PATH}
--build-arg LLVM_BACKEND_DEB_PATH=${LLVM_BACKEND_DEB_PATH} \
--build-arg HASKELL_BACKEND_DEB_PATH=${HASKELL_BACKEND_DEB_PATH}
- name: 'Run Docker container'
shell: bash {0}
Expand Down
2 changes: 1 addition & 1 deletion package/debian/kframework-frontend/rules.jammy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export PREFIX
dh $@

override_dh_auto_build:
mvn --batch-mode package -DskipTests -Dllvm.backend.skip
mvn --batch-mode package -DskipTests -Dllvm.backend.skip -Dhaskell.backend.skip

override_dh_auto_install:
package/package --frontend
Expand Down

0 comments on commit 531652d

Please sign in to comment.