diff --git a/.github/workflows/haskell-linux.yml b/.github/workflows/haskell-linux.yml index 38127b0cee5..18766d9e804 100644 --- a/.github/workflows/haskell-linux.yml +++ b/.github/workflows/haskell-linux.yml @@ -158,6 +158,22 @@ jobs: KEEP_WORKSPACE: 1 run: cabal test cardano-testnet cardano-api cardano-node cardano-node-chairman cardano-cli cardano-submit-api + - name: Tar failed tests workspaces + if: ${{ failure() }} + env: + TMP: ${{ runner.temp }} + shell: bash + run: | + cd $TMP + find . -name 'module' -type f -printf '%h\n' | xargs -L1 basename | sort -u | xargs tar -czvf workspaces.tgz + + - name: Upload workspaces on tests failure + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz + path: ${{ runner.temp }}/workspaces.tgz + - name: "Tar artifacts" shell: bash run: | diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index d13d9ebe538..b38e4a0bb08 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -187,6 +187,22 @@ jobs: ${{ (runner.os == 'Windows' && '$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)') || '' }} cabal test cardano-testnet cardano-api cardano-node cardano-node-chairman cardano-cli cardano-submit-api + - name: Tar failed tests workspaces + if: ${{ failure() }} + env: + TMP: ${{ runner.temp }} + shell: bash + run: | + cd $TMP + find . -name 'module' -type f -printf '%h\n' | xargs -L1 basename | sort -u | xargs tar -czvf workspaces.tgz + + - name: Upload workspaces on tests failure + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz + path: ${{ runner.temp }}/workspaces.tgz + - name: "Tar artifacts" shell: bash run: |