From 4e350e255c886d8291cd4716896fd8c2ce92837a Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Tue, 28 Jul 2026 18:55:50 +0100 Subject: [PATCH] ci: switch the Nix cache to setup-nix-cache-action (#192) * ci: switch the Nix cache to setup-nix-cache-action Same as logos-chat-module#57 and logos-delivery-module#69; replaces the per-runner GitHub-actions cache with the shared Attic cache. Co-Authored-By: Claude Fable 5 * ci: retrigger --------- Co-authored-by: Claude Fable 5 --- .github/workflows/ci.yml | 12 ++++-------- flake.nix | 5 +++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee25277..47e2704 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,21 +49,17 @@ jobs: smoketest: name: Smoketest + environment: ${{ github.ref == 'refs/heads/main' && 'public-cache' || '' }} strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v31 + - uses: logos-co/setup-nix-cache-action@v1 with: - nix_version: 2.34.6 - extra_nix_config: | - experimental-features = nix-command flakes - - uses: nix-community/cache-nix-action@v6 - with: - primary-key: nix-${{ runner.os }}-fixtest-${{ hashFiles('flake.nix', 'flake.lock') }} - restore-prefixes-first-match: nix-${{ runner.os }}- + attic-token-ci: ${{ secrets.ATTIC_TOKEN_CI }} + attic-token-public: ${{ secrets.ATTIC_TOKEN_PUBLIC }} - name: Build logos-delivery run: nix build .#logos-delivery --print-build-logs # Build and run chat-cli through the dev shell so it links against the diff --git a/flake.nix b/flake.nix index cd3d706..c90d3f8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,11 @@ { description = "libchat - Logos Chat cryptographic library"; + nixConfig = { + extra-substituters = [ "https://cache.nix.logos.co/public" ]; + extra-trusted-public-keys = [ "public:l4HrXgL4nw246+LBh2SOJyhz64BoGegOYLheT/iIAPU=" ]; + }; + inputs = { # nixos-unstable-small has both crates.io UA fixes (NixOS/nixpkgs#512735, # NixOS/nixpkgs#524985); nixos-unstable hasn't caught up yet as of 2026-05-28.