Skip to content

deps/k_release: Set Version 7.1.297 #72

deps/k_release: Set Version 7.1.297

deps/k_release: Set Version 7.1.297 #72

name: 'Update Dependencies'
on:
push:
branches:
- '_update-deps/runtimeverification/k'
- '_update-deps/runtimeverification/stable-mir-json'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-versions:
name: 'Update pyk version'
runs-on: [self-hosted, linux, flyweight]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
submodules: true
# note: we install the same version of `uv` as used by `uv2nix` in order to match the nix derivation
- name: 'Update uv release tag'
id: uv_release
run: |
UV2NIX_VERSION=$(cat deps/uv2nix)
UV_VERSION=$(curl -s https://raw.githubusercontent.com/pyproject-nix/uv2nix/$(cat deps/uv2nix)/pkgs/uv-bin/srcs.json | jq -r .version)
[[ "$UV_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
echo $UV_VERSION > deps/uv_release
git add deps/uv_release && git commit -m "Sync uv version: uv ${UV_VERSION}" || true
echo uv_version=$UV_VERSION >> "${GITHUB_OUTPUT}"
- name: 'Install uv'
uses: astral-sh/setup-uv@v6
with:
version: ${{ steps.uv_release.outputs.uv_version }}
- name: 'Update pyk release tag'
run: |
K_VERSION=$(cat ./deps/k_release)
cd kmir
sed -i 's! "kframework==v[0-9\.]*",! "kframework==v'${K_VERSION}'",!' pyproject.toml
uv lock --upgrade
git add pyproject.toml uv.lock
git commit -m 'kmir/{pyproject.toml,uv.lock}: sync uv files, K version '${K_VERSION} || true
- name: 'Update stable-mir-json submodule'
run: |
VERSION=$(cat ./deps/stable-mir-json_release)
cd deps/stable-mir-json/
git fetch --all
git checkout "${VERSION}"
cd ../..
git add deps/stable-mir-json
git commit -m "deps/stable-mir-json: sync submodule ${VERSION}" || true
- name: 'Update Nix flake inputs'
run: |
K_VERSION=$(cat deps/k_release)
STABLE_MIR_JSON_VERSION=$(cat deps/stable-mir-json_release)
UV2NIX_VERSION=$(cat deps/uv2nix)
PYPROJECT_BUILD_SYSTEMS_VERSION=$(cat deps/pyproject-build-systems)
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
sed -i 's! k-framework.url = "github:runtimeverification/k/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/v'"${K_VERSION}"'"!' flake.nix
sed -i 's! stable-mir-json-flake.url = "github:runtimeverification/stable-mir-json/[a-z0-9\.]*"! stable-mir-json-flake.url = "github:runtimeverification/stable-mir-json/'"${STABLE_MIR_JSON_VERSION}"'"!' flake.nix
sed -i 's! uv2nix.url = "github:pyproject-nix/uv2nix/[a-z0-9\.]*"! uv2nix.url = "github:pyproject-nix/uv2nix/'"${UV2NIX_VERSION}"'"!' flake.nix
sed -i 's! pyproject-build-systems.url = "github:pyproject-nix/build-system-pkgs/[a-z0-9\.]*"! pyproject-build-systems.url = "github:pyproject-nix/build-system-pkgs/'"${PYPROJECT_BUILD_SYSTEMS_VERSION}"'"!' flake.nix
sed -i 's! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/[a-z0-9\.]*"! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/'"${RV_NIX_TOOLS_VERSION}"'"!' flake.nix
nix --extra-experimental-features 'nix-command flakes' --show-trace flake update
git add flake.nix flake.lock
git commit -m 'flake.{nix,lock}: update Nix derivations' || true
- name: 'Push updates'
run: git push