-
Notifications
You must be signed in to change notification settings - Fork 102
92 lines (76 loc) · 2.7 KB
/
nix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build and cache with Nix
on:
workflow_dispatch:
push:
paths:
- '**'
- '!.github/**'
- '.github/workflows/nix.yml'
jobs:
build-and-cache-on-bigubuntu:
runs-on:
group: bigrunner
timeout-minutes: 740
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Nix with caching
uses: kadena-io/setup-nix-with-cache/[email protected]
with:
cache_url: s3://nixcache.chainweb.com?region=us-east-1
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
additional_experimental_features: recursive-nix
- 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: Give root user AWS credentials
uses: kadena-io/setup-nix-with-cache/[email protected]
- name: Build and cache artifacts
run: |
echo Building the project and its devShell
nix build .#check --log-lines 500 --show-trace
echo Build the recursive output
nix build .#recursive.allDerivations --log-lines 500 --show-trace
- name: Verify pact binary
run: |
echo Validating pact version
nix run pact --version
build-and-cache-on-mac:
runs-on: ${{ matrix.os }}
timeout-minutes: 740
strategy:
fail-fast: false
matrix:
os: [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/[email protected]
with:
cache_url: s3://nixcache.chainweb.com?region=us-east-1
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
additional_experimental_features: recursive-nix
- 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: Give root user AWS credentials
uses: kadena-io/setup-nix-with-cache/[email protected]
- name: Build and cache artifacts
run: |
echo Building the project and its devShell
nix build .#check --log-lines 500 --show-trace
echo Build the recursive output
nix build .#recursive.allDerivations --log-lines 500 --show-trace
- name: Verify pact binary
run: |
echo Validating pact version
nix run pact --version