Skip to content

Commit

Permalink
Enable kup binary caching (#33)
Browse files Browse the repository at this point in the history
* test binary caching

* fix

* Set Version: 0.1.27

* add non-binary caching too

* update token

* revert cachix token name

* Set Version: 0.1.29

* move nix binary cache jobs into the master workflow

* Set Version: 0.1.30

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
goodlyrottenapple and rv-auditor authored Sep 9, 2024
1 parent 7b323fe commit 309adc9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,51 @@ jobs:
set -x
VERSION=v$(cat package/version)
gh release create ${VERSION} --target ${{ github.sha }}
nix-cache:
name: 'Populate Nix Cache'
strategy:
matrix:
runner: [normal, ARM64]
runs-on: ${{ matrix.runner }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
ref: ${{ github.event.push.head.sha }}
fetch-depth: 0

- name: 'Build and cache Komet'
uses: workflow/nix-shell-action@v3
env:
GC_DONT_GC: 1
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
with:
packages: jq
script: |
KOMET=$(nix build --extra-experimental-features 'nix-command flakes' .#komet --json | jq -r '.[].outputs | to_entries[].value')
DRV=$(nix-store --query --deriver ${KOMET})
nix-store --query --requisites --include-outputs ${DRV} | cachix push k-framework
nix-binary-cache:
name: 'Populate Nix Binary Cache'
strategy:
matrix:
runner: [normal, ARM64]
runs-on: ${{ matrix.runner }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4

- name: 'Publish Komet to k-framework-binary cache'
uses: workflow/nix-shell-action@v3
env:
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_PRIVATE_KFB_TOKEN }}'
GC_DONT_GC: '1'
with:
packages: jq
script: |
export PATH="$(nix build github:runtimeverification/kup --no-link --json | jq -r '.[].outputs | to_entries[].value')/bin:$PATH"
kup publish k-framework-binary .#komet --keep-days 180
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.29
0.1.30
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "komet"
version = "0.1.29"
version = "0.1.30"
description = "K tooling for the Soroban platform"
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down

0 comments on commit 309adc9

Please sign in to comment.