perf(ci): pre-baked images + cargo/npm caching (~70% faster builds) #36

Merged
sarman merged 7 commits from feat/pr-review-workflow into master 2026-04-13 01:23:50 +00:00
3 changed files with 13 additions and 7 deletions
Showing only changes of commit 2ce38b9477 - Show all commits

2
src-tauri/Cargo.lock generated
View File

@ -6139,7 +6139,7 @@ dependencies = [
[[package]]
name = "trcaa"
version = "0.1.0"
version = "0.2.50"
dependencies = [
"aes-gcm",
"aho-corasick",

View File

@ -129,8 +129,12 @@ describe("build-images.yml workflow", () => {
expect(wf).toContain("trcaa-linux-arm64:rust1.88-node22");
});
it("uses docker:24-cli image for build jobs", () => {
expect(wf).toContain("docker:24-cli");
it("uses alpine:latest with docker-cli (not docker:24-cli which triggers duplicate socket mount in act_runner)", () => {
// act_runner v0.3.1 special-cases docker:* images and adds the socket bind;
// combined with its global socket bind this causes a 'Duplicate mount point' error.
expect(wf).toContain("alpine:latest");
expect(wf).toContain("docker-cli");
expect(wf).not.toContain("docker:24-cli");
});
it("runs all three build jobs on linux-amd64 runner", () => {

View File

@ -44,11 +44,13 @@ describe("auto-tag release cross-platform artifact handling", () => {
expect(workflow).toContain("UPLOAD_NAME=\"linux-arm64-$NAME\"");
});
it("uses Ubuntu 22.04 with ports mirror for arm64 cross-compile", () => {
it("uses pre-baked Ubuntu 22.04 cross-compiler image for arm64", () => {
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
expect(workflow).toContain("ubuntu:22.04");
expect(workflow).toContain("ports.ubuntu.com/ubuntu-ports");
expect(workflow).toContain("jammy");
// Multiarch ubuntu:22.04 + ports mirror setup moved to pre-baked image;
// verify workflow references the correct image and cross-compile env vars.
expect(workflow).toContain("trcaa-linux-arm64:rust1.88-node22");
expect(workflow).toContain("CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc");
expect(workflow).toContain("aarch64-unknown-linux-gnu");
});
});