Skip to content

flake.nix, flake.lock: update #803

flake.nix, flake.lock: update

flake.nix, flake.lock: update #803

Workflow file for this run

name: 'Update Nix Flake Inputs'
on:
push:
branches:
- '_update-deps/runtimeverification/llvm-backend'
- '_update-deps/runtimeverification/hs-backend-booster'
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-20.04
steps:
- name: 'Check out code, set up Git'
uses: actions/checkout@v3
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: 'Clone booster repo'
run: echo "BOOSTER_VERSION=$(cat deps/hs-backend-booster_release)" >> ${GITHUB_ENV}
- uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
repository: runtimeverification/hs-backend-booster
ref: ${{ env.BOOSTER_VERSION }}
path: deps/hs-backend-booster
- name: 'Install Nix'
uses: cachix/install-nix-action@v22
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://hydra.iohk.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- name: 'Install Cachix'
uses: cachix/cachix-action@v12
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/hs-backend-booster/deps/haskell-backend_release)
cd haskell-backend/src/main/native/haskell-backend
git checkout ${hs_backend_version}
cd -
sed -i 's! haskell-backend.url = "github:runtimeverification/haskell-backend/[0-9a-f]*";! 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
booster_version=$(cat deps/hs-backend-booster_release)
cd hs-backend-booster/src/main/native/hs-backend-booster
git checkout ${booster_version}
cd -
sed -i 's! url = "github:runtimeverification/hs-backend-booster/[0-9a-f]*";! url = "github:runtimeverification/hs-backend-booster/'${booster_version}'";!' flake.nix
if git add flake.nix hs-backend-booster/src/main/native/hs-backend-booster && git commit -m "flake.nix, hs-backend-booster/src/main/native/hs-backend-booster: update to version ${booster_version}"; then
changed=true
fi
nix flake update
GC_DONT_GC=1 nix run .#update-from-submodules
if git add flake.nix flake.lock && git commit -m 'flake.nix, flake.lock: update'; then
changed=true
fi
if ${changed}; then
git push
fi