Closed mo-xiaoming closed 3 years ago
When git action failed, there is no log artifact uploaded
- name: nix build hobbesPackages/clang-${{ matrix.clang }}/hobbes run: | nix build .#hobbesPackages/clang-${{ matrix.clang }}/hobbes nix log .#hobbesPackages/clang-${{ matrix.clang }}/hobbes &> ${{ matrix.os }}-clang-${{ matrix.clang }}-hobbes.log - name: upload log ${{ matrix.os }}-clang-${{ matrix.clang }}-hobbes.log
If things go wrong during nix build, the whole process will be aborted and both nix log and next step upload log will never get executed
nix build
nix log
upload log
By splitting two nix commands and adding if ${{ always() }} to force the execution, log will be uploaded no matter what.
nix
if ${{ always() }}
Not sure is this the right way of doing it
When git action failed, there is no log artifact uploaded
If things go wrong during
nix build
, the whole process will be aborted and bothnix log
and next stepupload log
will never get executedBy splitting two
nix
commands and addingif ${{ always() }}
to force the execution, log will be uploaded no matter what.Not sure is this the right way of doing it