diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cd99077fdc9300..6fffb7fb6196a0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,7 +35,7 @@ jobs: image: connectedhomeip/chip-build:0.5.79 volumes: - "/tmp/log_output:/tmp/test_logs" - options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: @@ -57,6 +57,11 @@ jobs: attempt_delay: 2000 - name: Checkout submodules run: scripts/checkout_submodules.py --shallow --platform linux + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -99,6 +104,22 @@ jobs: - name: Run Build Without Error Logging timeout-minutes: 20 run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Uploading core files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-core-linux-gcc-debug + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-objdir-linux-gcc-debug + path: out/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 build_linux: name: Build on Linux (fake, gcc_release, clang, simulated) timeout-minutes: 120 @@ -110,7 +131,7 @@ jobs: image: connectedhomeip/chip-build:0.5.79 volumes: - "/tmp/log_output:/tmp/test_logs" - options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: @@ -137,6 +158,11 @@ jobs: # languages: "cpp" - name: Checkout submodules run: scripts/checkout_submodules.py --shallow --platform linux + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -211,6 +237,22 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --no-log-timestamps --target linux-fake-tests build" + - name: Uploading core files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-core-linux + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-objdir-linux + path: out/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512