https://github.com/fasterthanlime/timelord
Save/restore timestamps when building Rust code in CI (to allow fresh checkouts but taking advantage of incremental builds)
https://github.com/fasterthanlime/timelord
cargo ci rust
Last synced: about 1 year ago
JSON representation
Save/restore timestamps when building Rust code in CI (to allow fresh checkouts but taking advantage of incremental builds)
- Host: GitHub
- URL: https://github.com/fasterthanlime/timelord
- Owner: fasterthanlime
- Created: 2025-03-21T11:19:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T14:38:53.000Z (about 1 year ago)
- Last Synced: 2025-03-21T14:59:55.824Z (about 1 year ago)
- Topics: cargo, ci, rust
- Language: Rust
- Homepage:
- Size: 31.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# timelord
A Rust tool to preserve file timestamps (mtime) between CI builds, even with fresh git checkouts.
## Features
- Stores a database of file sizes and hashes
- Restores old timestamps if file contents remain unchanged
- Supports parallel processing for improved performance
## Usage
```
timelord --source-dir --cache-dir
```
- ``: The directory containing files to preserve timestamps for
- ``: A persistent directory to store the timestamp database across CI builds
## How it works
1. Scans the source directory for files
2. Compares file hashes and sizes with the previous run
3. Restores timestamps for unchanged files
4. Updates the cache for future runs
## Use cases
- Maintaining consistent file timestamps in CI/CD pipelines
- Optimizing build processes that depend on file modification times
- Ensuring reproducibility across different environments
## Note
The cache file (`timelord.db`) is stored in the specified cache directory and should be preserved between runs for optimal functionality.