diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml new file mode 100644 index 0000000000..97bfbca510 --- /dev/null +++ b/.github/workflows/update-deps.yml @@ -0,0 +1,44 @@ +name: 'Update Version' +on: + push: + branches: + - '_update-deps/runtimeverification/rv-nix-tools' + 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: + + update-versions: + name: 'Update Dependency Versions' + runs-on: ubuntu-latest + steps: + - name: 'Check out code' + uses: actions/checkout@v4 + with: + submodules: true + token: ${{ secrets.JENKINS_GITHUB_PAT }} + - name: 'Configure GitHub user' + run: | + git config user.name devops + git config user.email devops@runtimeverification.com + - name: 'Install Nix/Cachix' + uses: cachix/install-nix-action@v19 + with: + install_url: https://releases.nixos.org/nix/nix-2.13.3/install + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: cachix/cachix-action@v12 + with: + name: k-framework + authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }} + - name: 'Update nix flake inputs' + run: | + 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 + 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 diff --git a/deps/rv-nix-tools b/deps/rv-nix-tools new file mode 100644 index 0000000000..c8863974dd --- /dev/null +++ b/deps/rv-nix-tools @@ -0,0 +1 @@ +854d4f05ea78547d46e807b414faad64cea10ae4 \ No newline at end of file diff --git a/flake.lock b/flake.lock index 8d6d2276d8..515eb64aac 100644 --- a/flake.lock +++ b/flake.lock @@ -38,29 +38,30 @@ "inputs": { "flake-utils": "flake-utils", "nixpkgs": [ - "rv-utils", + "rv-nix-tools", "nixpkgs" ], - "rv-utils": "rv-utils", + "rv-nix-tools": "rv-nix-tools", "some-cabal-hashes-lib": "some-cabal-hashes-lib", "z3": "z3" } }, - "rv-utils": { + "rv-nix-tools": { "inputs": { "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1716459074, - "narHash": "sha256-IpahO+EkWdGl9QP7B2YXfJWpSfghjxgpz4ab47nRJY4=", + "lastModified": 1726497185, + "narHash": "sha256-iN+5eLmDm/rLuIZezS5ZqiW1BtBpwrrM9CPPP7Z5Tog=", "owner": "runtimeverification", "repo": "rv-nix-tools", - "rev": "a65058865cda201de504f5546271b8e997a0be9c", + "rev": "854d4f05ea78547d46e807b414faad64cea10ae4", "type": "github" }, "original": { "owner": "runtimeverification", "repo": "rv-nix-tools", + "rev": "854d4f05ea78547d46e807b414faad64cea10ae4", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 87f6c9d8e8..617fdb6adb 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,9 @@ description = "K Kore Language Haskell Backend"; inputs = { - rv-utils.url = "github:runtimeverification/rv-nix-tools"; - nixpkgs.follows = "rv-utils/nixpkgs"; + rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4"; + nixpkgs.follows = "rv-nix-tools/nixpkgs"; + z3 = { url = "github:Z3Prover/z3/z3-4.13.4"; flake = false; @@ -15,7 +16,7 @@ }; }; - outputs = { self, rv-utils, nixpkgs, z3, flake-utils, some-cabal-hashes-lib }: + outputs = { self, rv-nix-tools, nixpkgs, z3, flake-utils, some-cabal-hashes-lib }: let z3Overlay = final: prev: { z3 = prev.z3.overrideAttrs (_: {