aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 20:00:03 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 20:06:27 +0300
commit1bab1d2ce21507747ea1f506fb891fe7cd5a13c9 (patch)
treed1d25ec92f26fc3739b69db2b9da6995c43039d3 /.github/workflows
parent7b99c3562815208bf5a354b337b26758220578c7 (diff)
ci: cache nix workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml7
-rw-r--r--.github/workflows/nix.yml29
2 files changed, 26 insertions, 10 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 01c58539..4683eb98 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,16 +29,13 @@ jobs:
with:
persist-credentials: false
- - name: Install just
- uses: extractions/setup-just@v4
-
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- - name: Install cargo-nextest
+ - name: Install Rust tools
uses: taiki-e/install-action@b550161ef8a7bc4f2a671c0b03a18ac9ccedea1e # v2
with:
- tool: cargo-nextest
+ tool: just,cargo-nextest
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
index 03fa711d..81306b1a 100644
--- a/.github/workflows/nix.yml
+++ b/.github/workflows/nix.yml
@@ -3,10 +3,16 @@ name: Nix
on:
pull_request:
types: [opened, synchronize, reopened]
+ paths-ignore:
+ - "website/**"
+ - "docs/**"
+ - "**/*.md"
push:
branches: [master]
paths-ignore:
- "website/**"
+ - "docs/**"
+ - "**/*.md"
permissions:
contents: read
@@ -25,10 +31,23 @@ jobs:
with:
persist-credentials: false
+ - name: Install Nix
+ uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
+ with:
+ extra_nix_config: |
+ experimental-features = nix-command flakes
+ always-allow-substitutes = true
+
+ - name: Enable Magic Nix Cache
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
+ uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
+ continue-on-error: true
+ with:
+ source-tag: v0.1.6
+ use-flakehub: disabled
+ diagnostic-endpoint: ""
+
- name: Run Nix flake check
run: |
- docker run --rm \
- -v "$PWD:/work" \
- -w /work \
- docker.io/nixos/nix:2.31.2 \
- sh -c 'git config --global --add safe.directory /work && nix --extra-experimental-features "nix-command flakes" flake check --print-build-logs && nix --extra-experimental-features "nix-command flakes" flake check --all-systems --no-build --print-build-logs'
+ nix flake check --print-build-logs
+ nix flake check --all-systems --no-build --print-build-logs