mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-27 04:53:50 +03:00
Speed up release builds
Setting cargo to run incremental builds means partial build results should be cached. This is not enabled by default in release mode. Incremental builds use 256 codegen units by default [1]. We set them to 16 (release default) again for somewhat faster code but slightly slower builds. [1]: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
This commit is contained in:
parent
888a2f7fa1
commit
0080932aef
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ test:cargo:
|
|||
- "apt-get install -yqq --no-install-recommends $NEEDED_PACKAGES"
|
||||
- "rustup target add $TARGET"
|
||||
script:
|
||||
# Set some cargo tuning here, because targets overwrite the 'variables'
|
||||
- "export CARGO_INCREMENTAL=true"
|
||||
- "export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16"
|
||||
- time cargo build --target $TARGET --release
|
||||
- 'mv "target/$TARGET/release/conduit" "conduit-$TARGET"'
|
||||
artifacts:
|
||||
|
|
Loading…
Reference in a new issue