Skip to content

Best way to setup debug builds in the CI? #140

Answered by ipetkov
dpc asked this question in Q&A
Discussion options

You must be logged in to vote

Easiest way? Set CARGO_PROFILE = "dev"; in the derivation and all cargo invocations will effectively run as cargo --profile dev (which is the default "debug" profile used by cargo)

It's worth noting that cargo considers debug and release artifacts to be different, so if your CI doesn't build production/release builds your consumers may need to build it themselves (but you might not care about this).

I'd also note that you should be careful not to mix debug cargoArtifacts built with a derivation which expects to do a release build. Cargo will happily compile everything, but effectively you won't get any benefits of artifact caching.

It's also technically possible to build and cache both re…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@dpc
Comment options

@dpc
Comment options

@ipetkov
Comment options

@ipetkov
Comment options

@dpc
Comment options

Answer selected by ipetkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants