Add independent component release architecture
Modular container CI / release-build (push) Failing after 12s

This commit is contained in:
faumaray committed 2026-07-29 22:40:35 +03:00
1 parent 458dde05a6
commit 2a533a27f8
18 files changed
+2110 -216

No files matched your search

+69 -56
View File
@@ -10,6 +10,9 @@ Options:
--dist-dir DIR Release output directory (default: dist)
--jobs N Parallel build jobs
--skip-tests Skip CTest and frontend tests
--skip-component-packages
Build only the Echoion product artifacts; component
packages are published by their own repositories
--no-clean Reuse the configured build directory
--update-channel NAME
Component package channel (default: stable)
@@ -67,6 +70,7 @@ dist_dir="$source_dir/dist"
jobs=
run_tests=1
clean_build=1
package_components=1
use_container=1
update_channel=stable
update_sequence=
@@ -101,6 +105,10 @@ while (($#)); do
run_tests=0
shift
;;
--skip-component-packages)
package_components=0
shift
;;
--no-clean)
clean_build=0
shift
@@ -271,6 +279,7 @@ if ((use_container)); then
)
[[ -n $jobs ]] && release_args+=(--jobs "$jobs")
((run_tests)) || release_args+=(--skip-tests)
((package_components)) || release_args+=(--skip-component-packages)
((clean_build)) || release_args+=(--no-clean)
[[ -z $void_source ]] ||
release_args+=(--void-source /workspace-deps/VoidLibrary)
@@ -561,52 +570,54 @@ install -m 0755 "$source_dir/packaging/uninstall.sh" "$stage/uninstall.sh"
mkdir -p "$dist_dir"
component_stage_root="$build_dir/component-staging"
safe_remove_tree "$component_stage_root"
mkdir -p "$component_stage_root"
while IFS=$'\t' read -r component_id package_id; do
component_root="$component_stage_root/$package_id"
cmake --install "$build_dir" \
--config Release \
--component "Package${component_id}" \
--prefix "$component_root"
if ((package_components)); then
safe_remove_tree "$component_stage_root"
mkdir -p "$component_stage_root"
while IFS=$'\t' read -r component_id package_id; do
component_root="$component_stage_root/$package_id"
cmake --install "$build_dir" \
--config Release \
--component "Package${component_id}" \
--prefix "$component_root"
component_executables=()
component_libraries=()
while IFS= read -r -d '' component_elf; do
case $(file --brief --mime-type "$component_elf") in
application/x-executable|application/x-pie-executable|application/x-sharedlib) ;;
*) continue ;;
esac
case ${component_elf#"$component_root"/} in
bin/*) component_executables+=("$component_elf") ;;
*) component_libraries+=("$component_elf") ;;
esac
component_executables=()
component_libraries=()
while IFS= read -r -d '' component_elf; do
case $(file --brief --mime-type "$component_elf") in
application/x-executable|application/x-pie-executable|application/x-sharedlib) ;;
*) continue ;;
esac
case ${component_elf#"$component_root"/} in
bin/*) component_executables+=("$component_elf") ;;
*) component_libraries+=("$component_elf") ;;
esac
done < <(
find "$component_root" -type f -print0 | LC_ALL=C sort -z
)
if ((${#component_executables[@]} || ${#component_libraries[@]})); then
component_executable_list=$(
IFS=';'
echo "${component_executables[*]}"
)
component_library_list=$(
IFS=';'
echo "${component_libraries[*]}"
)
cmake \
"-DBUNDLE_ROOT=$component_root" \
"-DBUNDLE_EXECUTABLES=$component_executable_list" \
"-DBUNDLE_LIBRARIES=$component_library_list" \
"-DBUNDLE_SEARCH_DIRECTORIES=$search_directories" \
"-DBUNDLE_SEED_FILES=$compiler_runtimes" \
"-DPATCHELF_EXECUTABLE=$(command -v patchelf)" \
-P "$source_dir/cmake/BundleComponentDependencies.cmake"
fi
done < <(
find "$component_root" -type f -print0 | LC_ALL=C sort -z
python3 -c \
'import json,sys; data=json.load(open(sys.argv[1], encoding="utf-8"))["components"]; [print(name, data[name]["packageId"], sep="\t") for name in sorted(data)]' \
"$source_dir/components.json"
)
if ((${#component_executables[@]} || ${#component_libraries[@]})); then
component_executable_list=$(
IFS=';'
echo "${component_executables[*]}"
)
component_library_list=$(
IFS=';'
echo "${component_libraries[*]}"
)
cmake \
"-DBUNDLE_ROOT=$component_root" \
"-DBUNDLE_EXECUTABLES=$component_executable_list" \
"-DBUNDLE_LIBRARIES=$component_library_list" \
"-DBUNDLE_SEARCH_DIRECTORIES=$search_directories" \
"-DBUNDLE_SEED_FILES=$compiler_runtimes" \
"-DPATCHELF_EXECUTABLE=$(command -v patchelf)" \
-P "$source_dir/cmake/BundleComponentDependencies.cmake"
fi
done < <(
python3 -c \
'import json,sys; data=json.load(open(sys.argv[1], encoding="utf-8"))["components"]; [print(name, data[name]["packageId"], sep="\t") for name in sorted(data)]' \
"$source_dir/components.json"
)
fi
artifact_base="echoion-${version}-linux-x86_64"
archive="$dist_dir/$artifact_base.tar.zst"
@@ -627,19 +638,21 @@ bash "$source_dir/scripts/package-release-payload.sh" \
install -m 0644 "$stage/manifest.json" "$external_manifest"
install -m 0644 "$dependency_report" "$external_report"
component_sequence=${update_sequence:-$SOURCE_DATE_EPOCH}
if [[ $component_sequence == 0 ]]; then
component_sequence=1
if ((package_components)); then
component_sequence=${update_sequence:-$SOURCE_DATE_EPOCH}
if [[ $component_sequence == 0 ]]; then
component_sequence=1
fi
python3 "$source_dir/scripts/package-components.py" \
--registry "$source_dir/components.json" \
--lock "$source_dir/components.lock.json" \
--staging-root "$component_stage_root" \
--output "$component_dist" \
--channel "$update_channel" \
--sequence "$component_sequence" \
--product-version "$version" \
--toolchain-contract linux-x86_64-glibc-2.35-cxx26
fi
python3 "$source_dir/scripts/package-components.py" \
--registry "$source_dir/components.json" \
--lock "$source_dir/components.lock.json" \
--staging-root "$component_stage_root" \
--output "$component_dist" \
--channel "$update_channel" \
--sequence "$component_sequence" \
--product-version "$version" \
--toolchain-contract linux-x86_64-glibc-2.35-cxx26
(
cd "$dist_dir"
mapfile -t checksum_files < <(
@@ -654,5 +667,5 @@ echo " $archive"
echo " $installer"
echo " $external_manifest"
echo " $external_report"
echo " $component_dist"
((package_components)) && echo " $component_dist"
echo " $dist_dir/SHA256SUMS"