mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 19:05:51 +00:00
[TravisCI] Implement TravisCI build and testing infrastructure for Linux
The Linux builds rely on Docker (using Ubuntu 16.04LTS and Ubuntu 14.04LTS) to build and test Z3 so that builds are easily reproducible. A build status button has been added to `README.md` so that it is easy to see the current build status. More documentation can be found in `contrib/ci/README.md`. This implementation currently tests 13 different configurations. If build times become too long we can remove some of them. Although it would be nice to test macOS builds that requires significantly more work so I have left this as future work.
This commit is contained in:
parent
be4b0ffe69
commit
8310fed528
21 changed files with 1107 additions and 3 deletions
41
contrib/ci/scripts/run_quiet.sh
Normal file
41
contrib/ci/scripts/run_quiet.sh
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Simple wrapper function that runs a command suppressing
|
||||
# it's output. However it's output will be shown in the
|
||||
# case that `NO_SUPPRESS_OUTPUT` is set to `1` or the command
|
||||
# fails.
|
||||
#
|
||||
# The use case for this trying to avoid large logs on TravisCI
|
||||
function run_quiet() {
|
||||
if [ "X${NO_SUPPRESS_OUTPUT}" = "X1" ]; then
|
||||
"${@}"
|
||||
else
|
||||
OLD_SETTINGS="$-"
|
||||
set +x
|
||||
set +e
|
||||
TMP_DIR="${TMP_DIR:-/tmp/}"
|
||||
STDOUT="${TMP_DIR}/$$.stdout"
|
||||
STDERR="${TMP_DIR}/$$.stderr"
|
||||
"${@}" > "${STDOUT}" 2> "${STDERR}"
|
||||
EXIT_STATUS="$?"
|
||||
if [ "${EXIT_STATUS}" -ne 0 ]; then
|
||||
echo "Command \"$@\" failed"
|
||||
echo "EXIT CODE: ${EXIT_STATUS}"
|
||||
echo "STDOUT"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
cat ${STDOUT}
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
echo "STDERR"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
cat ${STDERR}
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
fi
|
||||
# Clean up
|
||||
rm "${STDOUT}" "${STDERR}"
|
||||
[ $( echo "${OLD_SETTINGS}" | grep -c 'e') -ne 0 ] && set -e
|
||||
[ $( echo "${OLD_SETTINGS}" | grep -c 'x') -ne 0 ] && set -x
|
||||
return ${EXIT_STATUS}
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue