Skip to content
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
6 changes: 6 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Custom labels for the self-hosted runners; actionlint cannot discover them.
self-hosted-runner:
labels:
- normal
- fast
- MacM1
77 changes: 27 additions & 50 deletions .github/actions/with-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,18 @@ 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/kontrol
subdir:
description: 'Subdirectory where code is cloned.'
required: false
type: string
default: './'
os:
description: 'OS to setup Docker for.'
required: false
type: string
default: 'ubuntu'
distro:
description: 'Distribution to setup Docker for.'
required: false
type: string
default: 'jammy'
llvm:
description: 'LLVM version to use.'
required: false
type: number
default: 14
dockerfile:
description: 'Hardcode the path of the dockerfile to use.'
required: false
type: string
default: '.github/workflows/Dockerfile'
runs:
using: 'composite'
Expand All @@ -45,24 +26,21 @@ runs:
# of falling back to anonymous. Log in with a fresh token so the credential
# is always valid (a valid GITHUB_TOKEN can pull public images from any org).
- name: 'Log in to ghcr.io'
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: 'Set up Docker'
env:
CONTAINER_NAME: ${{ inputs.container-name }}
DOCKERFILE: ${{ inputs.dockerfile }}
LLVM_VERSION: ${{ inputs.llvm }}
TAG_NAME: ${{ inputs.tag-name }}
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}
Z3_VERSION=$(cat deps/z3)
Expand All @@ -71,27 +49,26 @@ runs:
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 BASE_DISTRO=${BASE_DISTRO} \
--build-arg K_VERSION=${K_VERSION} \
--build-arg Z3_VERSION=${Z3_VERSION} \
--build-arg LLVM_VERSION=${LLVM_VERSION} \
--build-arg UV_VERSION=${UV_VERSION}
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}" \
--build-arg Z3_VERSION="${Z3_VERSION}" \
--build-arg LLVM_VERSION="${LLVM_VERSION}" \
--build-arg UV_VERSION="${UV_VERSION}"

docker run \
--name ${CONTAINER_NAME} \
--rm \
--interactive \
--tty \
--detach \
--user root \
--workdir /home/${USER}/workspace \
${TAG_NAME}
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}
docker cp . "${CONTAINER_NAME}":"/home/${USER}/workspace"
docker exec "${CONTAINER_NAME}" chown -R "${USER}:${GROUP}" "/home/${USER}"
99 changes: 0 additions & 99 deletions .github/scripts/check-cachix-pin.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ARG Z3_VERSION
ARG K_VERSION
ARG BASE_DISTRO
ARG LLVM_VERSION

FROM ghcr.io/foundry-rs/foundry:rc-1 as FOUNDRY
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/kontrol-push-fixed-deps.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/kontrol-push-unfixed-deps.yml

This file was deleted.

Loading
Loading