defmt icon indicating copy to clipboard operation
defmt copied to clipboard

CI step breaks on macos

Open spookyvision opened this issue 4 years ago • 3 comments

currently the mdbook job is commented out for macos in .github/workflows/ci.yml because it fails:

Run cargo xtask test-book
(...)
Error: ["book: \'mdbook test -L ../target/debug -L ../target/debug/deps\' did not finish successfully: Killed by signal 9"]
Error: Process completed with exit code 1.

I could not reproduce this error on my local macos installation. Initial suspicion was a timeout problem, but increasing the timeout did not fix it. Maybe other resource limits are being hit (memory?)

spookyvision avatar Apr 08 '21 15:04 spookyvision

The test-book command fails internally, because the environment variable CARGO_CRATE_NAME is not set for some reason, even though the env var is passed as an argument (see main.rs) to the run_command function. When assembling the process inside run_command the list of env vars is not set here on OSX.

Running the mdbook command directly including the env var works:

cd book
CARGO_CRATE_NAME=defmt mdbook test -L ../target/debug -L ../target/debug/deps

Using std::env::set_var instead of std::process::Command::envs does not work either. The spawned process will not pick up any env vars.

Tested with:

  • rustc 1.55.0
  • mdbook v0.4.13

(It seems this is not well supported on OSX, not sure how to fix this)

justahero avatar Oct 20 '21 12:10 justahero

I was definitely able to run mdbook tests on my macos installation. That's unfortunately all I can contribute currently. Ping me next week maybe…

spookyvision avatar Oct 21 '21 02:10 spookyvision

uh, yeah, as already noted in the issue description it works on my machine. I misread this as Johann writing it¿ Time to sleep

spookyvision avatar Oct 21 '21 02:10 spookyvision