-
Notifications
You must be signed in to change notification settings - Fork 13
59 lines (59 loc) · 2.24 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
---
name: "nix-build"
on:
push:
branches:
- '**'
jobs:
materialize:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2.4.0
- name: install nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://hydra.iohk.io https://cache.nixos.org/
- name: install cachix
uses: cachix/cachix-action@v10
with:
name: canonical-llc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: set supported systems
run: echo $(uname -m)-$(uname -s) | tr '[:upper:]' '[:lower:]' | sed -E 's/^(.*)$/[ "\1" ]/' | tee supported-systems.nix
- name: materialize
run: nix run .#update-materialized
- name: commit
uses: EndBug/add-and-commit@v8
with:
add: nix/haskell/plan-sha256 nix/haskell/materialized
message: materialize
build:
strategy:
matrix:
platform: [ubuntu-latest] #, macos-latest]
needs: materialize
runs-on: ${{matrix.platform}}
steps:
- name: checkout
uses: actions/checkout@v2.4.0
- name: install nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://hydra.iohk.io https://cache.nixos.org/
- name: install cachix
uses: cachix/cachix-action@v10
with:
name: canonical-llc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: set supported systems
run: echo $(uname -m)-$(uname -s) | tr '[:upper:]' '[:lower:]' | sed -E 's/^(.*)$/[ "\1" ]/' | tee supported-systems.nix
- run: nix flake check --print-build-logs
- run: nix develop --print-build-logs --command echo Ready
- run: nix build --print-build-logs -f release.nix --argstr version $GITHUB_SHA