Skip to content

Commit

Permalink
Update nix.yml to latest setup-nix-with-cache [WIP] (#1293)
Browse files Browse the repository at this point in the history
* Update nix.yml to latest setup-nix-with-cache

* Update nix.yml

* Update applications.yml

don't trigger this when just updating other workflows

* Update nix.yml

---------

Co-authored-by: June <[email protected]>
  • Loading branch information
enobayram and DevopsGoth authored Aug 30, 2023
1 parent 2bf083f commit 2a6e8ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ name: Build and publish application binaries
on:
workflow_dispatch:
push:
paths:
- '**'
- '!.github/**'
- '.github/workflows/applications.yml'

pull_request_target:
types: [ opened ]

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ name: Build and cache with Nix
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'

paths:
- '**'
- '!.github/**'
- '.github/workflows/nix.yml'

jobs:
build-and-cache:
runs-on: ${{ matrix.os }}
timeout-minutes: 740
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, mac-m1]
os: [ubuntu-latest, macos-latest, macos-m1]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Nix with caching
uses: kadena-io/setup-nix-with-cache@v2
uses: kadena-io/setup-nix-with-cache/by-root@v3
with:
cache_url: s3://nixcache.chainweb.com?region=us-east-1
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
Expand All @@ -31,8 +33,10 @@ jobs:
aws-secret-access-key: ${{ secrets.NIX_CACHE_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Give root user AWS credentials
uses: kadena-io/setup-nix-with-cache/copy-root-aws-credentials@v3

- name: Build and cache artifacts
timeout-minutes: 740
run: |
echo Building the project and its devShell
nix build .#check --log-lines 500 --show-trace

0 comments on commit 2a6e8ca

Please sign in to comment.