Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
ci(verify): Windows real capture records its cache manifest, and a cached build without one is rebuilt
Richie McIlroy57f841195432
diff --git a/.github/workflows/verify-recording.yml b/.github/workflows/verify-recording.ymlindex 392e6ba46..671fe6b73 100644--- a/.github/workflows/verify-recording.yml+++ b/.github/workflows/verify-recording.yml@@ -386,8 +386,16 @@ jobs:cargo test --locked --profile ci-verify -p cap-verify --test recording --no-runecho "build seconds: $(( $(date +%s) - start ))"+ # Without the manifest the next restore cannot tell which sources the+ # cached build came from (scripts/verify/mtime.py).+ - name: Record sources of the cached build+ if: github.event_name != 'pull_request' && steps.setup.outputs.build-cache-hit != 'true'+ shell: bash+ run: |+ "$(command -v python3 || command -v python)" scripts/verify/mtime.py record target/ci-verify/verify-src-manifest.txt+- name: Save build cache- if: steps.setup.outputs.build-cache-hit != 'true'+ if: github.event_name != 'pull_request' && steps.setup.outputs.build-cache-hit != 'true'uses: actions/cache/save@v4with:path: |diff --git a/scripts/verify/mtime.py b/scripts/verify/mtime.pyindex 4de0229d6..379f658e7 100644--- a/scripts/verify/mtime.py+++ b/scripts/verify/mtime.py@@ -12,8 +12,10 @@ holds an up-to-date build.the manifest get an old fixed mtime, so cargosees them as unchanged; every other file keepsthe checkout time and its crate rebuilds. With- no manifest (cold build) every file gets the- fixed time.+ no manifest and no cached build (cold build)+ every file gets the fixed time; a cached build+ without a manifest is not trusted, and every+ file gets the current time.Only content equality is trusted, never commit times, so a stale build cannotbe reused for changed code.@@ -64,6 +66,15 @@ def main():for line in f:blob, _, path = line.rstrip("\n").partition(" ")saved[path] = blob+ elif os.path.isdir(os.path.dirname(manifest)) and os.listdir(os.path.dirname(manifest)):+ # A cached build saved without a manifest: nothing says which sources+ # it was built from, and the fixed time would make cargo reuse all of+ # it. Every file gets the current time, so every crate rebuilds.+ print(f"no manifest at {manifest} beside a cached build: rebuilding every crate")+ for path in current:+ if os.path.isfile(path) and not os.path.islink(path):+ os.utime(path, None)+ returnelse:# Cold build: give every file the fixed time too. Build scripts# without rerun-if-changed fingerprint the newest mtime of their