Skip to content

Commit

Permalink
feat(ci): nix cache for staging and testnet-internal
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed Apr 3, 2024
1 parent b1dd028 commit 4d8681f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/nix-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Nix Cache

on:
workflow_dispatch:
push:
# Only build nix cache for branches that need distribution
branches: [ "staging", "testnet-internal", "o/nix-ci" ]

env:
CARGO_TERM_COLOR: always

jobs:
# build & cache project dependencies
deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with:
name: fleek-network
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#lightning-deps

# build & cache node binary
node:
runs-on: ubuntu-latest
needs: deps
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with:
name: fleek-network
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#lightning-node

# build & cache services binaries
services:
runs-on: ubuntu-latest
needs: deps
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with:
name: fleek-network
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#lightning-services
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
};

flake-utils.url = "github:numtide/flake-utils";

};

outputs = { self, nixpkgs, crane, fenix, flake-utils, ... }:
Expand Down Expand Up @@ -186,6 +185,9 @@
name = "lightning-node-full";
paths = [ lightning-node lightning-services ];
};

# Expose for standalone ci step
lightning-deps = cargoArtifacts;
} // lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
lightning-llvm-coverage = llvmCraneLib.cargoLlvmCov
(commonArgs // { inherit cargoArtifacts; });
Expand Down

0 comments on commit 4d8681f

Please sign in to comment.