Compare commits
2 Commits
v2025.0625
...
v2025.0625
Author | SHA1 | Date | |
---|---|---|---|
884609f661 | |||
a5a36c179b |
@ -202,25 +202,25 @@ function print_summary() {
|
|||||||
|
|
||||||
# Format build status with colors
|
# Format build status with colors
|
||||||
case "$build_status" in
|
case "$build_status" in
|
||||||
"✓") build_col=$(printf " ${GREEN}✓${NC} ") ;;
|
"✓") build_col=$(printf " %s✓%s " "$GREEN" "$NC") ;;
|
||||||
"✗") build_col=$(printf " ${RED}✗${NC} ") ;;
|
"✗") build_col=$(printf " %s✗%s " "$RED" "$NC") ;;
|
||||||
"SKIP") build_col=$(printf " ${YELLOW}-${NC} ") ;;
|
"SKIP") build_col=$(printf " %s-%s " "$YELLOW" "$NC") ;;
|
||||||
*) build_col=" - " ;;
|
*) build_col=" - " ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Format test status with colors
|
# Format test status with colors
|
||||||
case "$test_status" in
|
case "$test_status" in
|
||||||
"✓") test_col=$(printf " ${GREEN}✓${NC} ") ;;
|
"✓") test_col=$(printf " %s✓%s " "$GREEN" "$NC") ;;
|
||||||
"✗") test_col=$(printf " ${RED}✗${NC} ") ;;
|
"✗") test_col=$(printf " %s✗%s " "$RED" "$NC") ;;
|
||||||
"SKIP") test_col=$(printf " ${YELLOW}-${NC} ") ;;
|
"SKIP") test_col=$(printf " %s-%s " "$YELLOW" "$NC") ;;
|
||||||
*) test_col=" - " ;;
|
*) test_col=" - " ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Format publish status with colors
|
# Format publish status with colors
|
||||||
case "$publish_status" in
|
case "$publish_status" in
|
||||||
"✓") publish_col=$(printf " ${GREEN}✓${NC} ") ;;
|
"✓") publish_col=$(printf " %s✓%s " "$GREEN" "$NC") ;;
|
||||||
"✗") publish_col=$(printf " ${RED}✗${NC} ") ;;
|
"✗") publish_col=$(printf " %s✗%s " "$RED" "$NC") ;;
|
||||||
"SKIP") publish_col=$(printf " ${YELLOW}-${NC} ") ;;
|
"SKIP") publish_col=$(printf " %s-%s " "$YELLOW" "$NC") ;;
|
||||||
*) publish_col=" - " ;;
|
*) publish_col=" - " ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -16,47 +16,48 @@ 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 "Building dehydrate test executable..."
|
||||||
echo "SCRIPT_DIR: $SCRIPT_DIR"
|
|
||||||
echo "Current directory: $(pwd)"
|
|
||||||
echo "Files in current directory:"
|
|
||||||
ls -la
|
|
||||||
|
|
||||||
docker run --rm \
|
# Use docker cp approach since volume mounting may not work in CI
|
||||||
-v "$SCRIPT_DIR":/workdir \
|
CONTAINER_NAME="dehydrate-test-build-$$"
|
||||||
-w /workdir \
|
|
||||||
|
# Start container in detached mode
|
||||||
|
docker run -d --name "$CONTAINER_NAME" \
|
||||||
gitea.jde.nz/public/dropshell-build-base:latest \
|
gitea.jde.nz/public/dropshell-build-base:latest \
|
||||||
bash -c "
|
sleep 60
|
||||||
echo 'Docker working directory:' && pwd
|
|
||||||
echo 'Docker available files:' && ls -la
|
|
||||||
|
|
||||||
# Verify we can find the source file
|
# Copy source file into container
|
||||||
if [ ! -f dehydrate_test.cpp ]; then
|
docker cp dehydrate_test.cpp "$CONTAINER_NAME":/dehydrate_test.cpp
|
||||||
echo 'ERROR: dehydrate_test.cpp not found in current directory'
|
|
||||||
echo 'Available files:' && ls -la
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Clean any existing binary and compile
|
# Compile in container
|
||||||
rm -f dehydrate_test
|
docker exec "$CONTAINER_NAME" bash -c "
|
||||||
if ! g++ -std=c++23 -static dehydrate_test.cpp -o dehydrate_test; then
|
echo 'Compiling dehydrate test...'
|
||||||
|
if ! g++ -std=c++23 -static /dehydrate_test.cpp -o /dehydrate_test; then
|
||||||
echo 'ERROR: Compilation failed'
|
echo 'ERROR: Compilation failed'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify binary was created and is executable
|
# Verify binary was created
|
||||||
if [ ! -f dehydrate_test ]; then
|
if [ ! -f /dehydrate_test ]; then
|
||||||
echo 'ERROR: Binary was not created'
|
echo 'ERROR: Binary was not created'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Quick architecture check - just verify the binary format
|
# Quick architecture check
|
||||||
if ! file dehydrate_test | grep -q 'executable'; then
|
if ! file /dehydrate_test | grep -q 'executable'; then
|
||||||
echo 'ERROR: Generated file is not an executable'
|
echo 'ERROR: Generated file is not an executable'
|
||||||
file dehydrate_test
|
file /dehydrate_test
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
"
|
|
||||||
|
echo 'Compilation successful'
|
||||||
|
"
|
||||||
|
|
||||||
|
# Copy binary back to host
|
||||||
|
docker cp "$CONTAINER_NAME":/dehydrate_test ./dehydrate_test
|
||||||
|
|
||||||
|
# Clean up container
|
||||||
|
docker rm -f "$CONTAINER_NAME"
|
||||||
|
|
||||||
# Check if compilation succeeded
|
# Check if compilation succeeded
|
||||||
if [ ! -f "./dehydrate_test" ]; then
|
if [ ! -f "./dehydrate_test" ]; then
|
||||||
|
Reference in New Issue
Block a user