mirror of
https://github.com/therealaleph/MasterHttpRelayVPN-RUST.git
synced 2026-05-17 21:24:48 +03:00
v1.1.2: actually-green mipsel-softfloat (YAML comment-fold bug) (#44)
v1.1.1 still failed the mipsel CI matrix for a non-obvious reason.
The `Build CLI (mipsel-softfloat via docker)` step passed a
multi-line argument to `sh -c "..."` with `\` line continuations
and inline `#` comments:
sh -c "set -eux; \
# The image ships with a pre-installed nightly ... \
rustup toolchain uninstall ... \
..."
YAML's `run: |` block-scalar folds that into a single line on the
shell side — backslash-newline collapses become spaces. The
payload handed to `sh -c` becomes one long line in which the
first `#` comments out everything that follows on that line, so
the only command that actually ran inside the container was
`set -eux;`. Everything after it was a comment. The container
exited successfully (set -eux + empty; is a zero-exit no-op),
the `target/` directory never got created, and the post-docker
`sudo chown -R "$(id -u):$(id -g)" target` failed with
chown: cannot access 'target': No such file or directory
Process completed with exit code 1.
which fooled me into thinking the toolchain logic failed, when
actually NO toolchain logic ran at all.
Fix: use bash with a single-quoted multi-line script. Single
quotes preserve newlines literally, so `#` stays a
line-terminating comment rather than collapsing. Heredoc-style
formatting; same commands as before.
No other changes. Version bumps only (Cargo + Android versionCode/
versionName). Telegram notify stays off via the repo-variable
gate we added yesterday.
This commit is contained in:
committed by
GitHub
parent
54b3956e23
commit
383bea008e
@@ -162,24 +162,33 @@ jobs:
|
||||
# stable channel — no prebuilt std.
|
||||
- name: Build CLI (mipsel-softfloat via docker)
|
||||
if: matrix.target == 'mipsel-unknown-linux-musl' && matrix.mipsel_softfloat == true
|
||||
# The inner script is single-quoted so the `#` lines stay as
|
||||
# real comments. An earlier version of this step used
|
||||
# `sh -c "... \` (backslash-continuation inside a
|
||||
# double-quoted YAML folded string) which collapsed into one
|
||||
# line — the first `#` then commented out everything after it,
|
||||
# reducing the whole docker payload to `set -eux;` and failing
|
||||
# silently at the post-docker chown. Heredoc-style single
|
||||
# quotes preserve newlines verbatim; no comment collapse.
|
||||
run: |
|
||||
docker run --rm -v "$PWD":/src -w /src \
|
||||
-e RUSTFLAGS='-C target-feature=+soft-float' \
|
||||
messense/rust-musl-cross:mipsel-musl \
|
||||
sh -c "set -eux; \
|
||||
# The image ships with a pre-installed nightly that rustup \
|
||||
# can't cleanly upgrade — the expected \`clippy-preview/share/doc/clippy/README.md\` \
|
||||
# is missing, which fails the in-place upgrade \
|
||||
# (error: failure removing component 'clippy-preview...'). \
|
||||
# Nuke it first, then install fresh with only the profile \
|
||||
# bits we actually use. \
|
||||
rustup toolchain uninstall nightly 2>/dev/null || true; \
|
||||
rustup toolchain install nightly --profile minimal; \
|
||||
rustup component add rust-src --toolchain nightly; \
|
||||
cargo +nightly build --release \
|
||||
-Z build-std=std,panic_abort \
|
||||
--target mipsel-unknown-linux-musl \
|
||||
--bin mhrv-rs"
|
||||
bash -c '
|
||||
set -eux
|
||||
# The image ships a pre-installed nightly that rustup
|
||||
# cannot upgrade in place — `clippy-preview/share/doc/clippy/README.md`
|
||||
# is missing from the pre-bake, and rustup errors with
|
||||
# "failure removing component clippy-preview". Nuke it
|
||||
# first, then install fresh.
|
||||
rustup toolchain uninstall nightly 2>/dev/null || true
|
||||
rustup toolchain install nightly --profile minimal
|
||||
rustup component add rust-src --toolchain nightly
|
||||
cargo +nightly build --release \
|
||||
-Z build-std=std,panic_abort \
|
||||
--target mipsel-unknown-linux-musl \
|
||||
--bin mhrv-rs
|
||||
'
|
||||
sudo chown -R "$(id -u):$(id -g)" target
|
||||
|
||||
# UI build: we try to build the UI binary on every platform. If it fails
|
||||
|
||||
Reference in New Issue
Block a user