Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
d91ba51
Load proof from proof dir when viewing
jberthold Mar 12, 2025
30d4610
Add files and description for an example program/proof
jberthold Mar 12, 2025
d4ea348
make proof-dir required for kmir prove view command
jberthold Mar 12, 2025
9082e00
Use `usize` in source code for consistency
jberthold Mar 20, 2025
f992c9d
Adding unchecked specs
ACassimiro Mar 21, 2025
0ef0094
Fixing requires clause for unchecked operations
ACassimiro Mar 21, 2025
fc99d92
Adding rust-verification-proofs folder
ACassimiro Mar 21, 2025
1819def
Removing scratch
ACassimiro Mar 21, 2025
5f4ffeb
Update README.md
ACassimiro Mar 21, 2025
7a546e9
Update README.md
ACassimiro Mar 21, 2025
592b276
Removing repo from command
ACassimiro Mar 21, 2025
570a63e
FIx wording
ACassimiro Mar 21, 2025
d421709
Update README.md
ACassimiro Mar 22, 2025
e2de329
Fix operation names and requires condition
ACassimiro Mar 22, 2025
b7fe354
Update README.md
ACassimiro Mar 22, 2025
861a97a
Some edits and updates to the proof (#503)
dkcumming Mar 24, 2025
6f612ca
Merge branch 'master' into sample-challenge-11-proofs
ACassimiro Mar 25, 2025
9aa7975
Merging master into branch (#512)
ACassimiro Mar 27, 2025
74a18a1
Revert "Merging master into branch" (#513)
ACassimiro Mar 27, 2025
e1ba203
Manually resolving conflict with master
ACassimiro Mar 28, 2025
d557313
Merging master into branch (#514)
ACassimiro Mar 28, 2025
293735d
adapt spec files to updated master
jberthold Mar 28, 2025
f109657
format and adjust json files, adjust README
jberthold Mar 28, 2025
3ed00bd
Adding First round of attempt to package kmir to python whl with some…
F-WRunTime Mar 28, 2025
80e792f
Set Version: 0.3.110
rv-auditor Mar 28, 2025
e772ece
Remove unfinished thought
F-WRunTime Mar 28, 2025
a69d7fe
Merge branch 'master' into challenge-11-ci
F-WRunTime Mar 29, 2025
1e5f302
Set Version: 0.3.111
rv-auditor Mar 29, 2025
ab4a853
Revert to master
F-WRunTime Mar 31, 2025
10c8bfc
Updating flake nix to name package 'kmir' from 'mir-semantics'
F-WRunTime Mar 31, 2025
b7b24d8
Revert to master
F-WRunTime Mar 31, 2025
d440e7d
Dropping separate rust repo
F-WRunTime Mar 31, 2025
d0eb849
Removing nix produced link
F-WRunTime Mar 31, 2025
3f28089
dropping changes to Makefile
F-WRunTime Mar 31, 2025
41ca007
Drop changes to package and revert to master, will update again with …
F-WRunTime Mar 31, 2025
13f131d
Merge branch 'master' into challenge-11-ci
F-WRunTime Mar 31, 2025
f2f0a9d
Set Version: 0.3.112
rv-auditor Mar 31, 2025
a4227c4
Build test image and run a test against that image
F-WRunTime Mar 31, 2025
658de06
Set K_VERSION in image build
F-WRunTime Mar 31, 2025
151e72f
Rework naming of image and setting variables for reference. Tag name …
F-WRunTime Mar 31, 2025
6bb2566
Updating kmir release and test workflow
F-WRunTime Mar 31, 2025
f1a25df
Missed setting K_VERSION after removal of step
F-WRunTime Mar 31, 2025
912ac88
Login to ghcr.io using classic token, GH token not supported
F-WRunTime Mar 31, 2025
1358bac
Just need to set permissions in Packages?
F-WRunTime Mar 31, 2025
18ef7ca
Use publish image
F-WRunTime Mar 31, 2025
8855356
Drop using container approach sponsored by WFs, settings just run it
F-WRunTime Mar 31, 2025
906c4df
Image name never got set as output for job
F-WRunTime Mar 31, 2025
c396382
Workflow torun kmir tests fromdockerhub
F-WRunTime Apr 1, 2025
e46789f
Rework test and release workflows. Checkout new repo holding rustc te…
F-WRunTime Apr 1, 2025
ad2f056
Make it interactive drop tty, gh does not like that.
F-WRunTime Apr 1, 2025
a9afa99
drop the tty from exec command
F-WRunTime Apr 1, 2025
b0ccd78
Drop to C > c. Remove tty reference
F-WRunTime Apr 1, 2025
a8172bd
Drop the old WF move to test.yml
F-WRunTime Apr 1, 2025
0a853b9
Updating container images
F-WRunTime Apr 1, 2025
1a20f12
Updating path references
F-WRunTime Apr 1, 2025
551abe3
Drop unused WF. Update to just run a single test for testing
F-WRunTime Apr 1, 2025
ebfe300
Use published images to ghcr.io for testing
F-WRunTime Apr 1, 2025
8e6f557
Reworking execution
F-WRunTime Apr 1, 2025
702c28d
Docker is not consuming the container user env
F-WRunTime Apr 1, 2025
c60a2fd
Rework container test
F-WRunTime Apr 1, 2025
74707e1
Updates per PR comments.
F-WRunTime Apr 2, 2025
cdaa79c
set load to true, and send image to local daemon
F-WRunTime Apr 2, 2025
47dc378
Set bash shell to 'login' as container user and should use env of tha…
F-WRunTime Apr 2, 2025
c88be89
Rename job
F-WRunTime Apr 2, 2025
d3be337
Set container name from testing. Rename workflow
F-WRunTime Apr 2, 2025
f1c2fda
To Resolve permission and env when running /bin/bash commands -l requ…
F-WRunTime Apr 2, 2025
97e3536
Update workflow to copy files to container
F-WRunTime Apr 2, 2025
26588af
Add a couple comments
F-WRunTime Apr 2, 2025
fcab8e0
tear down the container
F-WRunTime Apr 2, 2025
d0a559f
- Drop docker cp and just mount the folder to the cp drop location
F-WRunTime Apr 2, 2025
f9beb10
modified: .github/workflows/release.yml
F-WRunTime Apr 2, 2025
8923df9
modified: .github/workflows/test.yml
F-WRunTime Apr 2, 2025
adc6b0a
Moving workspace in running container to 'workspace' from '/home/kmir'
F-WRunTime Apr 2, 2025
50753da
Do we need to create folders before they are written to?
F-WRunTime Apr 2, 2025
7b891c4
Revert some testing, and remove 'docker cp'
F-WRunTime Apr 2, 2025
4832103
Revert removal of fixuid
F-WRunTime Apr 2, 2025
ab89627
Workdir set for exec commands
F-WRunTime Apr 3, 2025
e3691da
The UID used is generally for the very first created on a system. Let…
F-WRunTime Apr 4, 2025
963931c
Set Version: 0.3.113
rv-auditor Apr 4, 2025
731656c
Merge branch 'master' into challenge-11-ci
F-WRunTime Apr 4, 2025
a291250
Set Version: 0.3.113
rv-auditor Apr 4, 2025
60b4ab5
Merge branch 'master' into challenge-11-ci
F-WRunTime Apr 7, 2025
1ba1eff
Set Version: 0.3.114
rv-auditor Apr 7, 2025
32b9806
EXPERIMENT set UID:GID in `docker exec` during test
jberthold Apr 8, 2025
bbd4e1b
reworking test execution setup with minor tweaks since we rely on fix…
F-WRunTime Apr 8, 2025
3b858b2
Remove IDs, drop extra flags, add interative/tty to exec.
F-WRunTime Apr 8, 2025
88b881e
try and see the output of the test to see hwat failed
F-WRunTime Apr 8, 2025
c992ef6
Lets do some debug
F-WRunTime Apr 8, 2025
be18c88
Rework proof folder generation workaround container permissions relat…
F-WRunTime Apr 8, 2025
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
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Release KMIR"

on:
push:
branches:
- master

jobs:
release:
runs-on: [self-hosted, linux, normal]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: 'Setup Docker Buildx'
uses: docker/setup-buildx-action@v3.10.0

- name: 'Login to Docker Hub'
uses: docker/login-action@v3.4.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Set Image Name
id: set-image-name
run: |
echo "image-name=runtimeverificationinc/kmir" >> $GITHUB_OUTPUT
echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT
echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT
echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build Kmir Container
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.kmir
platforms: linux/amd64
push: true
build-args: |
K_VERSION=${{ steps.set-image-name.outputs.k-version }}
tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}

80 changes: 80 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,83 @@ jobs:
- name: 'Tear down Docker'
if: always()
run: docker stop --time 0 mir-smir-ci-${GITHUB_SHA}

test-kmir-image:
name: Test Kmir Image
needs: [ unit-tests, version-bump ]
runs-on: ubuntu-latest
env:
container_name: "kmir-${{ github.run_id }}"
outputs:
image-name: ${{ steps.set-image-name.outputs.image-name }}
k-version: ${{ steps.set-image-name.outputs.k-version }}
kmir-version: ${{ steps.set-image-name.outputs.kmir-version }}
short-sha: ${{ steps.set-image-name.outputs.short-sha }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0

- name: Set Image Name Parameters
id: set-image-name
run: |
echo "image-name=ghcr.io/runtimeverification/mir-semantics/kmir" >> $GITHUB_OUTPUT
echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT
echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT
echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build Kmir Container
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.kmir
platforms: linux/amd64
push: false
load: true
build-args: |
K_VERSION=${{ steps.set-image-name.outputs.k-version }}
tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }}

- name: Container Sanity Check
run: |
# Create output directories for each test
for k_file in kmir/src/tests/integration/data/*/*-spec.k; do
proof_dir="$(dirname ${k_file})/proofs"
mkdir -p "${proof_dir}"
chmod 777 "${proof_dir}"
done

# Start Container
docker run --detach --rm -t \
--name ${{ env.container_name }} \
-v $PWD:/home/kmir/workspace \
-w /home/kmir/workspace \
${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} \
/bin/bash

# Run all tests in a single exec command to maintain fixuid context
docker exec \
-w /home/kmir/workspace \
${{ env.container_name }} \
/bin/bash -c '
for k_file in kmir/src/tests/integration/data/*/*-spec.k; do
echo "Running ${k_file}"
proof_dir="$(dirname ${k_file})/proofs"
if ! kmir prove run "${k_file}" --proof-dir "${proof_dir}" 2>&1; then
echo "Proof failed for ${k_file}"
fi
done
'

# Print test results
echo "Test results:"
find kmir/src/tests/integration/data -name "proofs" -type d -exec echo {} >> GITHUB_STEP_SUMMARY \;

- name: Tear Down Container
if: always()
run: docker stop ${{ env.container_name }}

12 changes: 9 additions & 3 deletions Dockerfile.kmir
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

# create non-root user and adjust UID:GID on start-up
# see https://github.com/boxboat/fixuid
RUN addgroup --gid 1000 kmir && \
adduser -uid 1000 --ingroup kmir --home /home/kmir --shell /bin/bash --disabled-password --gecos "" kmir
RUN addgroup --gid 1111 kmir && \
adduser -uid 1111 --ingroup kmir --home /home/kmir --shell /bin/bash --disabled-password --gecos "" kmir
RUN apt-get install -y curl graphviz python-is-python3 && \
USER=kmir && \
GROUP=kmir && \
Expand All @@ -23,9 +23,15 @@

USER kmir:kmir
WORKDIR /home/kmir
# Set Env variables for Building
ENV K_VERSION=${K_VERSION} \
PATH=/home/kmir/.local/bin:/home/kmir/.cargo/bin:$PATH \
force_color_prompt=yes
# Set Env Variables every time a new shell is opened (e.g. when using 'docker exec')
RUN echo "export K_VERSION=${K_VERSION}" >> /home/kmir/.bash_profile && \
echo "export PATH=/home/kmir/.local/bin:/home/kmir/.cargo/bin:\$PATH" >> /home/kmir/.bash_profile && \
echo "export force_color_prompt=yes" >> /home/kmir/.bash_profile && \
echo "source /home/kmir/.bash_profile" >> /home/kmir/.bashrc

# install rustup non-interactively and build
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
Expand All @@ -42,10 +48,10 @@
cargo run --bin cargo_stable_mir_json -- $PWD && \
ln -s /home/kmir/.stable-mir-json/release.sh /home/kmir/.local/bin/stable-mir-json && \
cargo clean

# Fixuid is helpful for 1 time executions of docker containers but is not helpful when relying on `docker exec`
ENTRYPOINT ["fixuid", "-q"]

CMD printf "%s\n" \

Check warning on line 54 in Dockerfile.kmir

View workflow job for this annotation

GitHub Actions / Test Kmir Image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
"Welcome to kmir, powered by K framework" \
"" \
"This docker image provides a K-framework installation with the following programs:" \
Expand Down
8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "mir-semantics - ";
description = "kmir - ";
inputs = {
k-framework.url = "github:runtimeverification/k/v7.1.229";
nixpkgs.follows = "k-framework/nixpkgs";
Expand All @@ -15,7 +15,7 @@
poetry2nix =
inputs.poetry2nix.lib.mkPoetry2Nix { pkgs = prev; };
in {
mir-semantics = poetry2nix.mkPoetryApplication {
kmir = poetry2nix.mkPoetryApplication {
python = prev.python310;
projectDir = ./kmir;
overrides = poetry2nix.overrides.withDefaults
Expand All @@ -41,8 +41,8 @@
};
in {
packages = rec {
inherit (pkgs) mir-semantics;
default = mir-semantics;
inherit (pkgs) kmir;
default = kmir;
};
}) // {
overlay = nixpkgs.lib.composeManyExtensions allOverlays;
Expand Down
2 changes: 1 addition & 1 deletion kmir/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kmir"
version = "0.3.113"
version = "0.3.114"
description = ""
authors = [
"Runtime Verification, Inc. <contact@runtimeverification.com>",
Expand Down
2 changes: 1 addition & 1 deletion kmir/src/kmir/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from typing import Final

VERSION: Final = '0.3.113'
VERSION: Final = '0.3.114'
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.113
0.3.114