Commit 6584b39
feat(reusables): add working_directory input to rust-ci + elixir-ci (#186)
## Summary
Stacked on #174. Adds a `working_directory` string input (default `.`)
to both reusable workflows so wrappers can target a sub-crate or sub-app
layout without re-implementing the workflow.
## What changes
**rust-ci-reusable.yml:**
- New `working_directory` input (default `.`)
- Each job declares `defaults.run.working-directory: ${{
inputs.working_directory }}`
- `hashFiles('Cargo.toml')` guards now use
`hashFiles(format('{0}/Cargo.toml', inputs.working_directory))`
- Swatinem/rust-cache `workspaces:` parameter passes the working
directory so caches are keyed per sub-crate
**elixir-ci-reusable.yml:**
- New `working_directory` input (default `.`)
- Job declares `defaults.run.working-directory`
- `mix.exs` and `mix.lock` lookups + cache `path:` entries all consult
the input via `format()`
## Why
Audit of the 6 remaining elixir-ci.yml consumers + the 5 complex
rust-ci.yml consumers (as of 2026-05-26):
**elixir (3 of 6 need this):**
- burble → `server/`
- feedback-o-tron → (working-directory)
- verisimdb → (working-directory)
**rust (1 of 5 needs this; the rest use matrix dimensions):**
- reasonably-good-token-vault → per-crate (`vault-broker`, `rgtv-cli`)
## Explicitly out of scope
Multi-OS / multi-Rust-version / multi-crate matrices and `cross build`
support are deferred. The 4 matrix-using rust-ci repos each use a
**different** matrix dimension (`os` / `rust` / `workspaces` /
`manifests`) — no single shared abstraction fits cleanly. They stay
bespoke for now; re-evaluate after the current wrapper sweep completes.
| Repo | Matrix dimension |
|---|---|
| julia-the-viper | `os` (linux/macos/windows) |
| verisimiser | `rust` (1.85, stable) |
| reasonably-good-token-vault | `crate` (multi-workspace — covered by
`working_directory` per-job) |
| verisimdb | `manifest` (fuzz/Cargo.toml + rust-core/fuzz/Cargo.toml) +
coverage + audit |
## Test plan
- [x] YAML parse OK locally (python3 yaml.safe_load both files)
- [ ] CI on this PR — but circular-validation caveat applies (per #174
PR description) — `pull_request` runs target-branch workflow, not the
PR's
- [ ] Owner merge order: #174 → this PR (this is stacked on
`feat/rust-ci-reusable`; GitHub will retarget to `main` automatically
once #174 merges)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a03e5a3 commit 6584b39
2 files changed
Lines changed: 77 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| |||
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
77 | 96 | | |
78 | 97 | | |
79 | 98 | | |
| |||
83 | 102 | | |
84 | 103 | | |
85 | 104 | | |
86 | | - | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
91 | 113 | | |
92 | 114 | | |
93 | 115 | | |
| |||
104 | 126 | | |
105 | 127 | | |
106 | 128 | | |
107 | | - | |
108 | | - | |
| 129 | + | |
| 130 | + | |
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
112 | 134 | | |
113 | | - | |
114 | | - | |
| 135 | + | |
| 136 | + | |
115 | 137 | | |
116 | 138 | | |
117 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
| |||
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
68 | 98 | | |
69 | 99 | | |
70 | 100 | | |
| |||
76 | 106 | | |
77 | 107 | | |
78 | 108 | | |
79 | | - | |
| 109 | + | |
80 | 110 | | |
81 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
82 | 115 | | |
83 | 116 | | |
84 | 117 | | |
| |||
93 | 126 | | |
94 | 127 | | |
95 | 128 | | |
| 129 | + | |
| 130 | + | |
96 | 131 | | |
97 | 132 | | |
98 | 133 | | |
| |||
107 | 142 | | |
108 | 143 | | |
109 | 144 | | |
110 | | - | |
| 145 | + | |
111 | 146 | | |
112 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
113 | 151 | | |
114 | 152 | | |
115 | 153 | | |
| |||
122 | 160 | | |
123 | 161 | | |
124 | 162 | | |
| 163 | + | |
| 164 | + | |
125 | 165 | | |
126 | 166 | | |
127 | 167 | | |
| |||
139 | 179 | | |
140 | 180 | | |
141 | 181 | | |
142 | | - | |
| 182 | + | |
143 | 183 | | |
144 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
145 | 188 | | |
146 | 189 | | |
147 | 190 | | |
| |||
164 | 207 | | |
165 | 208 | | |
166 | 209 | | |
167 | | - | |
| 210 | + | |
168 | 211 | | |
169 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
170 | 216 | | |
171 | 217 | | |
172 | 218 | | |
| |||
0 commit comments