generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.47 KB
/
build.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
name: "Build and populate cache"
on:
pull_request:
push:
schedule:
- cron: '51 2 * * *'
env:
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM: 1
jobs:
tests:
strategy:
matrix:
nurRepo:
- p3psi-nur
cachixName:
- p3psi
nixPath:
- nixpkgs=channel:nixpkgs-unstable
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
- name: Install nix
uses: cachix/install-nix-action@v12
with:
nix_path: "${{ matrix.nixPath }}"
- name: Show nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Setup cachix
uses: cachix/cachix-action@v8
if: ${{ matrix.cachixName != 'p3psi' }}
with:
name: ${{ matrix.cachixName }}
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Check evaluation
run: |
nix-env -f . -qa \* --meta --xml \
--allowed-uris https://static.rust-lang.org \
--option restrict-eval true \
--option allow-import-from-derivation true \
--drv-path --show-trace \
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
-I $PWD
- name: Build nix packages
run: nix run -I 'nixpkgs=channel:nixpkgs-unstable' nixpkgs.nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
- name: Trigger NUR update
run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}"