Build static binaries to avoid library dependency issues
Some checks failed
Build and Release / build-and-release (push) Failing after 2m6s

- Add RUSTFLAGS for static linking
- Use explicit x86_64-unknown-linux-gnu target
- Update binary paths to match target directory
This commit is contained in:
Christoffer Martinsson 2025-10-25 16:18:34 +02:00
parent e61fd7fd76
commit 5f8c933844

View File

@ -30,15 +30,16 @@ jobs:
apt-get update
apt-get install -y pkg-config libssl-dev libzmq3-dev
- name: Build workspace
- name: Build workspace (static)
run: |
cargo build --release --workspace
export RUSTFLAGS="-C target-feature=+crt-static"
cargo build --release --workspace --target x86_64-unknown-linux-gnu
- name: Create release directory
run: |
mkdir -p release
cp target/release/cm-dashboard release/cm-dashboard-linux-x86_64
cp target/release/cm-dashboard-agent release/cm-dashboard-agent-linux-x86_64
cp target/x86_64-unknown-linux-gnu/release/cm-dashboard release/cm-dashboard-linux-x86_64
cp target/x86_64-unknown-linux-gnu/release/cm-dashboard-agent release/cm-dashboard-agent-linux-x86_64
- name: Create tarball
run: |