From be9e9d95501c0e4017005a9f20c2c77d1c7bde81 Mon Sep 17 00:00:00 2001 From: Julian Kuners Date: Mon, 15 Dec 2025 13:53:24 +0100 Subject: [PATCH 1/3] cache nix builds in CI to cachix --- .github/workflows/master.yaml | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 77a7f55..d01a27e 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -9,6 +9,7 @@ jobs: release: name: 'Publish Release' runs-on: [self-hosted, linux, flyweight] + needs: [cachix-release, cachix-release-dependencies] steps: - name: 'Check out code' uses: actions/checkout@v4 @@ -22,3 +23,93 @@ jobs: set -x VERSION=v$(cat package/version) gh release create ${VERSION} --target ${{ github.sha }} + + cachix-release: + name: 'k-framework-binary cachix release' + strategy: + matrix: + include: + - runner: ubuntu-24.04 + os: ubuntu-24.04 + - runner: self-macos-latest + os: self-macos-latest + runs-on: ${{ matrix.runner }} + timeout-minutes: 120 + steps: + - name: 'Check out code' + uses: actions/checkout@v4 + with: + ref: ${{ github.event.push.head.sha }} + fetch-depth: 0 + - name: 'Install Nix' + if: ${{ !startsWith(matrix.os, 'self') }} + uses: cachix/install-nix-action@v31.5.1 + 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' + if: ${{ !startsWith(matrix.os, 'self') }} + uses: cachix/cachix-action@v16 + with: + name: k-framework-binary + - name: 'Publish skribe to k-framework-binary cache' + uses: workflow/nix-shell-action@v3.4.0 + env: + GC_DONT_GC: 1 + CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' + with: + packages: jq + script: | + export PATH="$(nix build github:runtimeverification/kup --no-link --json | jq -r '.[].outputs | to_entries[].value')/bin:$PATH" + kup publish --verbose k-framework-binary .#skribe --keep-days 180 + kup publish --verbose k-framework-binary .#skribe.rust --keep-days 180 + + cachix-release-dependencies: + name: 'k-framework cachix release' + strategy: + matrix: + include: + - runner: ubuntu-24.04 + os: ubuntu-24.04 + - runner: self-macos-latest + os: self-macos-latest + runs-on: ${{ matrix.runner }} + timeout-minutes: 120 + steps: + - name: 'Check out code' + uses: actions/checkout@v4 + with: + ref: ${{ github.event.push.head.sha }} + fetch-depth: 0 + - name: 'Install Nix' + if: ${{ !startsWith(matrix.os, 'self') }} + uses: cachix/install-nix-action@v31.5.1 + 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' + if: ${{ !startsWith(matrix.os, 'self') }} + uses: cachix/cachix-action@v16 + with: + name: k-framework-binary + - name: 'Build and cache skribe and skribe dependencies' + uses: workflow/nix-shell-action@v3 + env: + GC_DONT_GC: 1 + CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_PUBLIC_TOKEN }} + with: + packages: jq + script: | + SKRIBE=$(nix build --extra-experimental-features 'nix-command flakes' .#skribe --json | jq -r '.[].outputs | to_entries[].value') + DRV_SKRIBE=$(nix-store --query --deriver ${SKRIBE}) + nix-store --query --requisites --include-outputs ${DRV_SKRIBE} | cachix push k-framework + + SKRIBE_RUST=$(nix build --extra-experimental-features 'nix-command flakes' .#skribe.rust --json | jq -r '.[].outputs | to_entries[].value') + DRV_SKRIBE_RUST=$(nix-store --query --deriver ${SKRIBE_RUST}) + nix-store --query --requisites --include-outputs ${DRV_SKRIBE_RUST} | cachix push k-framework From f5cf679871adf88e8d27c4c53f308972a4ccdd23 Mon Sep 17 00:00:00 2001 From: devops Date: Mon, 15 Dec 2025 12:55:42 +0000 Subject: [PATCH 2/3] Set Version: 0.1.19 --- package/version | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/version b/package/version index f8bc4c6..d8a023e 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.1.18 +0.1.19 diff --git a/pyproject.toml b/pyproject.toml index b866691..b8be48e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "skribe" -version = "0.1.18" +version = "0.1.19" description = "Property testing for Stylus smart contracts" readme = "README.md" requires-python = "~=3.10" diff --git a/uv.lock b/uv.lock index 289bf4a..52fd3f1 100644 --- a/uv.lock +++ b/uv.lock @@ -1715,7 +1715,7 @@ wheels = [ [[package]] name = "skribe" -version = "0.1.18" +version = "0.1.19" source = { editable = "." } dependencies = [ { name = "kontrol" }, From f841ec07f64973ba865b716e612eef5618312695 Mon Sep 17 00:00:00 2001 From: devops Date: Mon, 15 Dec 2025 22:41:03 +0000 Subject: [PATCH 3/3] Set Version: 0.1.20 --- package/version | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/version b/package/version index d8a023e..baa9837 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.1.19 +0.1.20 diff --git a/pyproject.toml b/pyproject.toml index b8be48e..4b80e05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "skribe" -version = "0.1.19" +version = "0.1.20" description = "Property testing for Stylus smart contracts" readme = "README.md" requires-python = "~=3.10" diff --git a/uv.lock b/uv.lock index 52fd3f1..2205573 100644 --- a/uv.lock +++ b/uv.lock @@ -1715,7 +1715,7 @@ wheels = [ [[package]] name = "skribe" -version = "0.1.19" +version = "0.1.20" source = { editable = "." } dependencies = [ { name = "kontrol" },