Add simple CI. At least it checks that all targets build

This commit is contained in:
Guillaume Bouchard 2020-04-26 14:44:47 +02:00
parent d67944d5ae
commit 33282d65db
3 changed files with 29 additions and 0 deletions

18
.circleci/config.yml Normal file
View 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
View File

@ -0,0 +1,4 @@
import ./default.nix {
nvidiaVersion = "440.82";
nvidiaHash = "edd415acf2f75a659e0f3b4f27c1fab770cf21614e84a18152d94f0d004a758e";
}

View File

@ -29,8 +29,15 @@ let
executable = true;
destination = "/bin/${name}";
checkPhase = ''
${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
'';
};