Skip to content

Commit a503d70

Browse files
committed
feat(ci): enhance documentation build workflow to collect ci.json files alongside binaries for improved documentation completeness
1 parent 21afb4f commit a503d70

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

.github/workflows/docs_build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,17 @@ jobs:
158158
output_dir="docs/_static/binaries/libraries/${relative_path}/${target}"
159159
mkdir -p "$output_dir"
160160
161-
# Copy only the .merged.bin file
161+
# Copy the .merged.bin file
162162
cp "$bin_file" "$output_dir/"
163163
echo " → Copied to: $output_dir/$bin_name"
164164
bin_count=$((bin_count + 1))
165+
166+
# Also copy ci.json if it exists in the same directory
167+
ci_json_file=$(dirname "$bin_file")/ci.json
168+
if [ -f "$ci_json_file" ]; then
169+
cp "$ci_json_file" "$output_dir/"
170+
echo " → Copied ci.json to: $output_dir/ci.json"
171+
fi
165172
done < <(find docs_binaries -type f -name "*.merged.bin")
166173
167174
echo ""

.github/workflows/push.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,12 @@ jobs:
217217
- name: Collect docs binaries (macOS only)
218218
if: matrix.os == 'macOS-latest'
219219
run: |
220-
echo "Collecting binaries for documentation from macOS build..."
220+
echo "Collecting binaries and ci.json files for documentation from macOS build..."
221221
mkdir -p docs_binaries
222222
223223
# Find all compiled binaries from the build
224224
find "$HOME/.arduino/tests" -type f -name "*.bin" 2>/dev/null | while read -r bin_file; do
225-
echo "Found: $bin_file"
225+
echo "Found binary: $bin_file"
226226
227227
# Preserve directory structure
228228
rel_path="${bin_file#$HOME/.arduino/tests/}"
@@ -231,10 +231,27 @@ jobs:
231231
cp "$bin_file" "$target_dir/"
232232
done
233233
234+
# Also find and copy ci.json files
235+
find "$HOME/.arduino/tests" -type f -name "ci.json" 2>/dev/null | while read -r ci_file; do
236+
echo "Found ci.json: $ci_file"
237+
238+
# Preserve directory structure
239+
rel_path="${ci_file#$HOME/.arduino/tests/}"
240+
target_dir="docs_binaries/$(dirname "$rel_path")"
241+
mkdir -p "$target_dir"
242+
cp "$ci_file" "$target_dir/"
243+
done
244+
245+
echo ""
246+
echo "Collected files for docs:"
247+
echo " Binary files (.bin): $(find docs_binaries -type f -name "*.bin" 2>/dev/null | wc -l)"
248+
echo " Config files (ci.json): $(find docs_binaries -type f -name "ci.json" 2>/dev/null | wc -l)"
249+
echo ""
250+
echo "Sample binaries:"
251+
find docs_binaries -type f -name "*.bin" 2>/dev/null | head -10 || true
234252
echo ""
235-
echo "Collected binaries for docs:"
236-
find docs_binaries -type f -name "*.bin" | head -20
237-
echo "Total: $(find docs_binaries -type f -name "*.bin" | wc -l) binary files"
253+
echo "Sample ci.json files:"
254+
find docs_binaries -type f -name "ci.json" 2>/dev/null | head -10 || true
238255
239256
- name: Save docs binaries to cache (macOS only)
240257
if: matrix.os == 'macOS-latest'

0 commit comments

Comments
 (0)