neiam
/lambent-flex-c6
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
Put the image name back in the docker run that lost it
5614525 · Gabriel Morell · 2026-09-16 18:41
Message
{commit_body(@commit)}
Files changed
modified
.forgejo/workflows/firmware.yml
+23
−12
@@ -27,16 +27,6 @@ jobs:
| 27 | 27 | # package" is about. |
| 28 | 28 | runs-on: self-hosted |
| 29 | 29 | |
| 30 | − env: | |
| 31 | − # Espressif's own Rust image, pinned to a version rather than | |
| 32 | − # `esp32c6_latest`. The pin is load-bearing twice over: it fixes the | |
| 33 | − # ESP-IDF-capable toolchain, and it fixes the *nightly* the image | |
| 34 | − # installed when it was built. `rust-toolchain.toml` asks for "nightly", | |
| 35 | − # rustup uses whatever nightly is already installed rather than fetching | |
| 36 | − # a newer one, and a current nightly does not build `std` for this target | |
| 37 | − # at all (see CLAUDE.md, failure 1 — `AT_FDCWD`). | |
| 38 | − TOOLCHAIN_IMAGE: espressif/idf-rust:esp32c6_1.95.0.0 | |
| 39 | − | |
| 40 | 30 | steps: |
| 41 | 31 | # Into a subdirectory, because Cargo.toml depends on `../neiam-portal` |
| 42 | 32 | # by path and the two have to be siblings. |
@@ -109,6 +99,26 @@ jobs:
| 109 | 99 | - name: Build and package |
| 110 | 100 | run: | |
| 111 | 101 | set -euo pipefail |
| 102 | + | |
| 103 | + # Espressif's own Rust image, pinned to a version rather than | |
| 104 | + # `esp32c6_latest`. The pin is load-bearing twice over: it fixes the | |
| 105 | + # ESP-IDF-capable toolchain, and it fixes the *nightly* the image | |
| 106 | + # installed when it was built. `rust-toolchain.toml` asks for | |
| 107 | + # "nightly", rustup uses whatever nightly is already installed rather | |
| 108 | + # than fetching a newer one, and a current nightly does not build | |
| 109 | + # `std` for this target at all (see CLAUDE.md, failure 1 — | |
| 110 | + # `AT_FDCWD`). | |
| 111 | + # | |
| 112 | + # Kept next to the command that uses it. Run #4 lost the image | |
| 113 | + # argument from the `docker run` below in an edit, podman quietly | |
| 114 | + # took the next word — `bash` — as the image name, and the build ran | |
| 115 | + # in an Alpine image until it asked for apt-get. A name three lines | |
| 116 | + # from its use is harder to drop than one at the top of the job, and | |
| 117 | + # the `:?` below turns "empty" into an error rather than into a | |
| 118 | + # surprising image. | |
| 119 | + IMAGE=espressif/idf-rust:esp32c6_1.95.0.0 | |
| 120 | + : "${IMAGE:?the toolchain image must not be empty}" | |
| 121 | + | |
| 112 | 122 | mkdir -p .home |
| 113 | 123 | |
| 114 | 124 | # `bash: fork: retry: Resource temporarily unavailable` killed run |
@@ -151,7 +161,7 @@ jobs:
| 151 | 161 | |
| 152 | 162 | mount=(--volumes-from "$cid") |
| 153 | 163 | if ! docker run --rm "${mount[@]}" -w "$PWD/lambent-flex-c6" \ |
| 154 | − "$TOOLCHAIN_IMAGE" test -f Cargo.toml 2>/dev/null; then | |
| 164 | + "$IMAGE" test -f Cargo.toml 2>/dev/null; then | |
| 155 | 165 | # Not in a container after all (a runner label mapped to :host), |
| 156 | 166 | # or volumes-from is unavailable: a plain bind mount is then |
| 157 | 167 | # correct, because $PWD really is a host path. |
@@ -159,7 +169,7 @@ jobs:
| 159 | 169 | mount=(-v "$PWD:$PWD") |
| 160 | 170 | |
| 161 | 171 | if ! docker run --rm "${mount[@]}" -w "$PWD/lambent-flex-c6" \ |
| 162 | − "$TOOLCHAIN_IMAGE" test -f Cargo.toml 2>/dev/null; then | |
| 172 | + "$IMAGE" test -f Cargo.toml 2>/dev/null; then | |
| 163 | 173 | echo "Neither mount strategy exposes the checkout. Diagnostics:" >&2 |
| 164 | 174 | cat /etc/os-release 2>/dev/null | head -2 >&2 || true |
| 165 | 175 | echo "pwd=$PWD uid=$(id -u)" >&2 |
@@ -194,6 +204,7 @@ jobs:
| 194 | 204 | -e MAKEFLAGS="-j$jobs" \ |
| 195 | 205 | -e WORKSPACE="$PWD" \ |
| 196 | 206 | --pids-limit 8192 \ |
| 207 | + "$IMAGE" \ | |
| 197 | 208 | bash -euo pipefail -c ' |
| 198 | 209 | # ESP-IDF builds with cmake and the image ships ninja but not |
| 199 | 210 | # cmake. embuild installs one into IDF_TOOLS_PATH when it has |
Parents: 7636eed