This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git
The following commit(s) were added to refs/heads/main by this push:
new 8f50592 PR Github AuTest CI: build with cmake (#221)
8f50592 is described below
commit 8f50592af246ae715f5b8973254eea2e43813fe4
Author: Brian Neradt <[email protected]>
AuthorDate: Tue Oct 10 13:51:25 2023 -0500
PR Github AuTest CI: build with cmake (#221)
This updates our PR autest CI to build with cmake, if it is available
(i.e., the branch has the implementation for it).
---
jenkins/github/autest.pipeline | 44 +++++++++++++++++++++++++++++++++---------
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/jenkins/github/autest.pipeline b/jenkins/github/autest.pipeline
index 0972a46..f236007 100644
--- a/jenkins/github/autest.pipeline
+++ b/jenkins/github/autest.pipeline
@@ -70,17 +70,32 @@ pipeline {
set -x
set -e
+
# We want to pick up the
OpenSSL-QUIC version of curl in /opt/bin.
# The HTTP/3 AuTests depend
upon this, so update the PATH accordingly.
export PATH=/opt/bin:${PATH}
- # Change permissions so that
all files are readable
- # (default user umask may
change and make these unreadable)
- sudo chmod -R o+r .
- autoreconf -fiv
- ./configure
--with-openssl=/opt/openssl-quic --enable-experimental-plugins
--enable-example-plugins --prefix=/tmp/ats --enable-werror --enable-debug
--enable-wccp --enable-ccache
- make -j4
- make install
+ # We do not support CMake
builds for the 9.x branch.
+ if [
"${GITHUB_PR_TARGET_BRANCH}" == "9.0.x" -o \
+
"${GITHUB_PR_TARGET_BRANCH}" == "9.1.x" -o \
+
"${GITHUB_PR_TARGET_BRANCH}" == "9.2.x" ]
+ then
+ echo "CMake builds are
not supported for the 9.x branch."
+ echo "Building with
autotools instead."
+
+ # Change permissions so
that all files are readable
+ # (default user umask
may change and make these unreadable)
+ sudo chmod -R o+r .
+ autoreconf -fiv
+ ./configure
--with-openssl=/opt/openssl-quic --enable-experimental-plugins
--enable-example-plugins --prefix=/tmp/ats --enable-werror --enable-debug
--enable-wccp --enable-ccache
+ make -j4
+ make install
+ else
+ echo "Building with
CMake."
+ cmake -B build --preset
ci-fedora-autest
+ cmake --build build -v
+ cmake --install build
+ fi
'''
}
}
@@ -99,8 +114,19 @@ pipeline {
export_dir="${WORKSPACE}/output/${GITHUB_PR_NUMBER}"
mkdir -p ${export_dir}
+ autest_args=""
+ if [ -d ../build ]; then
+ # CMake: Enter into the
build's test directory.
+ cd ../build/tests
+ pipenv install
+ autest_args="--sandbox
/tmp/sandbox"
+ else
+ # Autoconf.
+ autest_args="--ats-bin
/tmp/ats/bin/ --sandbox /tmp/sandbox"
+ fi
+
if [ ${SHARDCNT} -le 0 ]; then
- ./autest.sh --ats-bin
/tmp/ats/bin/ --sandbox /tmp/sandbox || true
+ ./autest.sh
${autest_args} || true
else
testsall=( $( find .
-iname "*.test.py" | awk -F'/' '{print $NF}' | awk -F'.' '{print $1}' ) )
testsall=( $(
@@ -113,7 +139,7 @@ pipeline {
[ 0 -ne $((${ntests} %
${shardsize})) ] && shardsize=$((${shardsize} + 1))
shardbeg=$((${shardsize} * ${SHARD}))
sliced=${testsall[@]:${shardbeg}:${shardsize}}
- ./autest.sh --ats-bin
/tmp/ats/bin/ --sandbox /tmp/sandbox -f ${sliced[@]} || true
+ ./autest.sh
${autest_args} -f ${sliced[@]} || true
fi