Skip to content

fetch publisher data from crates.io, start build artifact caching #2079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c559add
fetch publisher data from crates.io, start build artifact caching
syphar Mar 9, 2023
fa1981f
update docker-compose config so rustwide & prefix are on the same fil…
syphar Mar 10, 2023
ef74011
always move the cache / targets, no copy needed
syphar Mar 10, 2023
3fdf1fd
also clean doc-output for proc macro crates
syphar Mar 10, 2023
a82e6dc
adapt comment
syphar Mar 10, 2023
bf8440b
add freeing disk space functionliaty
syphar Mar 11, 2023
4e67646
update log messages
syphar Mar 11, 2023
b0126a4
extend tests for crate-publisher fetching
syphar Mar 11, 2023
a15fc75
extend tests for crate-release info fetchign
syphar Mar 11, 2023
09588f1
ensure if target directory exists
syphar Jun 2, 2023
5e7d6c7
Merge branch 'master' into get-publisher
syphar Jun 2, 2023
2bc2cab
add more logging context, try cleaning up target on restore
syphar Jun 2, 2023
c48e0f4
don't try to create target directory when it already exists
syphar Jun 4, 2023
ce2bedc
purge artifact cache for tests
syphar Jun 4, 2023
3758e0d
start adding cache test
syphar Jun 18, 2023
c3f4901
add global config to enable artifact cache, debug logging for test
syphar Jun 18, 2023
231de62
try other publisher id for the test
syphar Jun 18, 2023
bb96f3b
remove debug-output from tests
syphar Jun 18, 2023
ce370b1
start adding caching tests
syphar Jun 18, 2023
a11b75b
fix cache dir cleanup for free disk space, add test
syphar Jun 18, 2023
184a00d
start freeing disk-space
syphar Jun 19, 2023
70771d5
add config var for free disk space goal
syphar Jun 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
also clean doc-output for proc macro crates
  • Loading branch information
syphar committed May 11, 2023
commit 3fdf1fd26f81185ea1caeb96246f1fa4cbb20543
8 changes: 8 additions & 0 deletions src/docbuilder/caching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ impl ArtifactCache {
/// - ...?
#[instrument(skip(self))]
fn cleanup(&self, target_dir: &Path) -> Result<()> {
// proc-macro crates have a `doc` directory
// directly in the target.
let doc_dir = target_dir.join("doc");
if doc_dir.is_dir() {
debug!(?doc_dir, "cache dir cleanup");
fs::remove_dir_all(doc_dir)?;
}

for item in fs::read_dir(target_dir)? {
// the first level of directories are the targets in most cases,
// delete their doc-directories
Expand Down