Skip to content

Commit

Permalink
caliptra-size-history: Use submodules. (#642)
Browse files Browse the repository at this point in the history
This is necessary because the main workspace with default features is 
now relying on code in the dpe/ submodule, and the build will fail if 
it's not populated. 
 
Change the cache buster to regenerate all history.
  • Loading branch information
korran authored Aug 15, 2023
1 parent b2dc647 commit 7e9dc76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ci-tools/size-history/src/cache_gha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
Cache,
};

const VERSION: &str = "caliptra-size-history-cache0";
const VERSION: &str = "caliptra-size-history-cache1";

pub struct GithubActionCache {
prefix: String,
Expand Down
10 changes: 10 additions & 0 deletions ci-tools/size-history/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ impl<'a> WorkTree<'a> {
)?;
Ok(())
}
pub fn submodule_update(&self) -> io::Result<()> {
run_cmd_stdout(
Command::new("git")
.current_dir(self.path)
.arg("submodule")
.arg("update"),
None,
)?;
Ok(())
}
pub fn head_commit_id(&self) -> io::Result<String> {
Ok(to_utf8(run_cmd_stdout(
Command::new("git")
Expand Down
1 change: 1 addition & 0 deletions ci-tools/size-history/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ fn real_main() -> io::Result<()> {
commit.id, commit.title
);
worktree.checkout(&commit.id)?;
worktree.submodule_update()?;

let sizes = match compute_size(
&worktree,
Expand Down

0 comments on commit 7e9dc76

Please sign in to comment.