create optimized production build
fix nightly build
This commit is contained in:
parent
536d355462
commit
36523a1203
@ -24,17 +24,20 @@ rust-latest:
|
|||||||
- mv ./lib/target/release/raid_manager ./lib/target/release/raid_manager_static
|
- mv ./lib/target/release/raid_manager ./lib/target/release/raid_manager_static
|
||||||
- cargo build -r --manifest-path=lib/Cargo.toml
|
- cargo build -r --manifest-path=lib/Cargo.toml
|
||||||
- cargo test -r --manifest-path=lib/Cargo.toml
|
- cargo test -r --manifest-path=lib/Cargo.toml
|
||||||
|
- cp ./lib/target/release/raid_manager* .
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 2 days
|
expire_in: 2 days
|
||||||
paths:
|
paths:
|
||||||
- "./lib/target/release/raid_manager_static"
|
- "./raid_manager_static"
|
||||||
- "./lib/target/release/raid_manager"
|
- "./raid_manager"
|
||||||
|
|
||||||
rust-nightly:
|
rust-nightly:
|
||||||
stage: build_backend
|
stage: build_backend
|
||||||
image: rustlang/rust:nightly
|
image: rustlang/rust:nightly
|
||||||
script:
|
script:
|
||||||
- cargo build -r --manifest-path=lib/Cargo.toml
|
- mkdir ./lib/webroot
|
||||||
|
- cp -r ./app/build/web/* ./lib/webroot
|
||||||
- cargo build -r --manifest-path=lib/Cargo.toml --features static
|
- cargo build -r --manifest-path=lib/Cargo.toml --features static
|
||||||
|
- cargo build -r --manifest-path=lib/Cargo.toml
|
||||||
- cargo test -r --manifest-path=lib/Cargo.toml
|
- cargo test -r --manifest-path=lib/Cargo.toml
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
@ -12,3 +12,10 @@ rust-embed = "6.4.2"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
static = []
|
static = []
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = 'z' # Optimize for size.
|
||||||
|
lto = true # Enable Link Time Optimization
|
||||||
|
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
|
||||||
|
panic = 'abort' # Abort on panic
|
||||||
|
strip = true # Strip symbols from binary*
|
||||||
|
Loading…
Reference in New Issue
Block a user