This repository has been archived by the owner on Dec 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Build and test RISCV #703
Merged
SebastianSchildt
merged 2 commits into
eclipse-archived:master
from
boschglobal:feature/riscvbuilds
Nov 6, 2023
Merged
Build and test RISCV #703
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
kuksa-val-server/build | ||
artifacts | ||
target | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
# | ||
# Building all currently supported targets. | ||
# Uses cross for cross-compiling. Needs to be executed | ||
# before docker build, as docker collects the artifacts | ||
# created by this script | ||
# this needs the have cross, cargo-license and createbom dependencies installed | ||
|
||
# exit on error, to not waste any time | ||
set -e | ||
|
||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | ||
|
||
# Create thirdparty bom | ||
cd createbom/ | ||
rm -rf ../databroker/thirdparty || true | ||
python3 createbom.py ../databroker | ||
cd .. | ||
|
||
# Starting a fresh build | ||
echo "Cargo clean, to start fresh..." | ||
cargo clean | ||
rm -rf ../dist || true | ||
mkdir ../dist | ||
|
||
# Buidling AMD46 | ||
echo "Building AMD64" | ||
cross build --target x86_64-unknown-linux-musl --bin databroker --release | ||
# We need to clean this folder in target, otherwise we get weird side | ||
# effects building the aarch image, complaining libc crate can not find | ||
# GLIBC, i.e | ||
# Compiling libc v0.2.149 | ||
#error: failed to run custom build command for `libc v0.2.149` | ||
# | ||
#Caused by: | ||
# process didn't exit successfully: `/target/release/build/libc-2dd22ab6b5fb9fd2/#build-script-build` (exit status: 1) | ||
# --- stderr | ||
# /target/release/build/libc-2dd22ab6b5fb9fd2/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.29' not found (required by /target/release/build/libc-2dd22ab6b5fb9fd2/build-script-build) | ||
# | ||
# It seems cross/cargo is reusing something from previous builds it shouldn't. | ||
# the finished artifact resides in ../target/x86_64-unknown-linux-musl/release | ||
# so deleting the temporary files in trget/releae is no problem | ||
echo "Cleaning up...." | ||
rm -rf ../target/release | ||
|
||
|
||
# Buidling ARM64 | ||
echo "Building ARM64" | ||
cross build --target aarch64-unknown-linux-musl --bin databroker --release | ||
echo "Cleaning up...." | ||
rm -rf ../target/release | ||
|
||
|
||
# Build RISCV64, this is a glibc based build, as musl is not | ||
# yet supported | ||
echo "Building RISCV64" | ||
cross build --target riscv64gc-unknown-linux-gnu --bin databroker --release | ||
echo "Cleaning up...." | ||
rm -rf ../target/release | ||
|
||
# Prepare dist folders | ||
echo "Prepare amd64 dist folder" | ||
mkdir ../dist/amd64 | ||
cp ../target/x86_64-unknown-linux-musl/release/databroker ../dist/amd64 | ||
cp -r ./databroker/thirdparty ../dist/amd64 | ||
|
||
echo "Prepare arm64 dist folder" | ||
mkdir ../dist/arm64 | ||
cp ../target/aarch64-unknown-linux-musl/release/databroker ../dist/arm64 | ||
cp -r ./databroker/thirdparty ../dist/arm64 | ||
|
||
echo "Prepare riscv64 dist folder" | ||
mkdir ../dist/riscv64 | ||
cp ../target/riscv64gc-unknown-linux-gnu/release/databroker ../dist/riscv64 | ||
cp -r ./databroker/thirdparty ../dist/riscv64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[build.env] | ||
passthrough = [ | ||
"CARGO_REGISTRIES_CRATES_IO_PROTOCOL", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed if we use this alt by default, right?