cargo-dist
cargo-dist copied to clipboard
How to set RUSTFLAGS in release.yml?
I need to set
rustflags = ["--cfg", "tokio_unstable"]
or export RUSTFLAGS="--cfg tokio_unstable"
as part of my build, but can't figure out how to get release.yml to pick it up. When I modify the release.yml generated by cargo-dist to set RUSTFLAGS inline whenever it runs build I get an error that the release.yml is dirty as part of plan
.
What's the correct way to set build flags for cargo-dist as part of CI?
You can append an env
block to the build task and set RUSTFLAGS that way. See example here: https://github.com/penumbra-zone/penumbra/blob/b7da9ece7c81a616b6b1222592eb305a7908f61a/.github/workflows/release.yml#L108
Okay got it woorking this way, thanks!