Skip to content

Commit cce4e72

Browse files
committed
ci: don't use nix for everything, only build and cache the devshell
1 parent a7c15fd commit cce4e72

File tree

3 files changed

+41
-38
lines changed

3 files changed

+41
-38
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,11 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Install Lix
17-
uses: canidae-solutions/lix-quick-install-action@v3
18-
with:
19-
lix_conf: |
20-
keep-env-derivations = true
21-
keep-outputs = true
22-
23-
- name: Cache Nix store
24-
uses: nix-community/cache-nix-action@v6
25-
with:
26-
primary-key: nix-${{ runner.os }}
27-
gc-max-store-size: 5G
28-
29-
- name: Setup Nix cache
30-
uses: cachix/cachix-action@v16
31-
with:
32-
name: zigplug
33-
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
16+
- name: Setup Zig
17+
uses: mlugg/setup-zig@v2
3418

3519
- name: Build docs
36-
run: nix develop -c zig build docs
20+
run: zig build docs
3721

3822
- name: Setup Pages
3923
uses: actions/configure-pages@v5

.github/workflows/examples.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,12 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v4
1212

13-
- name: Install Lix
14-
uses: canidae-solutions/lix-quick-install-action@v3
15-
with:
16-
lix_conf: |
17-
keep-env-derivations = true
18-
keep-outputs = true
19-
20-
- name: Cache Nix store
21-
uses: nix-community/cache-nix-action@v6
22-
with:
23-
primary-key: nix-${{ runner.os }}
24-
gc-max-store-size: 5G
25-
26-
- name: Setup Nix cache
27-
uses: cachix/cachix-action@v16
28-
with:
29-
name: zigplug
30-
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
13+
- name: Setup Zig
14+
uses: mlugg/setup-zig@v2
3115

3216
- name: Build examples
3317
run: |
3418
for example in $(find $(realpath ..) -path "*/zigplug/examples/*/build.zig"); do
3519
cd $(dirname $example)
36-
nix develop -c zig build
20+
zig build
3721
done

.github/workflows/nix.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
push:
3+
paths: ["*.nix"]
4+
pull_request:
5+
paths: ["*.nix"]
6+
7+
jobs:
8+
nix:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Lix
16+
uses: canidae-solutions/lix-quick-install-action@v3
17+
with:
18+
lix_conf: |
19+
keep-env-derivations = true
20+
keep-outputs = true
21+
22+
- name: Cache Nix store
23+
uses: nix-community/cache-nix-action@v6
24+
with:
25+
primary-key: nix-${{ runner.os }}
26+
gc-max-store-size: 5G
27+
28+
- name: Setup Nix cache
29+
uses: cachix/cachix-action@v16
30+
with:
31+
name: zigplug
32+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
33+
34+
- name: Build devshell
35+
run: nix build .#devShells.$(nix eval builtins.currentSystem --impure).default

0 commit comments

Comments
 (0)