Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions bin/hermit.hcl
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
manage-git = true

env = {
"CARGO_HOME": "${HOME}/.cache/berd/cargo-home",
"PATH": "${HOME}/.cache/berd/cargo-home/bin:${PATH}",
}
13 changes: 13 additions & 0 deletions scripts/release/tests/release-scripts.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@ describe("managed Goose build profile", () => {
});
});

describe("shared Cargo package cache", () => {
it("keeps Cargo dependency and binary paths stable across worktrees", async () => {
const hermitConfig = await readFile(join(repo, "bin/hermit.hcl"), "utf8");

expect(hermitConfig).toMatch(
/"CARGO_HOME": "\$\{HOME\}\/\.cache\/berd\/cargo-home"/,
);
expect(hermitConfig).toMatch(
/"PATH": "\$\{HOME\}\/\.cache\/berd\/cargo-home\/bin:\$\{PATH\}"/,
);
});
});

describe("Docker Linux build environment", () => {
it("forwards host build configuration when Docker replaces the environment", async () => {
const dir = await tempDir();
Expand Down