Use CI profile: thin LTO + 4 codegen units for faster builds
Some checks failed
GBCI Bundle / build-bundle (push) Has been skipped
GBCI / build (push) Has been cancelled

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-12-17 21:59:52 -03:00
parent 503d6e7ca8
commit e992667e2a
2 changed files with 8 additions and 3 deletions

View file

@ -47,7 +47,7 @@ jobs:
- name: Build Linux x86_64
run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo build --release --locked 2>&1 | tee /tmp/botserver-build.log
cargo build --profile ci --locked 2>&1 | tee /tmp/botserver-build.log
echo "Build exit code: $?"
tail -100 /tmp/botserver-build.log
@ -61,14 +61,14 @@ jobs:
- name: Prepare release artifacts
run: |
sudo mkdir -p /opt/gbo/releases/botserver/linux
sudo cp ./target/release/botserver /opt/gbo/releases/botserver/linux/botserver-x86_64 || true
sudo cp ./target/ci/botserver /opt/gbo/releases/botserver/linux/botserver-x86_64 || true
sudo chmod -R 755 /opt/gbo/releases/botserver/
- name: Deploy to production and restart
run: |
lxc exec bot:pragmatismo-system -- systemctl stop system || true
sudo cp ./target/release/botserver /opt/gbo/bin/system/botserver
sudo cp ./target/ci/botserver /opt/gbo/bin/system/botserver
sudo chmod +x /opt/gbo/bin/system/botserver
lxc exec bot:pragmatismo-system -- systemctl start system || true

View file

@ -265,3 +265,8 @@ strip = true
panic = "abort"
codegen-units = 1
overflow-checks = true
[profile.ci]
inherits = "release"
lto = "thin"
codegen-units = 4