Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add magic-nix #1472

Closed
wants to merge 11 commits into from
Closed
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
34 changes: 29 additions & 5 deletions .github/workflows/ci-nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ jobs:
benchmarks:
name: "Benchmarks"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
include:
Expand Down Expand Up @@ -170,6 +173,11 @@ jobs:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'

- name: ❄ Magic nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
source-url: https://github.com/locallycompact/magic-nix-cache

- name: 📈 Benchmark
run: |
mkdir -p benchmarks
Expand Down Expand Up @@ -232,6 +240,10 @@ jobs:
nix-flake-check:
name: "nix flake check"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
Expand All @@ -243,20 +255,27 @@ jobs:
accept-flake-config = true
log-lines = 1000

- name: ❄ Cachix cache of nix derivations
uses: cachix/cachix-action@v15
- name: ❄ Magic nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'
source-url: https://github.com/locallycompact/magic-nix-cache

- run: cat ~/.config/nix/nix.conf

- run: cat /etc/nix/nix.conf

- name: ❄ Nix Flake Check
run: |
nix flake check -L
nix flake check -L


build-specification:
name: "Build specification using nix"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
Expand All @@ -274,6 +293,11 @@ jobs:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'

- name: ❄ Magic nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
source-url: https://github.com/locallycompact/magic-nix-cache

- name: ❄ Build specification PDF
run: |
nix build .#spec && cp result/*.pdf spec/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# <p align="center">Hydra :dragon_face:</p>


<div align="center">
<p>Implementation of the Hydra scalability protocols.</p>
<a href='https://github.com/cardano-scaling/hydra/actions'><img src="https://img.shields.io/github/actions/workflow/status/cardano-scaling/hydra/ci-nix.yaml?branch=master&label=Tests&style=for-the-badge" /></a>
Expand Down
13 changes: 0 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,4 @@
};
};

nixConfig = {
extra-substituters = [
"https://cache.iog.io"
"https://hydra-node.cachix.org"
"https://cardano-scaling.cachix.org"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"hydra-node.cachix.org-1:vK4mOEQDQKl9FTbq76NjOuNaRD4pZLxi1yri31HHmIw="
"cardano-scaling.cachix.org-1:RKvHKhGs/b6CBDqzKbDk0Rv6sod2kPSXLwPzcUQg9lY="
];
allow-import-from-derivation = true;
};
}
Loading