Compare commits
10 Commits
c6b590f77a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f80918aed9 | ||
|
|
17e2575600 | ||
|
|
35ce701189 | ||
|
|
2aaf149945 | ||
|
|
a46b211b39 | ||
|
|
aa181ca09b | ||
|
|
5e535e584b | ||
|
|
ebdf8a748f | ||
|
|
96fe1e27ca | ||
|
|
d2e46641c4 |
@@ -31,7 +31,9 @@ jobs:
|
||||
host: ${{ matrix.host }}
|
||||
username: root
|
||||
key: ${{ secrets.BUILD_SSH_KEY }}
|
||||
timeout: 7200 # 2 hours
|
||||
timeout: 5h # 2 hours
|
||||
command_timeout: 5h
|
||||
envs: "PATH=/usr/tgcware/gnu/:/usr/dbpware/bin:/usr/tgcware/gcc43/bin:/usr/tgcware/bin:/usr/local/bin:/usr/bin,SUPATH=/usr/tgcware/gnu/:/usr/dbpware/sbin:/usr/dbpware/bin:/usr/tgcware/gcc43/bin:/usr/tgcware/sbin:/usr/tgcware/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
|
||||
script: |
|
||||
set -e
|
||||
|
||||
@@ -53,7 +55,7 @@ jobs:
|
||||
# host: ${{ matrix.host }}
|
||||
# username: root
|
||||
# key: ${{ secrets.BUILD_SSH_KEY }}
|
||||
# timeout: 10800 # 3 hours
|
||||
# timeout: 3h # 3 hours
|
||||
# script: |
|
||||
# export BUILDPKG_SCRIPTS=/usr/src/buildpkg/
|
||||
# export BUILDPKG_BASE=/usr/src/dbpware-for-solaris/
|
||||
|
||||
@@ -17,16 +17,13 @@ done
|
||||
trap "rmdir '$LOCKDIR'" EXIT
|
||||
echo "Acquired host lock, starting build of $PKG"
|
||||
|
||||
# --- Navigate to package directory ---
|
||||
cd "$BUILDPKG_BASE/$PKG"
|
||||
|
||||
# --- Read package metadata from build.sh ---
|
||||
topdir=$(ggrep -E '^topdir=' build.sh | cut -d= -f2)
|
||||
version=$(ggrep -E '^version=' build.sh | cut -d= -f2)
|
||||
pkgver=$(ggrep -E '^pkgver=' build.sh | cut -d= -f2)
|
||||
secname="$topdir"
|
||||
|
||||
# --- Check if package already exists ---
|
||||
PKGFILE=$(ls -1 ${secname}-${version}-${pkgver}.dbp*.gz 2>/dev/null | head -n1 || true)
|
||||
if [ -n "$PKGFILE" ]; then
|
||||
echo "Package already built: $PKGFILE. Skipping."
|
||||
@@ -34,25 +31,26 @@ if [ -n "$PKGFILE" ]; then
|
||||
fi
|
||||
|
||||
# --- Run the build ---
|
||||
LOGFILE=$(bash build.sh all 2>&1 | tee /tmp/build-$secname.log | ggrep -oE '[^ ]+\.log' | gtail -n1)
|
||||
if [ -n "$LOGFILE" ] && [ -f "$LOGFILE" ]; then
|
||||
echo "Tailing logfile: $LOGFILE"
|
||||
gtail -f "$LOGFILE" &
|
||||
TAIL_PID=$!
|
||||
else
|
||||
echo "ERROR: No logfile detected for $PKG"
|
||||
exit 1
|
||||
/usr/dbpware/bin/bash build.sh all
|
||||
EXIT_CODE=$?
|
||||
|
||||
# --- Find logfile ---
|
||||
LOGFILE=$(ls -1 ${secname}-*.log 2>/dev/null | sort | tail -n1)
|
||||
|
||||
# --- Always output logfile ---
|
||||
if [ -f "$LOGFILE" ]; then
|
||||
echo
|
||||
echo "================ Log output: $LOGFILE ================"
|
||||
cat "$LOGFILE"
|
||||
echo "====================================================="
|
||||
fi
|
||||
|
||||
wait -n
|
||||
EXIT_CODE=$?
|
||||
kill $TAIL_PID || true
|
||||
|
||||
# --- Handle logfile ---
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
echo "Build succeeded for $PKG, deleting logfile."
|
||||
echo "Build succeeded for $PKG, deleting logfile: $LOGFILE"
|
||||
rm -f "$LOGFILE" || true
|
||||
else
|
||||
echo "Build FAILED for $PKG, keeping logfile: $LOGFILE"
|
||||
echo "Build FAILED for $PKG, logfile kept: $LOGFILE"
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user