mirror of
https://github.com/Z3Prover/z3
synced 2025-07-28 15:07:56 +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
46
contrib/ci/scripts/set_compiler_flags.sh
Normal file
46
contrib/ci/scripts/set_compiler_flags.sh
Normal file
|
@ -0,0 +1,46 @@
|
|||
# This script should is intended to be included by other
|
||||
# scripts and should not be executed directly
|
||||
|
||||
: ${TARGET_ARCH?"TARGET_ARCH must be specified"}
|
||||
: ${ASAN_BUILD?"ASAN_BUILD must be specified"}
|
||||
: ${UBSAN_BUILD?"UBSAN_BUILD must be specified"}
|
||||
: ${CC?"CC must be specified"}
|
||||
: ${CXX?"CXX must be specified"}
|
||||
|
||||
case ${TARGET_ARCH} in
|
||||
x86_64)
|
||||
CXXFLAGS="${CXXFLAGS} -m64"
|
||||
CFLAGS="${CFLAGS} -m64"
|
||||
;;
|
||||
i686)
|
||||
CXXFLAGS="${CXXFLAGS} -m32"
|
||||
CFLAGS="${CFLAGS} -m32"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown arch \"${TARGET_ARCH}\""
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [ "X${ASAN_BUILD}" = "X1" ]; then
|
||||
CXXFLAGS="${CXXFLAGS} -fsanitize=address -fno-omit-frame-pointer"
|
||||
CFLAGS="${CFLAGS} -fsanitize=address -fno-omit-frame-pointer"
|
||||
fi
|
||||
|
||||
if [ "X${UBSAN_BUILD}" = "X1" ]; then
|
||||
CXXFLAGS="${CXXFLAGS} -fsanitize=undefined"
|
||||
CFLAGS="${CFLAGS} -fsanitize=undefined"
|
||||
fi
|
||||
|
||||
# Report flags
|
||||
echo "CXXFLAGS: ${CXXFLAGS}"
|
||||
echo "CFLAGS: ${CFLAGS}"
|
||||
|
||||
# Report compiler
|
||||
echo "CC: ${CC}"
|
||||
${CC} --version
|
||||
echo "CXX: ${CXX}"
|
||||
${CXX} --version
|
||||
|
||||
# Export the values
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
Loading…
Add table
Add a link
Reference in a new issue