Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
devops committed Jun 21, 2024
2 parents 84263cd + 8adae80 commit 2b19a3b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/actions/with-k-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG BASE_DISTRO
FROM ubuntu:${BASE_DISTRO}

ARG K_DEB_PATH
ARG INSTALL_BACKEND_DEBS
ARG LLVM_BACKEND_DEB_PATH

COPY ${K_DEB_PATH} /kframework.deb
Expand All @@ -15,9 +16,13 @@ RUN apt-get -y update \
make \
python3.10-dev \
python3.10-venv \
/llvm-backend.deb \
/kframework.deb \
&& apt-get -y clean
/kframework.deb

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

RUN apt-get -y clean

RUN rm /llvm-backend.deb
RUN rm /kframework.deb
Expand Down
19 changes: 13 additions & 6 deletions .github/actions/with-k-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ inputs:
required: true
type: string
default: kframework.deb
install-backend-debs:
description: 'Whether to install a separate package for the LLVM backend'
required: true
type: boolean
default: true
distro:
description: 'Distribution to setup Docker for.'
required: true
Expand All @@ -28,26 +33,28 @@ runs:
env:
BASE_DISTRO: ${{ inputs.distro }}
GH_TOKEN: ${{ github.token }}
INSTALL_BACKEND_DEBS: ${{ inputs.install-backend-debs }}
run: |
set -euxo pipefail
gh release download \
--repo runtimeverification/llvm-backend \
--pattern "*ubuntu_${BASE_DISTRO}.deb" \
--output llvm-backend.deb \
v$(cat deps/llvm-backend_release)
CONTAINER_NAME=${{ inputs.container-name }}
TAG=runtimeverificationinc/${CONTAINER_NAME}
DOCKERFILE=${{ github.action_path }}/Dockerfile
K_DEB_PATH=${{ inputs.k-deb-path }}
LLVM_BACKEND_DEB_PATH=llvm-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)
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}
- name: 'Run Docker container'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ jobs:
with:
container-name: k-pyk-docs-${{ github.sha }}
k-deb-path: kframework_amd64_ubuntu_jammy.deb
install-backend-debs: false
- name: 'Build documentation in Docker container'
run: docker exec -u user k-pyk-docs-${{ github.sha }} make docs
- name: 'Copy documentation from Docker container'
Expand Down

0 comments on commit 2b19a3b

Please sign in to comment.