Skip to content

Commit f9073a6

Browse files
authored
nix: housekeeping (#100)
* flake: bump inputs * CI: simplify cachix workflow * CI: separate nix flake checking
1 parent 76af3eb commit f9073a6

File tree

3 files changed

+44
-18
lines changed

3 files changed

+44
-18
lines changed

.github/workflows/cachix.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@ name: "Set up binary cache & push binaries"
22

33
on:
44
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
paths-ignore:
9+
- .gitignore
10+
- README.md
511
push:
612
branches:
713
- master
814
paths-ignore:
9-
- .github/**
1015
- .gitignore
1116
- README.md
1217

1318
jobs:
1419
cachix:
20+
name: "Build Exposed Packages"
1521
runs-on: ubuntu-latest
1622
strategy:
1723
matrix:
@@ -27,28 +33,29 @@ jobs:
2733
- symbols
2834
- websearch
2935
steps:
30-
- uses: easimon/maximize-build-space@v6
36+
- uses: easimon/maximize-build-space@v8
3137
with:
3238
overprovision-lvm: true
3339
remove-android: true
3440
remove-dotnet: true
3541
remove-haskell: true
36-
- uses: actions/checkout@v3
37-
- uses: cachix/install-nix-action@v22
38-
with:
39-
extra_nix_config: |
40-
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
41-
auto-optimise-store = true
42-
experimental-features = nix-command flakes
43-
nix_path: nixpkgs=channel:nixos-unstable
42+
remove-docker-images: true
43+
remove-codeql: true
44+
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- uses: DeterminateSystems/nix-installer-action@main
49+
- uses: DeterminateSystems/magic-nix-cache-action@main
50+
4451
- uses: cachix/cachix-action@v12
4552
with:
4653
authToken: ${{ secrets.CACHIX_TOKEN }}
4754
extraPullNames: nix-community
4855
name: anyrun
56+
4957
- name: Set default git branch (to reduce log spam)
5058
run: git config --global init.defaultBranch main
51-
- name: Validate Flakes
52-
run: nix flake check
59+
5360
- name: Build anyrun from the defined matrix
5461
run: nix build .#${{ matrix.package }} --print-build-logs

.github/workflows/check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Flake Check
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
check-flake:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Install Nix
14+
uses: DeterminateSystems/nix-installer-action@main
15+
with:
16+
logger: pretty
17+
18+
- name: Check Flake
19+
run: nix flake check --accept-flake-config

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)