Skip to content

Commit

Permalink
Update deps/runtimeverification/pyk (#576)
Browse files Browse the repository at this point in the history
* .gitmodules, deps/k: remove K submodule

* .github/update-version: get K version from pyk update

* Makefile: remove stuff related to submodule build

* pykwasm/: sync poetry files v0.1.631

* deps/pyk_release: Set Version v0.1.635

* pykwasm/: sync poetry files v0.1.635

* deps/k_release: sync release file version 6.2.31

* .github/test-pr: setup version bumper

* .github/master-push: publish github releases on master push

* Set Version: 0.1.1

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
ehildenb and devops authored Feb 19, 2024
1 parent d88cc6f commit 8dfc2ab
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 133 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@ jobs:
runs-on: ubuntu-latest
environment: production
steps:
- name: 'Update dependents'
- name: 'Check out code'
uses: actions/checkout@v3
with:
ref: ${{ github.event.push.head.sha }}
fetch-depth: 0
- name: 'Make release'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
VERSION=v$(cat package/version)
gh release create ${VERSION} --target ${{ github.sha }}
- name: 'Update dependents'
run: |
set -x
version="${GITHUB_SHA}"
curl --fail \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Authorization: Bearer ${{ secrets.JENKINS_GITHUB_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/runtimeverification/devops/dispatches \
-d '{"event_type":"on-demand-test","client_payload":{"repo":"runtimeverification/wasm-semantics","version":"'${version}'"}}'
25 changes: 25 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ concurrency:

jobs:

version-bump:
name: 'Version Bump'
runs-on: [self-hosted, linux, flyweight-ephemeral]
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
# fetch-depth 0 means deep clone the repo
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email [email protected]
- name: 'Update version'
run: |
og_version=$(git show origin/${GITHUB_BASE_REF}:package/version)
./package/version.sh bump ${og_version}
./package/version.sh sub
new_version=$(cat package/version)
git add --update && git commit --message "Set Version: ${new_version}" || true
- name: 'Push updates'
run: git push origin HEAD:${GITHUB_HEAD_REF}

pykwasm-code-quality-checks:
name: 'Code Quality Checks'
runs-on: ubuntu-latest
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: 'Update Version'
on:
push:
branches:
- '_update-deps/runtimeverification/k'
- '_update-deps/runtimeverification/pyk'
# Stop in progress workflows on the same branch and same workflow to use latest committed code
concurrency:
Expand All @@ -23,23 +22,18 @@ jobs:
- run: |
git config user.name devops
git config user.email [email protected]
- name: 'Update K submodule'
run: |
K_VERSION="$(cat deps/k_release)"
cd deps/k
git fetch --tags
git checkout "v${K_VERSION}"
cd -
git add deps/k && git commit -m "deps/k: sync submodule v${K_VERSION}" || true
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Update pyk Release tag'
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.3.2
poetry --version
pyk_version="$(cat deps/pyk_release)"
sed -i 's!pyk = { git = "https://github.com/runtimeverification/pyk.git", tag="[v0-9\.]*" }!pyk = { git = "https://github.com/runtimeverification/pyk.git", tag="'${pyk_version}'" }!' pykwasm/pyproject.toml
cd pykwasm
poetry update
cd -
poetry -C pykwasm update
git add pykwasm/ && git commit -m "pykwasm/: sync poetry files ${pyk_version}" || true
- name: 'Update K release file'
run: |
K_VERSION=$(poetry -C pykwasm run python3 -c 'import pyk; print(pyk.K_VERSION)')
echo ${K_VERSION} > deps/k_release
git add deps/k_release && git commit -m "deps/k_release: sync release file version ${K_VERSION}" || true
- name: 'Push updates'
run: git push
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "deps/k"]
path = deps/k
url = https://github.com/kframework/k
ignore = untracked
[submodule "tests/wasm-tests"]
path = tests/wasm-tests
url = https://github.com/webassembly/spec
Expand Down
41 changes: 1 addition & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,17 @@
# --------

BUILD_DIR := .build
DEPS_DIR := deps
DEFN_DIR := $(BUILD_DIR)/defn
K_INCLUDE_DIR ?= $(CURDIR)

K_SUBMODULE := $(DEPS_DIR)/k
ifneq (,$(wildcard deps/k/k-distribution/target/release/k/bin/*))
K_RELEASE ?= $(abspath $(K_SUBMODULE)/k-distribution/target/release/k)
else
K_RELEASE ?= $(dir $(shell which kompile))..
endif
K_BIN := $(K_RELEASE)/bin
K_LIB := $(K_RELEASE)/lib/kframework
export K_RELEASE

ifneq ($(RELEASE),)
K_BUILD_TYPE := Release
else
K_BUILD_TYPE := Debug
endif

PATH := $(K_BIN):$(PATH)
export PATH

PYK_PATH := $(abspath $(K_SUBMODULE)/pyk/src/)
PYWASM_PATH := ./deps/py-wasm

PYTHONPATH := $(PYK_PATH)
export PYTHONPATH

.PHONY: all clean deps \
.PHONY: all \
build build-llvm build-haskell build-wrc20 \
test test-execution test-simple test-prove \
test-conformance test-conformance-parse test-conformance-supported \
media presentations reports

all: build

clean:
rm -rf $(BUILD_DIR)

# Build Dependencies (K Submodule)
# --------------------------------

K_JAR := $(K_SUBMODULE)/k-distribution/target/release/k/lib/java/kernel-1.0-SNAPSHOT.jar

deps: $(K_JAR) $(TANGLER)

$(K_JAR):
cd $(K_SUBMODULE) && mvn package -DskipTests -Dproject.build.type=$(K_BUILD_TYPE)

# Building Definition
# -------------------

Expand Down
1 change: 0 additions & 1 deletion deps/k
Submodule k deleted from 56e36d
2 changes: 1 addition & 1 deletion deps/k_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.27
6.2.31
2 changes: 1 addition & 1 deletion deps/pyk_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.631
v0.1.635
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
Loading

0 comments on commit 8dfc2ab

Please sign in to comment.