-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.5 KB
/
nix.yaml
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
name: Nix-CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
cache-name: brechtserckx-recycle
jobs:
Nix-CI:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
# used to provide bash in nix-shell
nix_path: nixpkgs=channel:nixos-unstable
# add extra nix caches
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://cache.iog.io https://cache.nixos.org/
- name: Test Nix install
run: nix-build --version
- uses: cachix/cachix-action@v12
with:
name: '${{ env.cache-name }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: 'iohk'
- uses: falti/dotenv-action@v1.0.4
with:
export-variables: true
log-variables: true
keys-case: bypass
- run: nix-shell --run 'echo "shell ok"'
# FIXME: Build using system npm first
# This can be deleted once the Nix build for the ui works again
- run: nix-shell --run 'cd recycle-ics-ui && npm install && npm run build'
- run: nix-shell --run 'cabal build all'
# FIXME: While the NPM build is not working, I'll need to manually create
# The recycle-ics-ui build first
- run: nix-build -A recycle-client -A recycle-ics