Skip to content

Commit

Permalink
try with caching
Browse files Browse the repository at this point in the history
  • Loading branch information
kryptt authored Jun 21, 2024
1 parent debdad1 commit 1e6490d
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- name: Checkout
uses: actions/checkout@v4
- name: "Restore nix store"
uses: actions/cache@v3.0.8
id: nix-cache
with:
path: /tmp/nixcache
key: "ci-${{ github.ref }}"
- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
Expand All @@ -20,4 +28,12 @@ jobs:
auto-optimise-store = true
cores = 4
extra-experimental-features = nix-command flakes
- run: nix run -L .#fida-contracts:exe:fida-contracts-serialise -- -o ~/now/fida-purs-module/
- name: "Import Nix store cache"
if: "steps.nix-cache.outputs.cache-hit == 'true'"
run: "nix copy --from /tmp/nixcache ./#fida-contracts"
- name: Build
run: nix run -L .#fida-contracts:exe:fida-contracts-serialise -- -o ~/now/fida-purs-module/
- name: Test
run: nix run -L .#fida-contracts:test:fida-contracts-test
- name: "Save nix store"
run: "nix copy --to /tmp/nixcache ./#fida-contracts"

0 comments on commit 1e6490d

Please sign in to comment.