Skip to content

enhancement: add cargo cache to rust-ci.yml (pin actions/cache SHA) #386

Description

@FabioLeitao

Contexto

O proprio rust-ci.yml documenta a ausencia de cache:

Caching cargo registry/target would speed up subsequent runs but requires pinning
actions/cache to a verified commit SHA per the repo convention. The crate is small
and a clean build is ~10s, so we skip the cache step here.

Problema

Valido agora. A medida que boar_fast_filter crescer (dependencias PyO3, mais modulos), o build sem cache vai impactar o tempo de CI progressivamente.

Acao sugerida

Quando o tempo de CI passar de ~30s, adicionar actions/cache pinado ao SHA completo (ADR 0005). Template para o step:

- name: Cache cargo registry
  uses: actions/cache@<SHA-COMPLETO> # v4
  with:
    path: |
      ~/.cargo/registry
      ~/.cargo/git
      rust/boar_fast_filter/target
    key: cargo-${{ runner.os }}-${{ hashFiles('rust/boar_fast_filter/Cargo.lock') }}
    restore-keys: cargo-${{ runner.os }}-

Verificar SHA atual de actions/cache@v4 no momento de implementar.

Origem

Auditoria externa — Slice 2 / rust-ci.yml

Metadata

Metadata

Assignees

Labels

P3Low — backlog / nice-to-haveenhancementNew feature or requestgithub_actionsPull requests that update GitHub Actions coderustPull requests that update rust code

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions