]> The Tcpdump Group git mirrors - tcpdump/commit
Add the build_matrix.sh and build.sh scripts
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 7 Feb 2021 10:22:24 +0000 (11:22 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 9 Feb 2021 15:11:39 +0000 (16:11 +0100)
commit973e9c1c9c12bdab5e038c364e62bd099d3645ec
treeaf493a9f930151db1ec29ac3c462b4fc00487864
parentca3470f44e211cb0843b5aee2479f28f0dfa5a02
Add the build_matrix.sh and build.sh scripts

Use them with Travis CI to build with less builders and save CI runtime.
This will currently run five builders: amd64, arm64, ppc64le, s390x and osx.

The build_matrix.sh script executes the matrix loops, exclude tests and
cleaning.
It conditionally builds libpcap running the build.sh script of libpcap.
It calls the build.sh script which runs one build with setup environment
variables: BUILD_LIBPCAP, REMOTE, CC, CMAKE, CRYPTO and SMB
(default: BUILD_LIBPCAP=no, REMOTE=no, CC=gcc, CMAKE=no, CRYPTO=no, SMB=no).
The matrix can be configured with environment variables
MATRIX_BUILD_LIBPCAP, MATRIX_REMOTE, MATRIX_CC, MATRIX_CMAKE, MATRIX_CRYPTO
and MATRIX_SMB
(default: MATRIX_BUILD_LIBPCAP='no yes', MATRIX_REMOTE='no yes',
MATRIX_CC='gcc clang', MATRIX_CMAKE='no yes', MATRIX_CRYPTO='no yes',
MATRIX_SMB='no yes').

These scripts can easily be updated to run new tests (32 bits builds,
sanitizers, coverage, etc).

They can be used locally for build tests or used with other CI systems.

Run examples:
./build_matrix.sh
MATRIX_BUILD_LIBPCAP=yes ./build_matrix.sh
MATRIX_CC=clang ./build_matrix.sh
CC=clang ./build.sh
CMAKE=yes ./build.sh
CC=clang CMAKE=yes CRYPTO=yes ./build.sh

Moreover:
Remove the old workaround PATH=$PATH...
Update the install directory prefix to /tmp/local.
Use vim modeline in the two shell scripts.
.travis.yml
build.sh [new file with mode: 0755]
build_matrix.sh [new file with mode: 0755]