Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/add update prove ci #1970

Merged
merged 4 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/actions/with-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,45 @@ inputs:
tag:
description: 'Docker image tag to use'
required: true
subdir:
description: 'Subdirectory where code is cloned.'
required: false
default: "./"
os:
description: 'OS to setup Docker for.'
required: true
distro:
description: 'Distribution to setup Docker for.'
required: true
llvm:
description: 'LLVM version to use.'
required: false
default: 15
jdk:
description: 'JDK version to use.'
required: false
default: 17
dockerfile:
description: 'Hardcode the path of the dockerfile to use.'
required: false
default: .github/workflows/Dockerfile
runs:
using: 'composite'
steps:
- name: 'Set up Docker'
shell: bash {0}
env:
TAG_NAME: ${{ inputs.tag }}
SUBDIR: ${{ inputs.subdir }}
BASE_OS: ${{ inputs.os }}
BASE_DISTRO: ${{ inputs.distro }}
LLVM_VERSION: ${{ inputs.llvm }}
JDK_VERSION: ${{ inputs.jdk }}
DOCKERFILE: ${{ inputs.dockerfile }}
run: |
set -euxo pipefail

Z3_VERSION=4.12.1
LLVM_VERSION=14
K_COMMIT=$(cat deps/k_release)

docker build . \
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ ARG K_COMMIT
ARG Z3_VERSION
FROM z3:${Z3_VERSION} as Z3

ARG BASE_OS
ARG BASE_DISTRO
ARG K_VERSION
FROM stack:${BASE_DISTRO}-${K_VERSION} as STACK

ARG K_COMMIT
FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_COMMIT}

Expand All @@ -14,6 +19,7 @@ COPY --from=FOUNDRY /usr/local/bin/anvil /usr/local/bin/anvil
COPY --from=FOUNDRY /usr/local/bin/cast /usr/local/bin/cast

COPY --from=Z3 /usr/bin/z3 /usr/bin/z3
COPY --from=STACK /usr/local/bin/stack /usr/local/bin/stack

ARG LLVM_VERSION

Expand All @@ -30,6 +36,7 @@ RUN apt-get update \
libssl-dev \
llvm-${LLVM_VERSION}-dev \
llvm-${LLVM_VERSION}-tools \
maven \
netcat \
protobuf-compiler \
python3 \
Expand All @@ -39,6 +46,9 @@ ARG USER_ID=1000
ARG GROUP_ID=1000
RUN groupadd -g $GROUP_ID user && useradd -m -u $USER_ID -s /bin/sh -g user user

# Own Stack files to 'user'
COPY --from=STACK --chown=user:user /home/user/.stack /home/user/.stack

USER user:user
RUN mkdir /home/user/workspace
WORKDIR /home/user/workspace
Expand All @@ -51,3 +61,4 @@ RUN curl -sSL https://install.python-poetry.org | python3 - \
RUN cargo install svm-rs \
&& svm install 0.8.13 \
&& solc --version
COPY --from=STACK --chown=user:user /home/user/.stack /home/user/.stack
12 changes: 7 additions & 5 deletions .github/workflows/update-foundry-prove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ jobs:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
ref: ${{ github.events.inputs.branch }}
- name: Git Submodule Update
run: |
git submodule update --init --recursive
git submodule update --init --recursive -- deps/k
git submodule update --init --recursive -- deps/plugin

- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
tag: kevm-update-output-${{ github.sha }}
os: ubuntu
distro: jammy
llvm: 14
# User subdir: <path> if you need to be in a lower folder to build something. Otherwise leave as default (.)
# subdir: <path to sub folder to mount into container instead of top level repository checkout>

- name: 'Build devShell'
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
Expand Down