Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VISS code when building with defaults #19

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should better document (in our wiki? As part of release testing? ) how to set this variable when building locally to get viss support. The only use-case I know of right now for this shell script is if I want to build docker containers locally, as our Dockerfile relies on that binaries already exist.

Might spend some time trying this out unless you have already tested thoroughly Sebastian

Copy link
Contributor Author

@SebastianSchildt SebastianSchildt Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, but as seen above, this is not currently used, as the build is done in GH Actions. For now I did the "easy fix" as suggested by John, but I want to give the capability to select features to the build script as well.

I might reconcile the two ways of building in a follow up PR (the build script will change again), so I think documenting it should be done then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been used by me :-)

In my view it is beneficial to have one way to build docker containers locally, good if doing major changes

# 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
Loading