8000 GitHub - bearcove/timelord: Save/restore timestamps when building Rust code in CI (to allow fresh checkouts but taking advantage of incremental builds)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Save/restore timestamps when building Rust code in CI (to allow fresh checkouts but taking advantage of incremental builds)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

bearcove/timelord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timelord

Crates.io Documentation License: MIT OR Apache-2.0

A Rust tool to preserve file timestamps (mtime) between CI builds, even with fresh git checkouts.

Usage

Timelord preserves file timestamps between CI builds, even with fresh git checkouts. It achieves this by storing a database of file sizes and hashes, and restoring old timestamps if file contents remain unchanged.

timelord --source-dir <SOURCE_DIR> --cache-dir <CACHE_DIR>
  • <SOURCE_DIR>: Directory containing files to preserve timestamps for
  • <CACHE_DIR>: Persistent directory to store the timestamp database across CI builds

Timelord essentially implements the functionality of Cargo's unstable "checksum-freshness" feature (https://doc.rust-lang.org/cargo/reference/unstable.html#checksum-freshness), but for stable Rust.

The cache file (timelord.db) is stored in the specified cache directory and should be preserved between runs for optimal functionality.

Additional Configuration

To ensure Timelord works properly, especially in CI environments, it's important to use the -Zremap-cwd-prefix rustc flag (https://doc.rust-lang.org/beta/unstable-book/compiler-flags/remap-cwd-prefix.html). This flag helps maintain consistent paths across different build environments.

License

Licensed under either of

at your option.

About

Save/restore timestamps when building Rust code in CI (to allow fresh checkouts but taking advantage of incremental builds)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 
0