Skip to content

Commit

Permalink
ci: Replace seed cachix workflow with new daemon mode
Browse files Browse the repository at this point in the history
cachix-action v14 added a new daemon mode, which pushes new derivations to the store
as soon as they have been built. This replaces the seed cachix workflow nicely by just
pushing from all jobs directly.
  • Loading branch information
wolfgangwalther committed Feb 5, 2024
1 parent e5d9645 commit 98bc837
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 72 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/cachix.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
cache-id: common
tools: style withTools memory tests release postgrestPackage

Expand All @@ -38,6 +39,7 @@ jobs:
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: style
cache-id: common
- name: Run linter (check locally with `nix-shell --run postgrest-lint`)
Expand All @@ -60,6 +62,7 @@ jobs:
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: tests
cache-id: common

Expand Down Expand Up @@ -97,6 +100,7 @@ jobs:
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: tests withTools
# It seems like they are installing the same set of derivations, so we can assign them the same cache id.
# This would decrease the amount of caches dowloaded on merge cache step and will prevent disk space issues.
Expand All @@ -120,6 +124,7 @@ jobs:
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: memory
cache-id: common
- name: Run memory tests
Expand All @@ -133,6 +138,8 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build static executable
run: nix-build -A postgrestStatic
Expand All @@ -159,6 +166,8 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build everything
run: |
Expand Down Expand Up @@ -469,6 +478,7 @@ jobs:
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: release
- name: Download Docker image
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 98bc837

Please sign in to comment.