build docker image with lto

This commit is contained in:
Scott Lamb 2022-04-14 10:53:03 -07:00
parent fd7438dd28
commit cdfb61fb35
3 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Each release is tagged in Git and on the Docker repository
* [#219](https://github.com/scottlamb/moonfire-nvr/issues/219): fix * [#219](https://github.com/scottlamb/moonfire-nvr/issues/219): fix
live stream failing with `ws close: 1006` on URLs with port numbers. live stream failing with `ws close: 1006` on URLs with port numbers.
* build Docker images with link-time optimization.
## 0.7.4 (2022-04-13) ## 0.7.4 (2022-04-13)

View File

@ -28,7 +28,7 @@ ln -s /cargo-cache/{git,registry} ~/.cargo
cd src/server cd src/server
time cargo test time cargo test
time cargo build --release time cargo build --profile=release-lto
sudo install -m 755 ~/moonfire-nvr /usr/local/bin/moonfire-nvr sudo install -m 755 ~/moonfire-nvr /usr/local/bin/moonfire-nvr
ls -laFR /cargo-cache > /docker-build-debug/build-server/cargo-cache-after ls -laFR /cargo-cache > /docker-build-debug/build-server/cargo-cache-after

View File

@ -78,5 +78,9 @@ opt-level = 2
[profile.release] [profile.release]
debug = 1 debug = 1
[profile.release-lto]
inherits = "release"
lto = true
[profile.bench] [profile.bench]
debug = 1 debug = 1