Skip to content

Commit

Permalink
chore(ci): add nix flake build
Browse files Browse the repository at this point in the history
  • Loading branch information
ch4og committed Oct 8, 2024
1 parent 4bc6b7a commit 50f6acd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ jobs:
name: binsider-${{ matrix.build.TARGET }}-assets
path: target/debug/binsider*

nix-flake:
name: Build Nix flake
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Setup Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Check Nix flake
run: nix flake check --all-systems

test:
name: Test
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
rec {
packages = rec {
binsider = pkgs.rustPlatform.buildRustPackage {
name = "binsider";
Expand All @@ -30,6 +30,9 @@
};
default = binsider;
};
checks = {
check = packages.binsider;
};
}
);

Expand Down

0 comments on commit 50f6acd

Please sign in to comment.