fix CI build (optimize memory usage during build)
All checks were successful
Build Alpine Packages / build-and-publish (push) Successful in 39m16s
All checks were successful
Build Alpine Packages / build-and-publish (push) Successful in 39m16s
This commit is contained in:
@@ -31,9 +31,13 @@ options="net"
|
|||||||
source="$pkgname-$pkgver.tar.gz::https://github.com/GreptimeTeam/greptimedb/archive/refs/tags/v$pkgver.tar.gz"
|
source="$pkgname-$pkgver.tar.gz::https://github.com/GreptimeTeam/greptimedb/archive/refs/tags/v$pkgver.tar.gz"
|
||||||
|
|
||||||
_rust_toolchain="nightly-2026-03-21"
|
_rust_toolchain="nightly-2026-03-21"
|
||||||
|
_cargo_profile="nightly"
|
||||||
export CARGO_HOME="$srcdir/cargo"
|
export CARGO_HOME="$srcdir/cargo"
|
||||||
export RUSTUP_HOME="$srcdir/rustup"
|
export RUSTUP_HOME="$srcdir/rustup"
|
||||||
export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-2}"
|
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}"
|
||||||
|
export CARGO_PROFILE_NIGHTLY_LTO="${CARGO_PROFILE_NIGHTLY_LTO:-thin}"
|
||||||
export LIBRARY_PATH="/usr/lib"
|
export LIBRARY_PATH="/usr/lib"
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
@@ -47,18 +51,18 @@ prepare() {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo build \
|
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo build \
|
||||||
--release \
|
--profile "$_cargo_profile" \
|
||||||
--locked \
|
--locked \
|
||||||
--bin greptime \
|
--bin greptime \
|
||||||
--features servers/dashboard
|
--features servers/dashboard
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
"$builddir"/target/release/greptime --version
|
"$builddir"/target/"$_cargo_profile"/greptime --version
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm755 "$builddir"/target/release/greptime \
|
install -Dm755 "$builddir"/target/"$_cargo_profile"/greptime \
|
||||||
"$pkgdir"/usr/bin/greptime
|
"$pkgdir"/usr/bin/greptime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user