Cache Rust build artifacts for Alpine packages
Some checks failed
Build Alpine Packages / build-and-publish (push) Has been cancelled

This commit is contained in:
Joachim Schlöffel
2026-06-09 10:47:17 +02:00
parent 11ef6456af
commit 50e8eaa62a
5 changed files with 69 additions and 5 deletions

View File

@@ -54,8 +54,9 @@ source="
_rust_toolchain="nightly-2026-03-21"
_cargo_profile="nightly"
export CARGO_HOME="$srcdir/cargo"
export RUSTUP_HOME="$srcdir/rustup"
export CARGO_HOME="${CARGO_HOME:-$srcdir/cargo}"
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$builddir/target}"
export RUSTUP_HOME="${RUSTUP_HOME:-$srcdir/rustup}"
export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-2}"
export CARGO_PROFILE_NIGHTLY_CODEGEN_UNITS="${CARGO_PROFILE_NIGHTLY_CODEGEN_UNITS:-16}"
export CARGO_PROFILE_NIGHTLY_DEBUG="${CARGO_PROFILE_NIGHTLY_DEBUG:-false}"
@@ -80,11 +81,11 @@ build() {
}
check() {
"$builddir"/target/"$_cargo_profile"/greptime --version
"$CARGO_TARGET_DIR"/"$_cargo_profile"/greptime --version
}
package() {
install -Dm755 "$builddir"/target/"$_cargo_profile"/greptime \
install -Dm755 "$CARGO_TARGET_DIR"/"$_cargo_profile"/greptime \
"$pkgdir"/usr/bin/greptime
local _config
for _config in datanode flownode frontend metasrv standalone; do