update haskell-backend to version 531f7c1db1a9fad6d18cbcedb3cfd3e35d6… #225
Workflow file for this run
This file contains 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 Nix Flake Inputs' | |
on: | |
push: | |
branches: | |
- '_update-deps/runtimeverification/haskell-backend' | |
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 | |
env: | |
ghc_version: '9.6.4' | |
stack_version: "2.15.1" | |
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@v4 | |
with: | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
submodules: recursive | |
- run: | | |
git config --global user.name rv-jenkins | |
git config --global user.email devops@runtimeverification.com | |
- 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@v14 | |
with: | |
name: k-framework | |
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell | |
with: | |
ghc-version: ${{ env.ghc_version }} | |
stack-version: ${{ env.stack_version }} | |
enable-stack: true | |
stack-setup-ghc: true | |
cabal-update: true | |
- name: 'Install libsecp256k1' | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes \ | |
libsecp256k1-0 \ | |
libsecp256k1-dev | |
- name: 'Update Nix flake from haskell backend release tag' | |
run: | | |
set -euxo pipefail | |
changed=false | |
haskell_backend_version=$(cat deps/haskell-backend_release) | |
sed -i 's! haskell-backend.url = "github:runtimeverification/haskell-backend/[0-9a-f]*";! haskell-backend.url = "github:runtimeverification/haskell-backend/'${haskell_backend_version}'";!' flake.nix | |
if ! git diff --exit-code flake.nix; then | |
git add flake.nix | |
changed=true | |
fi | |
if ${changed}; then | |
cabal update | |
scripts/update-haskell-backend.sh ${haskell_backend_version} | |
git add flake.lock stack.yaml stack.yaml.lock cabal.project # cabal.project.freeze | |
git commit -m "update haskell-backend to version ${haskell_backend_version}" | |
git push | |
fi |