mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-12 00:40:28 +00:00
fix: Improve artifact verification and handling in CI workflow
This commit is contained in:
27
.github/workflows/build-multiplatform.yml
vendored
27
.github/workflows/build-multiplatform.yml
vendored
@@ -491,7 +491,7 @@ jobs:
|
|||||||
- name: Verify downloaded artifacts
|
- name: Verify downloaded artifacts
|
||||||
run: |
|
run: |
|
||||||
echo "=== Downloaded build artifacts for R2 upload ==="
|
echo "=== Downloaded build artifacts for R2 upload ==="
|
||||||
if [ -d artifacts ]; then
|
if [ -d artifacts ] && [ "$(ls -A artifacts 2>/dev/null)" ]; then
|
||||||
echo "Directory structure:"
|
echo "Directory structure:"
|
||||||
ls -laR artifacts/
|
ls -laR artifacts/
|
||||||
echo ""
|
echo ""
|
||||||
@@ -501,8 +501,8 @@ jobs:
|
|||||||
echo "=== File sizes ==="
|
echo "=== File sizes ==="
|
||||||
find artifacts -type f -exec du -h {} \; 2>/dev/null || echo "No artifacts to measure"
|
find artifacts -type f -exec du -h {} \; 2>/dev/null || echo "No artifacts to measure"
|
||||||
else
|
else
|
||||||
echo "⚠️ No artifacts directory - all builds may have failed"
|
echo "⚠️ No artifacts downloaded - builds may have been skipped or failed"
|
||||||
exit 1
|
echo "This is expected if no platform builds succeeded"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Checkout code for git log
|
- name: Checkout code for git log
|
||||||
@@ -562,6 +562,12 @@ jobs:
|
|||||||
local dest_name="$3"
|
local dest_name="$3"
|
||||||
local platform="$4"
|
local platform="$4"
|
||||||
|
|
||||||
|
# Check if directory exists first
|
||||||
|
if [ ! -d "$search_dir" ]; then
|
||||||
|
echo "⚠️ Skipping $platform: Directory $search_dir not found (build may have been skipped)"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Find the file matching the pattern
|
# Find the file matching the pattern
|
||||||
local src_file=$(find "$search_dir" -type f -name "$pattern" 2>/dev/null | head -1)
|
local src_file=$(find "$search_dir" -type f -name "$pattern" 2>/dev/null | head -1)
|
||||||
|
|
||||||
@@ -622,13 +628,24 @@ jobs:
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Preparation Summary ==="
|
echo "=== Preparation Summary ==="
|
||||||
|
|
||||||
|
# Count artifacts (excluding commits.json)
|
||||||
|
ARTIFACT_COUNT=$(find "r2-upload/unstable/${{ steps.metadata.outputs.build_prefix }}" -type f ! -name "commits.json" 2>/dev/null | wc -l)
|
||||||
|
|
||||||
echo "Files prepared in r2-upload/unstable/${{ steps.metadata.outputs.build_prefix }}:"
|
echo "Files prepared in r2-upload/unstable/${{ steps.metadata.outputs.build_prefix }}:"
|
||||||
ls -lh "r2-upload/unstable/${{ steps.metadata.outputs.build_prefix }}/" || echo " (none)"
|
ls -lh "r2-upload/unstable/${{ steps.metadata.outputs.build_prefix }}/" 2>/dev/null || echo " (none)"
|
||||||
|
|
||||||
if [ "${{ steps.metadata.outputs.branch_name }}" == "main" ]; then
|
if [ "${{ steps.metadata.outputs.branch_name }}" == "main" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Files prepared in r2-upload/unstable/latest:"
|
echo "Files prepared in r2-upload/unstable/latest:"
|
||||||
ls -lh "r2-upload/unstable/latest/" || echo " (none)"
|
ls -lh "r2-upload/unstable/latest/" 2>/dev/null || echo " (none)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
if [ "$ARTIFACT_COUNT" -eq 0 ]; then
|
||||||
|
echo "⚠️ Warning: No build artifacts were prepared (only metadata will be uploaded)"
|
||||||
|
else
|
||||||
|
echo "✅ Successfully prepared $ARTIFACT_COUNT build artifact(s)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Generate index.html
|
- name: Generate index.html
|
||||||
|
|||||||
Reference in New Issue
Block a user