Skip to content

Commit

Permalink
Progress on separate checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
traiansf committed Dec 20, 2024
1 parent 3e0d4c7 commit 1182ac3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/actions/with-k/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ runs:
shell: bash {0}
env:
CONTAINER_NAME: ${{ inputs.container-name }}
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euxo pipefail
TAG=runtimeverificationinc/${CONTAINER_NAME}
K_COMMIT=$(cat ./deps/k_release)
docker build -f .github/workflows/Dockerfile.k . --tag ${TAG} --build-arg K_COMMIT=${K_COMMIT} --build-arg GITHUB_TOKEN=${GITHUB_TOKEN}
docker build -f .github/workflows/Dockerfile.k . --tag ${TAG} --build-arg K_COMMIT=${K_COMMIT}
docker run \
--name ${CONTAINER_NAME} \
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/Dockerfile.k
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ ARG HOME

## Define build argument for GitHub Token

ARG GITHUB_TOKEN
ENV GITHUB_TOKEN=${GITHUB_TOKEN}

ARG KFRAMEWORK_REPO=github.com/runtimeverification/k.git
ARG K_COMMIT
ARG LLVM_VERSION=16
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Check out blockchain-k-plugin'
uses: actions/checkout@v3
with:
repository: 'runtimeverification/blockchain-k-plugin'
submodules: 'recursive'
path: 'build/deps/plugin'
- name: 'Check out ulm'
uses: actions/checkout@v3
with:
repository: 'pi-squared-inc/ulm'
ref: 'contract-size-limits'
path: 'build/deps/ulm'
- name: 'Check out evm-semantics'
uses: actions/checkout@v3
with:
repository: 'pi-squared-inc/evm-semantics'
ref: 'ulm'
path: 'build/deps/evm-semantics'
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,12 @@ ULM_SRC_HOOKS=$(shell find "$(ULM_CLONE_DIR)/kllvm" -type f -a '(' -name '*.cpp'

ULM_GETH_TARGET=$(ULM_BUILD_DIR)/geth

GITHUB_TOKEN ?= $(shell cat ~/.github-auth-token)
GITHUB_PREFIX = $(if $(GITHUB_TOKEN),https://$(GITHUB_TOKEN)@github.com,https://github.com)

### ULM Crypto Plugin

$(ULM_KRYPTO_DIR)/.git:
@mkdir -p $(ULM_DEP_DIR)
cd $(ULM_DEP_DIR); \
git clone --depth 1 $(GITHUB_PREFIX)/runtimeverification/blockchain-k-plugin plugin; \
git clone --depth 1 https://github.com/runtimeverification/blockchain-k-plugin plugin; \
cd plugin; \
git submodule update --init --recursive

Expand All @@ -105,7 +102,7 @@ ulm-krypto-build: $(ULM_KRYPTO_TARGET)
$(ULM_CLONE_DIR)/.git:
@mkdir -p $(ULM_DEP_DIR)
cd $(ULM_DEP_DIR); \
git clone --depth 1 --branch contract-size-limits $(GITHUB_PREFIX)/pi-squared-inc/ulm
git clone --depth 1 --branch contract-size-limits https://github.com/pi-squared-inc/ulm

$(ULM_HOOKS_TARGET): $(ULM_SRC_HOOKS) | $(ULM_CLONE_DIR)/.git
@mkdir -p $(ULM_LIB_DIR)
Expand All @@ -122,7 +119,7 @@ ulm-hooks-build: $(ULM_HOOKS_TARGET)
$(ULM_KEVM_DIR)/.git:
@mkdir -p $(ULM_DEP_DIR)
cd $(ULM_DEP_DIR); \
git clone --depth 1 $(GITHUB_PREFIX)/pi-squared-inc/evm-semantics -b $(ULM_KEVM_BRANCH) evm-semantics
git clone --depth 1 https://github.com/pi-squared-inc/evm-semantics -b $(ULM_KEVM_BRANCH) evm-semantics

$(ULM_KEVM_TARGET): $(ULM_KRYPTO_TARGET) $(ULM_HOOKS_TARGET) | $(ULM_KEVM_DIR)/.git
@mkdir -p $(ULM_LIB_DIR)
Expand Down

0 comments on commit 1182ac3

Please sign in to comment.