mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
Update build
This commit is contained in:
parent
f710e66f64
commit
483aa6f23d
433
Cargo.lock
generated
433
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Makefile
10
Makefile
|
@ -12,14 +12,14 @@ help:
|
|||
|
||||
buildx/kanidmd: ## build multiarch server images
|
||||
buildx/kanidmd:
|
||||
echo @docker buildx build --push --platform $(IMAGE_ARCH) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) $(ARGS) .
|
||||
@docker buildx build --push --platform $(IMAGE_ARCH) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) $(ARGS) .
|
||||
@docker buildx imagetools inspect $(IMAGE_BASE)/server:$(IMAGE_VERSION)
|
||||
echo @docker buildx build $(EXT_OPTS) --pull --push --platform $(IMAGE_ARCH) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) $(ARGS) .
|
||||
@docker buildx build $(EXT_OPTS) --pull --push --platform $(IMAGE_ARCH) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) $(ARGS) .
|
||||
@docker buildx imagetools $(EXT_OPTS) inspect $(IMAGE_BASE)/server:$(IMAGE_VERSION)
|
||||
|
||||
buildx/radiusd: ## build multiarch radius images
|
||||
buildx/radiusd:
|
||||
@docker buildx build --push --platform $(IMAGE_ARCH) -f kanidm_rlm_python/Dockerfile -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) kanidm_rlm_python
|
||||
@docker buildx imagetools inspect $(IMAGE_BASE)/radius:$(IMAGE_VERSION)
|
||||
@docker buildx build $(EXT_OPTS) --pull --push --platform $(IMAGE_ARCH) -f kanidm_rlm_python/Dockerfile -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) kanidm_rlm_python
|
||||
@docker buildx imagetools $(EXT_OPTS) inspect $(IMAGE_BASE)/radius:$(IMAGE_VERSION)
|
||||
|
||||
buildx: buildx/kanidmd buildx/radiusd
|
||||
|
||||
|
|
|
@ -24,11 +24,10 @@ path = "src/server/main.rs"
|
|||
# name = "kanidm_benchmark"
|
||||
# harness = false
|
||||
|
||||
|
||||
[dependencies]
|
||||
kanidm_proto = { path = "../kanidm_proto", version = "1.1.0-alpha" }
|
||||
|
||||
jemallocator = "0.3.0"
|
||||
jemallocator = { version = "0.3.0", optional = true }
|
||||
|
||||
url = "2.1"
|
||||
tide = "0.15"
|
||||
|
@ -72,9 +71,6 @@ time = { version = "0.2", features = ["serde", "std"] }
|
|||
hashbrown = "0.9"
|
||||
concread = "^0.2.5"
|
||||
# concread = { version = "^0.2.5", features = ["simd_support"] }
|
||||
# concread = { path = "../../concread" }
|
||||
# concread = { path = "../../concread", features = ["asynch"] }
|
||||
# crossbeam = "0.7"
|
||||
|
||||
sshkeys = "0.3"
|
||||
|
||||
|
@ -99,6 +95,7 @@ users = "0.11"
|
|||
smartstring = { version = "0.2", features = ["serde"] }
|
||||
|
||||
[features]
|
||||
simd_support = [ "concread/simd_support" ]
|
||||
# default = [ "libsqlite3-sys/bundled", "openssl/vendored" ]
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -3,6 +3,7 @@ FROM ${BASE_IMAGE} AS builder
|
|||
LABEL mantainer william@blackhats.net.au
|
||||
|
||||
RUN zypper -vv ref && \
|
||||
zypper dup -y && \
|
||||
zypper install -y \
|
||||
cargo \
|
||||
rust \
|
||||
|
@ -41,7 +42,7 @@ RUN if [ "$(uname -m)" == "x86_64" ]; \
|
|||
echo $RUSTFLAGS && \
|
||||
echo $CC && \
|
||||
cargo build \
|
||||
--features=concread/simd_support,libsqlite3-sys/bundled \
|
||||
--features=simd_support,libsqlite3-sys/bundled \
|
||||
--release; \
|
||||
if [ "${SCCACHE_REDIS}" != "" ]; \
|
||||
then sccache -s; \
|
||||
|
@ -53,6 +54,7 @@ FROM ${BASE_IMAGE}
|
|||
LABEL mantainer william@blackhats.net.au
|
||||
|
||||
RUN zypper ref && \
|
||||
zypper dup -y && \
|
||||
zypper install -y \
|
||||
timezone \
|
||||
sqlite3 \
|
||||
|
|
29
kanidmd/builder.sh
Normal file
29
kanidmd/builder.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$(uname -m)" == "x86_64" ]; \
|
||||
then export RUSTFLAGS='-Ctarget-cpu=haswell'; \
|
||||
fi; \
|
||||
if [ "$(uname -m)" == "aarch64" ]; \
|
||||
then export RUSTFLAGS=''; \
|
||||
fi; \
|
||||
if [ "${SCCACHE_REDIS}" != "" ]; \
|
||||
then \
|
||||
export CC="/usr/bin/sccache /usr/bin/clang" && \
|
||||
export RUSTC_WRAPPER=sccache && \
|
||||
sccache --start-server; \
|
||||
else \
|
||||
export CC="/usr/bin/clang"; \
|
||||
fi; \
|
||||
export RUSTC_BOOTSTRAP=1 && \
|
||||
echo $RUSTC_BOOTSTRAP && \
|
||||
echo $RUSTC_WRAPPER && \
|
||||
echo $RUSTFLAGS && \
|
||||
echo $CC && \
|
||||
cargo build \
|
||||
--offline \
|
||||
--features=concread/simd_support,libsqlite3-sys/bundled \
|
||||
--release; \
|
||||
if [ "${SCCACHE_REDIS}" != "" ]; \
|
||||
then sccache -s; \
|
||||
fi; \
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#![deny(clippy::needless_pass_by_value)]
|
||||
#![deny(clippy::trivially_copy_pass_by_ref)]
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(jemallocator, test))]
|
||||
#[global_allocator]
|
||||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#![deny(clippy::needless_pass_by_value)]
|
||||
#![deny(clippy::trivially_copy_pass_by_ref)]
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[cfg(all(jemallocator, not(test)))]
|
||||
#[global_allocator]
|
||||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
|
|
Loading…
Reference in a new issue