-
Notifications
You must be signed in to change notification settings - Fork 23
59 lines (49 loc) · 1.38 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: [main]
pull_request:
branches: ["**"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
nix: ${{ steps.filter.outputs.nix }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
nix:
- 'flake.nix'
- 'flake.lock'
run-checks:
needs: changes
if: ${{ needs.changes.outputs.nix == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v10
- name: Cache Magic
uses: DeterminateSystems/magic-nix-cache-action@v6
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5
with:
ignore-missing-flake-lock: false
fail-mode: true
- name: Nix Develop Check
run: |
nix develop --show-trace -c irust --version
nix develop --show-trace -c rustc --version
- name: Nix Homestar Build
if: ${{ github.event_name == 'push' }}
run: nix build . && ./result/bin/homestar --version