Skip to content

Commit

Permalink
Merge pull request #161 from cachix/feature/daemon
Browse files Browse the repository at this point in the history
Feature/daemon
  • Loading branch information
domenkozar authored Jan 12, 2024
2 parents cee900d + e54c44c commit c9fc59c
Show file tree
Hide file tree
Showing 6 changed files with 4,345 additions and 136 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ on:
branches:
- master

env:
ACTIONS_STEP_DEBUG: true

jobs:
public-cache:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
useDaemon: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -23,12 +27,14 @@ jobs:
with:
name: cachix-action
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
useDaemon: ${{ matrix.useDaemon }}
- run: nix-build test.nix

public-cache-no-signing-key:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
useDaemon: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -39,13 +45,15 @@ jobs:
uses: ./
with:
name: cachix-action
useDaemon: ${{ matrix.useDaemon }}
- run: nix-build test.nix

private-cache:
if: ${{ github.ref == 'refs/heads/master' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
useDaemon: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -58,6 +66,7 @@ jobs:
name: cachix-action-private
signingKey: '${{ secrets.CACHIX_SIGNING_KEY_PRIVATE }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
useDaemon: ${{ matrix.useDaemon }}
- run: nix-build test.nix

installCommand:
Expand Down Expand Up @@ -87,7 +96,7 @@ jobs:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v24
with:
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://nixos-nix-install-tests.cachix.org/serve/kkq45x7yrzvxq8627fi6hkswnfa7mg2l/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
Expand Down
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ inputs:
description: 'Ignored if pathsToPush is set. Regular expression to exclude derivations for the cache push, for example "(-source$|nixpkgs\.tar\.gz$)". Warning: this filter does not guarantee it will not get pushed in case the path is part of the closure of something that will get pushed.'
cachixArgs:
description: 'Extra command-line arguments to pass to cachix. If empty, defaults to -j8'
installCommand:
description: 'Override the default cachix installation method'
skipAddingSubstituter:
description: 'Set to true to skip adding cachix cache as a substitute'
useDaemon:
description: "Push store paths to the cache as they're built with the Cachix Daemon"
default: true
cachixBin:
description: 'Provide a custom path to the cachix binary'
installCommand:
description: 'Override the default cachix installation method'
branding:
color: 'blue'
icon: 'database'
Expand Down
Loading

0 comments on commit c9fc59c

Please sign in to comment.