Set Version: 0.1.142 #2454
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Update Version' | |
| on: | |
| push: | |
| branches: | |
| - '_update-deps/runtimeverification/k' | |
| - '_update-deps/runtimeverification/rv-nix-tools' | |
| - '_update-deps-cron/uv2nix' | |
| - '_update-deps-cron/pyproject-build-systems' | |
| # Stop in progress workflows on the same branch and same workflow to use latest committed code | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| update-versions: | |
| name: 'Update dependency versions' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: 'Check out code' | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
| - run: | | |
| git config user.name devops | |
| git config user.email devops@runtimeverification.com | |
| - name: 'Install Nix' | |
| uses: cachix/install-nix-action@v31.5.1 | |
| with: | |
| install_url: https://releases.nixos.org/nix/nix-2.30.1/install | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| substituters = http://cache.nixos.org | |
| trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
| - name: 'Install Cachix' | |
| uses: cachix/cachix-action@v14 | |
| with: | |
| name: k-framework | |
| authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
| # 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 uv files' | |
| run: | | |
| K_VERSION=$(cat deps/k_release) | |
| sed -i 's! "kframework>=[0-9\.]*",! "kframework>='${K_VERSION}'",!' pykwasm/pyproject.toml | |
| uv --project pykwasm lock --upgrade | |
| git add pykwasm/ && git commit -m "pykwasm/: sync uv files ${K_VERSION}" || true | |
| - name: 'Update Nix flake inputs' | |
| run: | | |
| K_VERSION=v"$(cat deps/k_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/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"! k-framework.url = "github:runtimeverification/k/'"${K_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 flake update | |
| git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true | |
| - name: 'Push updates' | |
| run: git push |