Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/actions/setup-nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ runs:
- name: Install nix
uses: DeterminateSystems/determinate-nix-action@main
- name: Use nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
uses: nix-community/cache-nix-action@v7
with:
use-flakehub: false
primary-key: nix-${{ runner.os }}-${{ github.job }}-${{ hashFiles('flake.nix', 'flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-${{ github.job }}-
gc-max-store-size: 1G
purge: true
purge-prefixes: nix-${{ runner.os }}-${{ github.job }}-
purge-created: 0
purge-primary-key: never
24 changes: 6 additions & 18 deletions .github/workflows/rust.yml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not simply use the setup-nix/action job for these workflows as well instead of copying them?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed I guess I missed those in my refactor, they should use the shared nix setup action too.

Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ jobs:
# The toolchain must be specified manually, as this action ignores the rust-toolchain override
# https://github.com/dtolnay/rust-toolchain?tab=readme-ov-file#inputs
toolchain: ${{ matrix.rust }}
- name: "Install nix"
uses: DeterminateSystems/determinate-nix-action@main
- name: "Use nix cache"
uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
- name: Set up nix
uses: ./.github/actions/setup-nix
- name: "Add nginxWithStream to PATH"
run: |
# This is necessary for payjoin-mailroom integration tests
Expand All @@ -49,12 +45,8 @@ jobs:
uses: actions/checkout@v6
- name: "Use cache"
uses: Swatinem/rust-cache@v2
- name: "Install nix"
uses: DeterminateSystems/determinate-nix-action@main
- name: "Use nix cache"
uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
- name: Set up nix
uses: ./.github/actions/setup-nix
- name: "Run code linting"
run: nix develop -c ./contrib/lint.sh
- name: "Run documentation linting"
Expand All @@ -77,12 +69,8 @@ jobs:
- name: "Install toolchain"
# rust-cache usage with stable Rust is most effective, as a cache is tied to the Rust version
uses: dtolnay/rust-toolchain@stable
- name: "Install nix"
uses: DeterminateSystems/determinate-nix-action@main
- name: "Use nix cache"
uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
- name: Set up nix
uses: ./.github/actions/setup-nix
- name: "Add nginxWithStream to PATH"
run: |
# This is necessary for payjoin-mailroom integration tests
Expand Down
Loading