-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* slight code reorganization * fix a few paths * ci * more ci * fix distro * try to fix docker image
- Loading branch information
1 parent
48b0e08
commit e796764
Showing
13 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: 'With Docker' | ||
description: 'Run a given stage with Docker Image' | ||
inputs: | ||
container-name: | ||
description: 'Docker container name to use' | ||
type: string | ||
required: true | ||
tag-name: | ||
description: 'Docker image tag to use' | ||
type: string | ||
required: false | ||
default: runtimeverificationinc/kevm | ||
subdir: | ||
description: 'Subdirectory where code is cloned.' | ||
required: false | ||
type: string | ||
default: './' | ||
dockerfile: | ||
description: 'Hardcode the path of the dockerfile to use.' | ||
required: false | ||
type: string | ||
default: '.github/workflows/Dockerfile' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Set up Docker' | ||
shell: bash {0} | ||
run: | | ||
set -euxo pipefail | ||
CONTAINER_NAME=${{ inputs.container-name }} | ||
SUBDIR=${{ inputs.subdir }} | ||
BASE_OS=${{ inputs.os }} | ||
BASE_DISTRO=${{ inputs.distro }} | ||
DOCKERFILE=${{ inputs.dockerfile }} | ||
LLVM_VERSION=${{ inputs.llvm }} | ||
TAG_NAME=${{ inputs.tag-name }} | ||
USER=github-user | ||
GROUP=${USER} | ||
K_VERSION=$(cat deps/k_release) | ||
USER_ID=1000 | ||
GROUP_ID=${USER_ID} | ||
docker build . --file ${DOCKERFILE} \ | ||
--tag ${TAG_NAME} \ | ||
--build-arg USER_ID=${USER_ID} \ | ||
--build-arg GROUP_ID=${GROUP_ID} \ | ||
--build-arg USER=${USER} \ | ||
--build-arg GROUP=${GROUP} \ | ||
--build-arg K_VERSION=${K_VERSION} \ | ||
docker run \ | ||
--name ${CONTAINER_NAME} \ | ||
--rm \ | ||
--interactive \ | ||
--tty \ | ||
--detach \ | ||
--user root \ | ||
--workdir /home/${USER}/workspace \ | ||
${TAG_NAME} | ||
docker cp . ${CONTAINER_NAME}:/home/${USER}/workspace | ||
docker exec ${CONTAINER_NAME} chown -R ${USER}:${GROUP} /home/${USER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG K_VERSION | ||
FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_VERSION} | ||
|
||
ARG USER=user | ||
ARG GROUP | ||
ARG USER_ID | ||
ARG GROUP_ID | ||
RUN groupadd -g ${GROUP_ID} ${GROUP} && useradd -m -u ${USER_ID} -s /bin/sh -g ${GROUP} ${USER} | ||
|
||
USER ${USER}:${GROUP} | ||
RUN mkdir /home/${USER}/workspace | ||
WORKDIR /home/${USER}/workspace | ||
|
||
ENV PATH=/home/${USER}/.local/bin:${PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 'Test PR' | ||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
test: | ||
name: 'Conformance Tests' | ||
runs-on: [self-hosted, linux, normal] | ||
steps: | ||
- name: 'Check out code' | ||
uses: actions/checkout@v4 | ||
- name: 'Set up Docker' | ||
uses: ./.github/actions/with-docker | ||
with: | ||
container-name: solidity-ci-${{ github.sha }} | ||
- name: 'Build semantics' | ||
run: docker exec -u github-user solidity-ci-${{ github.sha }} /bin/bash -c 'make build-bison' | ||
- name: 'Test parsing' | ||
run: docker exec -u github-user solidity-ci-${{ github.sha }} /bin/bash -c 'make test-bison' | ||
- name: 'Tear down Docker' | ||
if: always() | ||
run: | | ||
docker stop --time=0 solidity-ci-${{ github.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7.1.110 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.