Skip to content
Draft
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
46 changes: 46 additions & 0 deletions .github/workflows/nix-flake-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Check the Nix Flake using `nix flake check`"

env:
ALLOWED_URIS: "https://github.com https://api.github.com"
TRUSTED_PUBLIC_KEYS: "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
SUBSTITUTERS: "https://cache.nixos.org/ https://cache.iog.io"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

on:
pull_request:
push:
branches:
- main

jobs:
nix-flake-check:
name: "Run nix flake check on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-15-intel, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: 🛠️ Install Nix
uses: cachix/install-nix-action@v21
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: https://releases.nixos.org/nix/nix-2.18.8/install
extra_nix_config: |
allowed-uris = ${{ env.ALLOWED_URIS }}
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }}
substituters = ${{ env.SUBSTITUTERS }}
experimental-features = nix-command flakes
accept-flake-config = true
- name: nix-flake-check
run: |
nix show-config
nix --show-trace -L flake check
7 changes: 4 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@
"aarch64-darwin"
];

# TODO(bladyjoker): Enable when Hydra is back to stable
flake.hydraJobs = import ./nix/hydra.nix {
flake = self;
inherit lib;
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
# "x86_64-darwin"
# "aarch64-linux"
# "aarch64-darwin"
];
};

Expand Down
Loading