3 Commits

Author SHA1 Message Date
42b51ef0be test: Update 2 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 1m8s
Build-Test-Publish / build (linux/arm64) (push) Failing after 1m57s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
2025-06-25 22:38:12 +12:00
f094d532cf Modify buildtestpublish_all.sh
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 1m27s
Build-Test-Publish / build (linux/arm64) (push) Failing after 2m41s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
2025-06-25 22:33:09 +12:00
fffa88482a Modify buildtestpublish_all.sh
Some checks failed
Build-Test-Publish / build (linux/arm64) (push) Failing after 30s
Build-Test-Publish / build (linux/amd64) (push) Failing after 32s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
2025-06-25 22:32:04 +12:00
2 changed files with 51 additions and 18 deletions

View File

@ -2,6 +2,9 @@
set -uo pipefail # Remove -e to handle errors manually set -uo pipefail # Remove -e to handle errors manually
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
docker builder prune -f
# Colors for output # Colors for output
RED='\033[0;31m' RED='\033[0;31m'
GREEN='\033[0;32m' GREEN='\033[0;32m'
@ -112,13 +115,35 @@ function buildtestpublish() {
cd "$dir" || echo "Failed to cd to $dir" cd "$dir" || echo "Failed to cd to $dir"
subtitle "🔨 BUILDING $TOOLNAME_UPPER 🔨" subtitle "🔨 BUILDING $TOOLNAME_UPPER 🔨"
dothis build "$dir" "$TOOLNAME" if dothis build "$dir" "$TOOLNAME"; then
BUILD_SUCCESS=true
else
BUILD_SUCCESS=false
fi
subtitle "🔍 TESTING $TOOLNAME_UPPER 🔍" subtitle "🔍 TESTING $TOOLNAME_UPPER 🔍"
dothis test "$dir" "$TOOLNAME" if [ "$BUILD_SUCCESS" = true ]; then
if dothis test "$dir" "$TOOLNAME"; then
TEST_SUCCESS=true
else
TEST_SUCCESS=false
fi
else
echo "Skipping tests - build failed"
TEST_RESULTS["$TOOLNAME"]="SKIP"
TEST_SUCCESS=false
fi
subtitle "📦 PUBLISHING $TOOLNAME_UPPER 📦" subtitle "📦 PUBLISHING $TOOLNAME_UPPER 📦"
if [ "$BUILD_SUCCESS" = true ] && [ "$TEST_SUCCESS" = true ]; then
dothis publish "$dir" "$TOOLNAME" dothis publish "$dir" "$TOOLNAME"
elif [ "$BUILD_SUCCESS" = true ] && [ "${TEST_RESULTS[$TOOLNAME]}" = "SKIP" ]; then
# If tests are skipped (no test script), allow publish if build succeeded
dothis publish "$dir" "$TOOLNAME"
else
echo "Skipping publish - build or tests failed"
PUBLISH_RESULTS["$TOOLNAME"]="SKIP"
fi
echo "Done" echo "Done"
} }
@ -175,27 +200,27 @@ function print_summary() {
# Format status with proper spacing and colors for Unicode characters # Format status with proper spacing and colors for Unicode characters
local build_col test_col publish_col local build_col test_col publish_col
# Format build status # Format build status with colors
case "$build_status" in case "$build_status" in
"✓") build_col=" ${GREEN}${NC} " ;; "✓") build_col=$(printf " ${GREEN}${NC} ") ;;
"✗") build_col=" ${RED}${NC} " ;; "✗") build_col=$(printf " ${RED}${NC} ") ;;
"SKIP") build_col=" ${YELLOW}-${NC} " ;; "SKIP") build_col=$(printf " ${YELLOW}-${NC} ") ;;
*) build_col=" - " ;; *) build_col=" - " ;;
esac esac
# Format test status # Format test status with colors
case "$test_status" in case "$test_status" in
"✓") test_col=" ${GREEN}${NC} " ;; "✓") test_col=$(printf " ${GREEN}${NC} ") ;;
"✗") test_col=" ${RED}${NC} " ;; "✗") test_col=$(printf " ${RED}${NC} ") ;;
"SKIP") test_col=" ${YELLOW}-${NC} " ;; "SKIP") test_col=$(printf " ${YELLOW}-${NC} ") ;;
*) test_col=" - " ;; *) test_col=" - " ;;
esac esac
# Format publish status # Format publish status with colors
case "$publish_status" in case "$publish_status" in
"✓") publish_col=" ${GREEN}${NC} " ;; "✓") publish_col=$(printf " ${GREEN}${NC} ") ;;
"✗") publish_col=" ${RED}${NC} " ;; "✗") publish_col=$(printf " ${RED}${NC} ") ;;
"SKIP") publish_col=" ${YELLOW}-${NC} " ;; "SKIP") publish_col=$(printf " ${YELLOW}-${NC} ") ;;
*) publish_col=" - " ;; *) publish_col=" - " ;;
esac esac

View File

@ -16,15 +16,23 @@ rm -f dehydrate_test
# Build the test program using Docker # Build the test program using Docker
# The Docker container supports both amd64 and arm64 architectures # The Docker container supports both amd64 and arm64 architectures
echo "PROJECT_DIR: $PROJECT_DIR"
echo "SCRIPT_DIR: $SCRIPT_DIR"
echo "Current directory: $(pwd)"
echo "Files in current directory:"
ls -la
docker run --rm \ docker run --rm \
-v "$PROJECT_DIR":/workdir \ -v "$SCRIPT_DIR":/workdir \
-w /workdir/test \ -w /workdir \
gitea.jde.nz/public/dropshell-build-base:latest \ gitea.jde.nz/public/dropshell-build-base:latest \
bash -c " bash -c "
echo 'Docker working directory:' && pwd
echo 'Docker available files:' && ls -la
# Verify we can find the source file # Verify we can find the source file
if [ ! -f dehydrate_test.cpp ]; then if [ ! -f dehydrate_test.cpp ]; then
echo 'ERROR: dehydrate_test.cpp not found in current directory' echo 'ERROR: dehydrate_test.cpp not found in current directory'
echo 'Working directory:' && pwd
echo 'Available files:' && ls -la echo 'Available files:' && ls -la
exit 1 exit 1
fi fi