Skip to content

Commit

Permalink
Run reuse lint as part of nix check
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Jan 19, 2024
1 parent be7e624 commit 047f3b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- name: Nix Format Check
run: nix fmt -- . --check

- name: Nix Syntax Check
run: nix flake check
- name: Run Nix Checks
run: nix flake check -L

build-plan:
# Save some computation. If the checks fail, don't build.
Expand Down Expand Up @@ -106,4 +106,4 @@ jobs:
- name: Upload Cache
if: github.event_name != 'pull_request'
run: |
attic push public result/
attic push public result*
15 changes: 15 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@
};
lowrisc_pkgs = import ./pkgs {inherit pkgs inputs;};
in {
checks = {
license = pkgs.stdenv.mkDerivation {
name = "license-check";
src = ./.;
dontBuild = true;
doCheck = true;
nativeBuildInputs = with pkgs; [reuse];
checkPhase = ''
reuse lint
'';
installPhase = ''
mkdir $out
'';
};
};
packages = lowrisc_pkgs;
devShells = {
opentitan = pkgs.callPackage ./dev/opentitan.nix {
Expand Down

0 comments on commit 047f3b0

Please sign in to comment.