Skip to content

deps/pyproject-build-systems: Set Version 795a980d25301e5133eca37adae… #2314

deps/pyproject-build-systems: Set Version 795a980d25301e5133eca37adae…

deps/pyproject-build-systems: Set Version 795a980d25301e5133eca37adae… #2314

Workflow file for this run

name: 'Update Nix Flake Inputs'
on:
push:
branches:
- '_update-deps/runtimeverification/llvm-backend'
- '_update-deps/runtimeverification/haskell-backend'
- '_update-deps/runtimeverification/rv-nix-tools'
- '_update-deps-cron/uv2nix'
- '_update-deps-cron/pyproject-build-systems'
workflow_dispatch:
# 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:
nix-flake-submodule-sync:
name: 'Nix flake submodule sync'
runs-on: ubuntu-24.04
steps:
- name: 'Check out code, set up Git'
uses: actions/checkout@v4
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
submodules: recursive
fetch-depth: 0
- run: |
git config --global user.name rv-jenkins
git config --global user.email [email protected]
- name: 'Install Nix'
uses: cachix/[email protected]
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 }}'
- name: 'Update Nix flake inputs from submodules/release-tags'
run: |
set -euxo pipefail
changed=false
hs_backend_version=$(cat deps/haskell-backend_release)
cd haskell-backend/src/main/native/haskell-backend
git checkout "${hs_backend_version}"
cd -
sed -i 's! url = "github:runtimeverification/haskell-backend/.*";! url = "github:runtimeverification/haskell-backend/'"${hs_backend_version}"'";!' flake.nix
if git add flake.nix haskell-backend/src/main/native/haskell-backend && git commit -m "flake.nix, haskell-backend/src/main/native/haskell-backend: update to version ${hs_backend_version}"; then
changed=true
fi
llvm_backend_version="v$(cat deps/llvm-backend_release)"
cd llvm-backend/src/main/native/llvm-backend
git checkout "${llvm_backend_version}"
cd -
sed -i 's! llvm-backend.url = "github:runtimeverification/llvm-backend/.*";! llvm-backend.url = "github:runtimeverification/llvm-backend/'"${llvm_backend_version}"'";!' flake.nix
if git add flake.nix llvm-backend/src/main/native/llvm-backend && git commit -m "flake.nix, llvm-backend/src/main/native/llvm-backend: update to version ${llvm_backend_version}"; then
changed=true
fi
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
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
if git add flake.nix && git commit -m "flake.nix, rv-nix-tools: update to revision ${RV_NIX_TOOLS_VERSION}"; then
changed=true
fi
UV2NIX_VERSION=$(cat deps/uv2nix)
sed -i 's! uv2nix.url = "github:pyproject-nix/uv2nix/[a-z0-9\.]*"! uv2nix.url = "github:pyproject-nix/uv2nix/'"${UV2NIX_VERSION}"'"!' flake.nix
if git add flake.nix && git commit -m "flake.nix, uv2nix: update to revision ${UV2NIX_VERSION}"; then
changed=true
fi
PYPROJECT_BUILD_SYSTEMS_VERSION=$(cat deps/pyproject-build-systems)
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
if git add flake.nix && git commit -m "flake.nix, pyproject-nix/build-system-pkgs: update to revision ${PYPROJECT_BUILD_SYSTEMS_VERSION}"; then
changed=true
fi
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
if git add deps/uv_release && git commit -m "deps/uv_release: update to version ${UV_VERSION}"; then
changed=true
fi
nix flake update
if git add flake.lock && git commit -m 'flake.lock: update'; then
changed=true
fi
if ${changed}; then
git push
fi