Add simple CI. At least it checks that all targets build
This commit is contained in:
parent
d67944d5ae
commit
33282d65db
18
.circleci/config.yml
Normal file
18
.circleci/config.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nix:
|
||||||
|
docker:
|
||||||
|
- image: nixos/nix:latest
|
||||||
|
working_directory: ~/NixGL
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Build all wrapper (with default version for nvidia)
|
||||||
|
command: nix-build ./all.nix
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
nix_stack:
|
||||||
|
jobs:
|
||||||
|
- nix
|
4
all.nix
Normal file
4
all.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import ./default.nix {
|
||||||
|
nvidiaVersion = "440.82";
|
||||||
|
nvidiaHash = "edd415acf2f75a659e0f3b4f27c1fab770cf21614e84a18152d94f0d004a758e";
|
||||||
|
}
|
|
@ -29,8 +29,15 @@ let
|
||||||
executable = true;
|
executable = true;
|
||||||
destination = "/bin/${name}";
|
destination = "/bin/${name}";
|
||||||
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${nixpkgs.shellcheck}/bin/shellcheck "$out/bin/${name}"
|
${nixpkgs.shellcheck}/bin/shellcheck "$out/bin/${name}"
|
||||||
|
|
||||||
|
# Check that all the files listed in the output binary exists
|
||||||
|
for i in $(${nixpkgs.pcre}/bin/pcregrep -o0 '/nix/store/.*?/[^ ":]+' $out/bin/${name})
|
||||||
|
do
|
||||||
|
ls $i > /dev/null || (echo "File $i, referenced in $out/bin/${name} does not exists."; exit -1)
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user