Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 10s
Three fixes surfaced by the 2026-07-13 Gitea Actions wire-up.
## XDG config path
Before: `client_config::user_config_path` only looked at
`~/.claw-cargo/config.toml`. My runner-integration doc initially
told operators to install at `~/.config/claw-cargo/config.toml`
(XDG-style). Config wasn't loaded.
Now: three-way lookup, first hit wins.
1. `$XDG_CONFIG_HOME/claw-cargo/config.toml`
2. `$HOME/.config/claw-cargo/config.toml`
3. `$HOME/.claw-cargo/config.toml` (legacy, still honoured)
+3 tests: XDG env wins when the file exists, .config wins over
legacy dotfile when both present, legacy dotfile returned as
error-message fallback when none exist.
## Composite action
Before: composite action silently no-op'd. Log showed the script
lines echoed but only the `if command -v claw-cargo` fail branch
ran. Root cause: Gitea Actions composite steps run with a stripped
PATH that omits `/usr/local/bin`.
Now: composite step exports PATH defensively:
export PATH="/usr/local/bin:$HOME/.cargo/bin:$PATH"
And it looks for the config at BOTH the XDG-style path and the
legacy dotfile (same order as client_config).
Workflow file back to using the composite action.
## Docs
Runner-integration doc now:
- Explicitly warns that `ubuntu-latest` routes to container mode
even with `:host` suffix on runner labels (field-observed).
- Documents the dedicated `clawstor-cache` label pattern that
works.
- Sample workflow uses `runs-on: clawstor-cache` instead of
`ubuntu-latest`.
+3 tests, 262 total (baseline unchanged).
29 lines
726 B
YAML
29 lines
726 B
YAML
name: Build with clawstor cache
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
name: Cargo build (clawstor-cached)
|
|
runs-on: clawstor-cache
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build with clawstor cache
|
|
id: cache
|
|
uses: ./.gitea/actions/cargo-cache
|
|
with:
|
|
workspace: '.'
|
|
profile: 'dev'
|
|
no-upload: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}
|
|
|
|
- name: Announce outcome
|
|
run: |
|
|
echo "cache: ${{ steps.cache.outputs.cache-outcome }}"
|
|
echo "fp: ${{ steps.cache.outputs.fingerprint }}"
|
|
echo "time: ${{ steps.cache.outputs.elapsed-seconds }}s"
|