MCPcopy Create free account
hub / github.com/FastLED/FastLED / _build_sync_script

Function _build_sync_script

ci/runners/docker_runner.py:255–336  ·  view source on GitHub ↗

Build rsync script for syncing source files from /host to /fastled. Uses content-based comparison (MD5) and preserves source timestamps to avoid spurious rebuilds when files haven't actually changed.

()

Source from the content-addressed store, hash-verified

253
254
255def _build_sync_script() -> str:
256 """Build rsync script for syncing source files from /host to /fastled.
257
258 Uses content-based comparison (MD5) and preserves source timestamps to avoid
259 spurious rebuilds when files haven't actually changed.
260 """
261 return """
262# Sync host directories to container working directory
263if command -v rsync &> /dev/null; then
264 echo "Syncing source files from /host to /fastled..."
265
266 # rsync flags:
267 # -a: Archive mode (includes -rlptgoD - recursive, links, perms, times, group, owner, devices)
268 # --checksum: Compare MD5 checksums instead of size+mtime (detects real changes)
269 # --delete: Remove destination files that don't exist in source
270 #
271 # By preserving timestamps (-t in -a), Meson won't see files as modified
272 # when they haven't actually changed (avoids spurious reconfiguration).
273
274 # Sync directories in parallel for speed
275 if [ -d "/host/src" ]; then
276 echo " → syncing src/..."
277 rsync -a --checksum --delete /host/src/ /fastled/src/ &
278 fi
279
280 if [ -d "/host/tests" ]; then
281 echo " → syncing tests/..."
282 rsync -a --checksum --delete /host/tests/ /fastled/tests/ &
283 fi
284
285 if [ -d "/host/examples" ]; then
286 echo " → syncing examples/..."
287 rsync -a --checksum --delete /host/examples/ /fastled/examples/ &
288 fi
289
290 if [ -d "/host/ci" ]; then
291 echo " → syncing ci/..."
292 rsync -a --checksum --delete /host/ci/ /fastled/ci/ &
293 fi
294
295 if [ -d "/host/lint_plugins" ]; then
296 echo " → syncing lint_plugins/..."
297 rsync -a --checksum --delete /host/lint_plugins/ /fastled/lint_plugins/ &
298 fi
299
300 # Sync individual files (preserving timestamps prevents Meson reconfiguration)
301 if [ -f "/host/pyproject.toml" ]; then
302 rsync -a --checksum /host/pyproject.toml /fastled/ &
303 fi
304
305 if [ -f "/host/uv.lock" ]; then
306 rsync -a --checksum /host/uv.lock /fastled/ &
307 fi
308
309 if [ -f "/host/test.py" ]; then
310 rsync -a --checksum /host/test.py /fastled/ &
311 fi
312

Callers 1

run_docker_testsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected