deps/pyproject-build-systems: Set Version dbfc0483b5952c6b86e36f8b3af… #192
Workflow file for this run
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' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update-versions: | |
name: 'Update Dependency Versions' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
- name: 'Configure GitHub user' | |
run: | | |
git config user.name devops | |
git config user.email [email protected] | |
- name: 'Install Nix' | |
uses: cachix/[email protected] | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.24.12/install | |
extra_nix_config: | | |
substituters = http://cache.nixos.org https://cache.iog.io | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v16 | |
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 kframework release tag' | |
run: | | |
K_VERSION=$(cat deps/k_release) | |
sed -i 's! "kframework==[0-9\.]*"! "kframework=='${K_VERSION}'"!' pyproject.toml | |
uv lock --upgrade | |
git add pyproject.toml uv.lock | |
git commit -m "Sync uv files: kframework ${K_VERSION}" || true | |
- name: 'Update Nix flake inputs' | |
run: | | |
K_VERSION=$(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/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/v'"${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 |