chore: Nix: print cumulative and per-line execution time on CI
This commit is contained in:
parent
4061894943
commit
e094bdcd62
2 changed files with 8 additions and 1 deletions
3
.github/workflows/nix-ci.yml
vendored
3
.github/workflows/nix-ci.yml
vendored
|
|
@ -14,7 +14,8 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: nix --experimental-features "nix-command flakes" shell .#nix -c bash -euo pipefail {0}
|
||||
# Can't use `nix-shell` without configured nixpkgs path on macOS
|
||||
shell: nix -v --experimental-features "nix-command flakes" run .#ciShell -- bash -euxo pipefail {0}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@
|
|||
temci = (import temci {}).override { doCheck = false; };
|
||||
nix = nix-pinned;
|
||||
nixpkgs = nixpkgs.legacyPackages.${system};
|
||||
ciShell = writeShellScriptBin "ciShell" ''
|
||||
set -o pipefail
|
||||
export PATH=${nix-pinned}/bin:${moreutils}/bin:$PATH
|
||||
# prefix lines with cumulative and individual execution time
|
||||
"$@" |& ts -i "(%.S)]" | ts -s "[%M:%S"
|
||||
'';
|
||||
};
|
||||
|
||||
defaultPackage = packages.lean;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue