Skip to content

Commit

Permalink
Add output to nix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tbidne committed Mar 14, 2024
1 parent 60ee0a9 commit 831f4be
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,26 @@ jobs:
nix_path: nixpkgs=channel:nixos-unstable

- name: Compile & Test
run: nix build
run: |
set +e
out=$(nix build 2>&1)
ec=$?
regex=".*'(nix log \/nix\/store\/.*.drv)'.*"
if [[ $ec -ne 0 ]]; then
if [[ $out =~ $regex ]]; then
echo echo "*** Regex match ***"
log_cmd="${BASH_REMATCH[1]}"
$log_cmd | cat
else
echo "*** No regex match on output ***"
echo $out
fi
fi
exit $ec
lint:
runs-on: "ubuntu-latest"
steps:
Expand Down

0 comments on commit 831f4be

Please sign in to comment.