diff --git a/.github/workflows/ci-test-ubuntu.yml b/.github/workflows/ci-test-ubuntu.yml index e021df1e9..828faa66d 100644 --- a/.github/workflows/ci-test-ubuntu.yml +++ b/.github/workflows/ci-test-ubuntu.yml @@ -50,17 +50,22 @@ jobs: - name: Build run: | - sudo -E ./p4studio/p4studio profile apply ./p4studio/profiles/testing.yaml + ./p4studio/p4studio profile apply ./p4studio/profiles/testing.yaml + + - name: Show build logs + if: success() || failure() + run: | + ./ci/show-build-logs.sh - name: Run tests run: | # FIXME: Move these into a separate test suite. - sudo -E ENABLE_BF_ASM=TRUE make -C build tna_counter install + ENABLE_BF_ASM=TRUE make -C build tna_counter install export SDE=`pwd` export SDE_INSTALL="`pwd`/install" sudo ${SDE_INSTALL}/bin/veth_setup.sh 128 - sudo -E ./run_tofino_model.sh -p tna_counter --arch tofino -q |& sed 's/^/model: /' & - sudo -E ./run_switchd.sh -p tna_counter --arch tofino |& sed 's/^/switchd: /' & - sudo -E timeout 10800 ./run_p4_tests.sh -p tna_counter --arch tofino |& sed 's/^/tests: /' + ./run_tofino_model.sh -p tna_counter --arch tofino -q |& sed 's/^/model: /' & + ./run_switchd.sh -p tna_counter --arch tofino |& sed 's/^/switchd: /' & + timeout 10800 ./run_p4_tests.sh -p tna_counter --arch tofino |& sed 's/^/tests: /' diff --git a/batch-install.sh b/batch-install.sh index ebc75343f..7badaa4f2 100755 --- a/batch-install.sh +++ b/batch-install.sh @@ -195,10 +195,6 @@ date TIME_START=$(date +%s) set -x -# This is required for some of the build steps, but is not installed -# by any later commands. -sudo apt-get install --yes ccache - set +x echo "Version of p4lang/open-p4studio repo used:" set -x @@ -212,7 +208,7 @@ set -x git log -n 1 | head -n 3 cd "${THIS_SCRIPT_DIR_ABSOLUTE}" -sudo -E ./p4studio/p4studio profile apply --jobs ${num_jobs} ./p4studio/profiles/testing.yaml +./p4studio/p4studio profile apply --jobs ${num_jobs} ./p4studio/profiles/testing.yaml set +x echo "------------------------------------------------------------" diff --git a/ci/show-build-logs.sh b/ci/show-build-logs.sh new file mode 100755 index 000000000..0cc95c3f4 --- /dev/null +++ b/ci/show-build-logs.sh @@ -0,0 +1,53 @@ +#! /bin/bash + +# Copyright (C) 2025 Andy Fingerhut +# SPDX-License-Identifier: Apache-2.0 + +# Basic system info +set -x +uname -a +nproc +cat /proc/meminfo +gcc --version + +set +x +echo "------------------------------------------------------------" +echo "Info about Python binaries and packages installed." +echo "------------------------------------------------------------" +set -x +python3 -V +find . -name 'python3.*' +du install/lib + +set +x +for f in p4studio/logs/* +do + set -x + wc $f + set +x +done + +set +x +echo "------------------------------------------------------------" +echo "Occurrences of 'killed process' in dmesg logs are a likely sign" +echo "that a process was killed by the kernel due to the system running" +echo "our of memory, leading to unpredictable build failures." +echo "------------------------------------------------------------" +set -x +sudo dmesg -T | egrep -i 'killed process' + +set +x +echo "------------------------------------------------------------" +echo "Full output of command: dmesg -T" +echo "------------------------------------------------------------" +set -x +sudo dmesg -T + +set +x +for f in p4studio/logs/* +do + echo "------------------------------------------------------------" + echo "Contents of log file: $f" + echo "------------------------------------------------------------" + cat $f +done diff --git a/p4studio/dependencies/dependencies.yaml b/p4studio/dependencies/dependencies.yaml index df28340f4..3fce3ca71 100755 --- a/p4studio/dependencies/dependencies.yaml +++ b/p4studio/dependencies/dependencies.yaml @@ -318,7 +318,7 @@ packages: tags: [default, source] type: source thrift: - attributes: {flags: --with-cl="no" --with-java="no" --with-kotlin="no" --with-python="yes" --with-py3="yes" --with-ruby="no" --with-haxe="no" --with-netstd="no" --with-perl="no" --with-php="no" --with-php_extension="no" --with-dart="no" --with-erlang="no" --with-go="no" --with-d="no" --with-nodejs="no" --with-nodets="no" --with-lua="no" --with-rs="no" --with-swift="no" --enable-tests=no, url: 'https://archive.apache.org/dist/thrift/0.14.1/thrift-0.14.1.tar.gz', version: 0.14.1} + attributes: {flags: --with-cl="no" --with-java="no" --with-kotlin="no" --with-python="yes" --with-py3="yes" --with-ruby="no" --with-haskell="no" --with-haxe="no" --with-netstd="no" --with-perl="no" --with-php="no" --with-php_extension="no" --with-dart="no" --with-erlang="no" --with-go="no" --with-d="no" --with-nodejs="no" --with-nodets="no" --with-lua="no" --with-rs="no" --with-swift="no" --enable-tests=no, url: 'https://archive.apache.org/dist/thrift/0.14.1/thrift-0.14.1.tar.gz', version: 0.14.1} tags: [default, source] dependencies: [boost] type: source