test: Update 5 files
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 25s
Build-Test-Publish / build (linux/arm64) (push) Successful in 27s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Successful in 7s
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Successful in 7s
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 25s
Build-Test-Publish / build (linux/arm64) (push) Successful in 27s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Successful in 7s
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Successful in 7s
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
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 )"
|
||||||
|
|
||||||
# Arrays to track results
|
# Arrays to track results
|
||||||
@ -7,6 +7,7 @@ declare -A BUILD_RESULTS
|
|||||||
declare -A TEST_RESULTS
|
declare -A TEST_RESULTS
|
||||||
declare -A PUBLISH_RESULTS
|
declare -A PUBLISH_RESULTS
|
||||||
declare -a PROJECTS
|
declare -a PROJECTS
|
||||||
|
OVERALL_SUCCESS=true
|
||||||
|
|
||||||
function dothis() {
|
function dothis() {
|
||||||
local thisthing="$1"
|
local thisthing="$1"
|
||||||
@ -41,6 +42,7 @@ function dothis() {
|
|||||||
test) TEST_RESULTS["$project"]="✗" ;;
|
test) TEST_RESULTS["$project"]="✗" ;;
|
||||||
publish) PUBLISH_RESULTS["$project"]="✗" ;;
|
publish) PUBLISH_RESULTS["$project"]="✗" ;;
|
||||||
esac
|
esac
|
||||||
|
OVERALL_SUCCESS=false
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -101,16 +103,16 @@ function buildtestpublish() {
|
|||||||
# Add to projects list
|
# Add to projects list
|
||||||
PROJECTS+=("$TOOLNAME")
|
PROJECTS+=("$TOOLNAME")
|
||||||
|
|
||||||
cd "$dir"
|
cd "$dir" || echo "Failed to cd to $dir"
|
||||||
|
|
||||||
subtitle "🔨 BUILDING $TOOLNAME_UPPER 🔨"
|
subtitle "🔨 BUILDING $TOOLNAME_UPPER 🔨"
|
||||||
dothis build "$dir" "$TOOLNAME" || true
|
dothis build "$dir" "$TOOLNAME"
|
||||||
|
|
||||||
subtitle "🔍 TESTING $TOOLNAME_UPPER 🔍"
|
subtitle "🔍 TESTING $TOOLNAME_UPPER 🔍"
|
||||||
dothis test "$dir" "$TOOLNAME" || true
|
dothis test "$dir" "$TOOLNAME"
|
||||||
|
|
||||||
subtitle "📦 PUBLISHING $TOOLNAME_UPPER 📦"
|
subtitle "📦 PUBLISHING $TOOLNAME_UPPER 📦"
|
||||||
dothis publish "$dir" "$TOOLNAME" || true
|
dothis publish "$dir" "$TOOLNAME"
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
}
|
}
|
||||||
@ -125,30 +127,19 @@ function buildtestpublish_all() {
|
|||||||
-print0 | while IFS= read -r -d '' dir; \
|
-print0 | while IFS= read -r -d '' dir; \
|
||||||
do
|
do
|
||||||
|
|
||||||
buildtestpublish "${dir}"
|
buildtestpublish "${dir}" || true # Continue even if one project fails
|
||||||
done
|
done
|
||||||
|
|
||||||
cd "$PREVIOUS_DIR"
|
cd "$PREVIOUS_DIR" || echo "Failed to cd to $PREVIOUS_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
title "🔨 BUILDING ALL TOOLS 🔨"
|
|
||||||
|
|
||||||
getpkg/build.sh
|
|
||||||
export GETPKG="${SCRIPT_DIR}/getpkg/output/getpkg"
|
|
||||||
if [ ! -f "$GETPKG" ]; then
|
|
||||||
echo "Build failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
buildtestpublish_all
|
|
||||||
|
|
||||||
function print_summary() {
|
function print_summary() {
|
||||||
title "📊 BUILD SUMMARY 📊"
|
title "📊 BUILD SUMMARY 📊"
|
||||||
|
|
||||||
# Calculate column widths
|
# Calculate column widths
|
||||||
local max_project_width=7 # "PROJECT" header
|
local max_project_width=7 # "PROJECT" header
|
||||||
for project in "${PROJECTS[@]}"; do
|
for project in "${PROJECTS[@]}"; do
|
||||||
if [ ${#project} -gt $max_project_width ]; then
|
if [ "${#project}" -gt "$max_project_width" ]; then
|
||||||
max_project_width=${#project}
|
max_project_width=${#project}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -157,6 +148,9 @@ function print_summary() {
|
|||||||
max_project_width=$((max_project_width + 2))
|
max_project_width=$((max_project_width + 2))
|
||||||
|
|
||||||
# Print header
|
# Print header
|
||||||
|
printf "┌"
|
||||||
|
printf "─%.0s" $(seq 1 $((max_project_width + 2)))
|
||||||
|
printf "┬─────────┬─────────┬─────────┐\n"
|
||||||
printf "│ %-*s │ %-7s │ %-7s │ %-7s │\n" $max_project_width "PROJECT" "BUILD" "TEST" "PUBLISH"
|
printf "│ %-*s │ %-7s │ %-7s │ %-7s │\n" $max_project_width "PROJECT" "BUILD" "TEST" "PUBLISH"
|
||||||
printf "├"
|
printf "├"
|
||||||
printf "─%.0s" $(seq 1 $((max_project_width + 2)))
|
printf "─%.0s" $(seq 1 $((max_project_width + 2)))
|
||||||
@ -173,9 +167,31 @@ function print_summary() {
|
|||||||
"$build_status" "$test_status" "$publish_status"
|
"$build_status" "$test_status" "$publish_status"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Print bottom border
|
||||||
|
printf "└"
|
||||||
|
printf "─%.0s" $(seq 1 $((max_project_width + 2)))
|
||||||
|
printf "┴─────────┴─────────┴─────────┘\n"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
title "🔨 BUILDING ALL TOOLS 🔨"
|
||||||
|
|
||||||
|
getpkg/build.sh
|
||||||
|
export GETPKG="${SCRIPT_DIR}/getpkg/output/getpkg"
|
||||||
|
if [ ! -f "$GETPKG" ]; then
|
||||||
|
echo "Build failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
buildtestpublish_all
|
||||||
|
|
||||||
print_summary
|
print_summary
|
||||||
|
|
||||||
title "🚀 Deployment Complete! 🚀"
|
if [ "$OVERALL_SUCCESS" = true ]; then
|
||||||
|
title "🚀 Deployment Complete! 🚀"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
title "❌ Deployment Failed! ❌"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
@ -34,6 +34,7 @@ print_test_result() {
|
|||||||
cleanup() {
|
cleanup() {
|
||||||
echo -e "\n${YELLOW}Cleaning up test artifacts...${NC}"
|
echo -e "\n${YELLOW}Cleaning up test artifacts...${NC}"
|
||||||
rm -rf "$TEST_DIR"
|
rm -rf "$TEST_DIR"
|
||||||
|
echo -e "\nDone.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set up trap to ensure cleanup runs
|
# Set up trap to ensure cleanup runs
|
||||||
|
Binary file not shown.
@ -378,6 +378,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "\n=== Test Complete ===" << std::endl;
|
std::cout << "\n=== Test Complete ===" << std::endl;
|
||||||
|
std::cout << "✓ All dehydrate tests passed successfully!" << std::endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# Simple script to run the dehydrate tests
|
# Simple script to run the dehydrate tests
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
@ -7,3 +9,6 @@ cd "$SCRIPT_DIR"
|
|||||||
|
|
||||||
echo "Running dehydrate tests..."
|
echo "Running dehydrate tests..."
|
||||||
./build_dehydrate_test.sh
|
./build_dehydrate_test.sh
|
||||||
|
|
||||||
|
|
||||||
|
echo "Dehydrate tests complete."
|
Reference in New Issue
Block a user