Skip to content

Commit

Permalink
Add VISS code when building in CI. Enable feature selection in local …
Browse files Browse the repository at this point in the history
…build script

Signed-off-by: Sebastian Schildt <[email protected]>
  • Loading branch information
SebastianSchildt committed Apr 30, 2024
1 parent b998ca8 commit c7950be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kuksa_databroker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Build
working-directory: ${{github.workspace}}/
run: |
cross build --target ${{ matrix.platform.target }} --bin databroker --release
cross build --target ${{ matrix.platform.target }} --features viss --bin databroker --release
mkdir -p "dist"
cp "target/${{ matrix.platform.target }}/release/databroker" "dist"
- name: Package dist files
Expand Down
15 changes: 12 additions & 3 deletions build-all-targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ SCRIPT_DIR=$(dirname "$SCRIPT_PATH")

CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# Check if a certai feature set was requested
if [ -z "$KUKSA_DATABROKER_FEATURES" ]; then
# If not set, assign a default value
KUKSA_DATABROKER_FEATURES="databroker/default"
fi

echo "Building with features: $KUKSA_DATABROKER_FEATURES"


# We need to clean this folder in target, otherwise we get weird side
# effects building for different archs, complaining libc crate can not find
# GLIBC, i.e
Expand Down Expand Up @@ -46,18 +55,18 @@ popd
# Building AMD46
echo "Building AMD64"
cleanup_target_release_dir
cross build --target x86_64-unknown-linux-musl --bin databroker --release
cross build --target x86_64-unknown-linux-musl --features $KUKSA_DATABROKER_FEATURES --bin databroker --release

# Building ARM64
echo "Building ARM64"
cleanup_target_release_dir
cross build --target aarch64-unknown-linux-musl --bin databroker --release
cross build --target aarch64-unknown-linux-musl --features $KUKSA_DATABROKER_FEATURES --bin databroker --release

# Build RISCV64, this is a glibc based build, as musl is not
# yet supported
echo "Building RISCV64"
cleanup_target_release_dir
cross build --target riscv64gc-unknown-linux-gnu --bin databroker --release
cross build --target riscv64gc-unknown-linux-gnu --features $KUKSA_DATABROKER_FEATURES --bin databroker --release

# Prepare dist folders
echo "Prepare amd64 dist folder"
Expand Down

0 comments on commit c7950be

Please sign in to comment.