Skip to content

Commit 4d4858c

Browse files
committed
nix flow
Signed-off-by: Jess Frazelle <github@jessfraz.com>
1 parent 66804bf commit 4d4858c

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
# Check for updates to GitHub Actions every week
7+
interval: "weekly"
8+
reviewers:
9+
- jessfraz
10+
- package-ecosystem: "gitsubmodule"
11+
directory: "/"
12+
schedule:
13+
# Check for updates to GitHub Actions every week
14+
interval: "weekly"
15+
reviewers:
16+
- jessfraz

.github/workflows/nix.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Test Nix Flake
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
jobs:
13+
nix-flake-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- uses: cachix/install-nix-action@v30
21+
with:
22+
nix_path: nixpkgs=channel:nixos-unstable
23+
24+
- name: nix flake check for all platforms
25+
run: |
26+
nix flake check --all-systems
27+
28+
nix-build-linux:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- uses: cachix/install-nix-action@v30
36+
with:
37+
nix_path: nixpkgs=channel:nixos-unstable
38+
39+
- name: nix build . for x86_64-linux
40+
run: nix build .
41+
42+
nix-build-macos:
43+
runs-on: macos-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
submodules: recursive
48+
49+
- uses: cachix/install-nix-action@v30
50+
with:
51+
nix_path: nixpkgs=channel:nixos-unstable
52+
53+
- name: nix build . for x86_64-darwin
54+
run: nix build .
55+

0 commit comments

Comments
 (0)