-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions: stop on first failure and cat ctest log
- Loading branch information
Showing
12 changed files
with
295 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,84 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
# configure() { | ||
# cd /workspace | ||
# PATH="$PATH:$(realpath srcs/bde-tools/bin)" | ||
# export PATH | ||
# eval "$(bbs_build_env -u opt_64_cpp17)" | ||
# } | ||
|
||
configure() { | ||
cd /workspace | ||
PATH="$PATH:$(realpath srcs/bde-tools/bin)" | ||
export PATH | ||
eval "$(bbs_build_env -u opt_64_cpp17)" | ||
} | ||
build_ntf() { | ||
local rc=0 | ||
|
||
build_ntf() { | ||
cd /workspace/ntf-core | ||
sed -i s/CMakeLists.txt//g ./configure | ||
./configure --prefix /opt/bb | ||
make -j8 | ||
make test | tee test.log | ||
|
||
if cat test.log | grep -q "Errors while running CTest"; then | ||
echo "There are errors while running UTs, exiting..." | ||
exit 1 | ||
rc=${?} | ||
if [ ${rc} -ne 0 ]; then | ||
echo "Failed to change directory: rc = ${rc}" | ||
exit ${rc} | ||
fi | ||
|
||
local jobs=$(getconf _NPROCESSORS_ONLN) | ||
|
||
echo "Cores: ${concurrency}" | ||
free -h | ||
|
||
echo "Environment" | ||
env | ||
|
||
echo "File: /etc/hosts" | ||
cat /etc/hosts | ||
|
||
echo "File: /etc/services" | ||
cat /etc/services | ||
|
||
echo "File: /etc/resolv.conf" | ||
cat /etc/resolv.conf | ||
|
||
unset DISTRIBUTION_REFROOT | ||
unset PREFIX | ||
|
||
./configure --prefix /opt/bb \ | ||
--output /workspace/ntf-core/build \ | ||
--jobs ${jobs} \ | ||
--standalone \ | ||
--without-warnings \ | ||
--without-warnings-as-errors \ | ||
--from-continuous-integration | ||
rc=${?} | ||
if [ ${rc} -ne 0 ]; then | ||
echo "Failed to configure: rc = ${rc}" | ||
exit ${rc} | ||
fi | ||
|
||
make build | ||
rc=${?} | ||
if [ ${rc} -ne 0 ]; then | ||
echo "Failed to build: rc = ${rc}" | ||
exit ${rc} | ||
fi | ||
|
||
make build_test | ||
rc=${?} | ||
if [ ${rc} -ne 0 ]; then | ||
echo "Failed to build tests: rc = ${rc}" | ||
exit ${rc} | ||
fi | ||
|
||
make test | ||
rc=${?} | ||
if [ ${rc} -ne 0 ]; then | ||
cat /workspace/ntf-core/build/Testing/Temporary/LastTest.log | ||
echo "Failed to run tests successfully: rc = ${rc}" | ||
exit ${rc} | ||
fi | ||
|
||
make install | ||
rc=${?} | ||
if [ ${rc} -ne 0 ]; then | ||
echo "Failed to install: rc = ${rc}" | ||
exit ${rc} | ||
fi | ||
} | ||
|
||
configure | ||
# configure | ||
build_ntf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.