run build on travis and make warnings fail

This commit is contained in:
Daiderd Jordan 2018-04-12 23:23:32 +02:00
parent 21751a4505
commit bf8ed0538f
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 11 additions and 2 deletions

View file

@ -2,5 +2,6 @@ language: nix
matrix:
include:
- script:
- nix-shell --run 'cd ofborg && cargo test --lib -- --nocapture'
- nix-shell --run 'cd ofborg && cargo test --lib -- --nocapture' --arg useNix1 true
- nix-shell --run checkPhase
- nix-shell --run checkPhase --arg useNix1 true
- nix-build -A ofborg.rs

View file

@ -35,7 +35,15 @@ let
++ stdenv.lib.optional useNix1 nix1
++ stdenv.lib.optional stdenv.isDarwin pkgs.darwin.Security;
postHook = ''
checkPhase() {
( cd "${builtins.toString ./.}/ofborg" && cargo test --lib )
}
'';
HISTFILE = "${toString ./.}/.bash_hist";
RUSTFLAGS = "-D warnings";
passthru.phpEnv = phpEnv;
};