• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Alan-Jowett / sonde / 23321045651
82%

Build:
DEFAULT BRANCH: main
Ran 19 Mar 2026 11:07PM UTC
Jobs 1
Files 71
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Mar 2026 11:02PM UTC coverage: 82.633%. Remained the same
23321045651

push

github

web-flow
fix: embed git commit hash in firmware CI builds (#322)

* fix: embed git commit hash in firmware CI builds

Both `sonde-node` and `sonde-modem` build.rs files run
`git rev-parse --short HEAD` to inject the commit SHA at compile
time.  Inside the CI Docker container (`sonde-esp-dev`) this
command fails silently — likely due to git `safe.directory`
ownership checks on the mounted workspace — so the firmware falls
back to `commit=unknown`.

The problem is compounded by `Swatinem/rust-cache`: once the
stale `unknown` value is cached, `embuild::espidf::sysenv::output()`
emits its own `cargo:rerun-if-changed` directives while the failed
git block emits none, so Cargo never re-runs build.rs for git
changes on subsequent CI runs.

Fix:
- build.rs (both crates): check a `SONDE_GIT_COMMIT` env var first,
  fall back to `git rev-parse`, then `unknown`.  Also emit
  `cargo:rerun-if-env-changed=SONDE_GIT_COMMIT` so Cargo
  invalidates correctly when the var changes.
- esp32.yml / esp32-modem.yml: pass `SONDE_GIT_COMMIT: ${{ github.sha }}`
  in the build step env so the hash is always available regardless
  of whether git works inside the container.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: trim and normalise SONDE_GIT_COMMIT to 7-char short hash

Addresses review feedback: trim whitespace/newlines from the env
var to prevent corrupting the cargo:rustc-env directive, and
truncate to 7 chars for consistent output between CI (full SHA)
and local builds (git rev-parse --short).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

16525 of 19998 relevant lines covered (82.63%)

49.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23321045651.1 19 Mar 2026 11:07PM UTC 71
82.63
GitHub Action Run
Source Files on build 23321045651
  • Tree
  • List 71
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23321045651
  • 63bbad30 on github
  • Prev Build on main (#23317020395)
  • Next Build on main (#23325828688)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc