Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

ci: cut about 20 s of waiting from the Rust check and test jobs (#9744)

teoa604c12f7fb1
diff --git a/.github/workflows/build_agent_daemon_on_tag.yml b/.github/workflows/build_agent_daemon_on_tag.yml
index eaeb19f3b4..902b213df6 100644
--- a/.github/workflows/build_agent_daemon_on_tag.yml
+++ b/.github/workflows/build_agent_daemon_on_tag.yml
@@ -83,8 +83,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
@@ -317,8 +321,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
diff --git a/.github/workflows/cargo_workspace_dependency_check.yml b/.github/workflows/cargo_workspace_dependency_check.yml
index aeb3b23312..4da7b7f985 100644
--- a/.github/workflows/cargo_workspace_dependency_check.yml
+++ b/.github/workflows/cargo_workspace_dependency_check.yml
@@ -31,8 +31,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
@@ -92,8 +96,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
diff --git a/.github/workflows/code_check_cloud_storage.yml b/.github/workflows/code_check_cloud_storage.yml
index 7aab83fdc1..71e62776cc 100644
--- a/.github/workflows/code_check_cloud_storage.yml
+++ b/.github/workflows/code_check_cloud_storage.yml
@@ -312,8 +312,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
@@ -524,8 +528,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
@@ -686,12 +694,12 @@ jobs:
POSTGRES_DB: macrodb
ports:
- '5432:5432'
- options: '--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 --shm-size 1g -v /dev/shm/pgdata:/var/lib/postgresql/data'
+ options: '--health-cmd pg_isready --health-interval 1s --health-start-period 30s --health-timeout 5s --health-retries 5 --shm-size 1g -v /dev/shm/pgdata:/var/lib/postgresql/data'
redis:
image: redis:7
ports:
- '6379:6379'
- options: '--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5'
+ options: '--health-cmd "redis-cli ping" --health-interval 1s --health-start-period 30s --health-timeout 5s --health-retries 5'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
@@ -701,8 +709,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
diff --git a/.github/workflows/test_macrod_update.yml b/.github/workflows/test_macrod_update.yml
index f2f1016c6c..1623c0a385 100644
--- a/.github/workflows/test_macrod_update.yml
+++ b/.github/workflows/test_macrod_update.yml
@@ -24,8 +24,12 @@ jobs:
- name: Mount Namespace cache volume
uses: namespacelabs/nscloud-cache-action@15799a6b54e5765f85b2aac25b3f0df43ed571c0
with:
- cache: rust
- path: /nix
+ path: |-
+ /nix
+ ./target
+ /home/runner/.cargo/registry
+ /home/runner/.cargo/git
+ /home/runner/.cargo/.global-cache
continue-on-error: true
- name: Setup Nix
uses: './.github/actions/setup-nix'
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
index 4cdb3cbf8a..452a2262f8 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
@@ -385,8 +385,8 @@ fn postgres_service() -> Container {
)
.ports(vec![Port::Name("5432:5432".to_string())])
.options(
- "--health-cmd pg_isready --health-interval 10s --health-timeout 5s \
- --health-retries 5 --shm-size 1g \
+ "--health-cmd pg_isready --health-interval 1s --health-start-period 30s \
+ --health-timeout 5s --health-retries 5 --shm-size 1g \
-v /dev/shm/pgdata:/var/lib/postgresql/data",
)
}
@@ -397,7 +397,7 @@ fn redis_service() -> Container {
.image("redis:7")
.ports(vec![Port::Name("6379:6379".to_string())])
.options(
- "--health-cmd \"redis-cli ping\" --health-interval 10s \
+ "--health-cmd \"redis-cli ping\" --health-interval 1s --health-start-period 30s \
--health-timeout 5s --health-retries 5",
)
}
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
index 58db6c66fb..37925719bd 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
@@ -246,15 +246,18 @@ pub fn setup_dev_shell_named(name: &str) -> Step<Use> {
setup_dev_shell().add_with(("shell", name))
}
-/// Mount the Namespace profile's persisted cache volume: `cache: rust` persists
-/// the cargo registry/git, and `path:` persists the Nix store. Compiled objects
-/// deliberately use Namespace's official remote sccache instead of this volume.
+/// Mount the Namespace profile's persisted cache volume: cargo's registry, git
+/// checkouts and `target/`, and the Nix store. Listing the paths mounts in under a
+/// second, where the action's `cache: rust` mode took about 12 s to find the same
+/// ones. Compiled objects deliberately use Namespace's official remote sccache
+/// instead of this volume.
/// `continue-on-error` because the volume is a pure optimization — a failure
/// just means cold Cargo/Nix state, never a wrong build.
pub fn mount_cache_volume() -> Step<Use> {
- nscloud_cache_action("Mount Namespace cache volume")
- .add_with(("cache", "rust"))
- .add_with(("path", xtask_paths::runtime_path!("/nix").as_str()))
+ nscloud_cache_action("Mount Namespace cache volume").add_with((
+ "path",
+ "/nix\n./target\n/home/runner/.cargo/registry\n/home/runner/.cargo/git\n/home/runner/.cargo/.global-cache",
+ ))
}
/// Mount a scratch directory for building the nextest filter, plus cargo's registry