Skip to content

Commit

Permalink
add nix cache workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoeldner committed Jul 6, 2023
1 parent 640e39d commit 7e80de2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and cache with Nix

on:
workflow_dispatch:
push:

jobs:
build-and-cache:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Nix with caching
uses: kadena-io/setup-nix-with-cache@v1
with:
cache_url: s3://nixcache.chainweb.com?region=us-east-1
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}

- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.NIX_CACHE_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.NIX_CACHE_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Build and cache artifacts
timeout-minutes: 740
run: |
echo Building the project and its devShell
nix build

0 comments on commit 7e80de2

Please sign in to comment.