Skip to content

Commit

Permalink
add non-binary caching too
Browse files Browse the repository at this point in the history
  • Loading branch information
goodlyrottenapple committed Sep 4, 2024
1 parent c4b0899 commit da41ddb
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,31 @@ jobs:
- name: 'Tear down Docker'
if: always()
run: docker stop --time=0 ${CONTAINER}

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'
Expand Down

0 comments on commit da41ddb

Please sign in to comment.