adds a binary cache called `zellij`, hosted by https://www.cachix.org/ to the project, users can now use the cache by running: ``` cachix use zellij ``` Step by step: ``` bash <(curl -L https://nixos.org/nix/install) nix-env -iA cachix -f https://cachix.org/api/v1/install cachix use zellij nix-build ``` Documentation: https://docs.cachix.org/installation#
34 lines
856 B
YAML
34 lines
856 B
YAML
name: nix
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
nix:
|
|
runs-on: ubuntu-latest
|
|
name: nix-build
|
|
environment: cachix
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
with:
|
|
# Nix Flakes doesn't work on shallow clones
|
|
fetch-depth: 0
|
|
- uses: cachix/install-nix-action@v16
|
|
with:
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
fetch-depth: 0
|
|
- uses: cachix/cachix-action@v10
|
|
with:
|
|
name: zellij
|
|
# If you chose API tokens for write access OR if you have a private cache
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
- run: nix flake check --print-build-logs --show-trace
|
|
- run: nix build
|
|
- run: nix develop --profile devShell
|