Fix fdb amd64 build Failure (#1479)
* Bump reproducible-containers/buildkit-cache-dance from 3.1.2 to 3.2.0 Bumps [reproducible-containers/buildkit-cache-dance](https://github.com/reproducible-containers/buildkit-cache-dance) from 3.1.2 to 3.2.0. - [Release notes](https://github.com/reproducible-containers/buildkit-cache-dance/releases) - [Commits](https://github.com/reproducible-containers/buildkit-cache-dance/compare/v3.1.2...v3.2.0) --- updated-dependencies: - dependency-name: reproducible-containers/buildkit-cache-dance dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fix foundationdb-build fail on amd64 --------- Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -200,7 +200,7 @@ jobs:
|
|||||||
key: cargo-cache-${{ steps.cal-dep-shasum.outputs.checksum }}
|
key: cargo-cache-${{ steps.cal-dep-shasum.outputs.checksum }}
|
||||||
|
|
||||||
- name: Inject cache into docker
|
- name: Inject cache into docker
|
||||||
uses: reproducible-containers/buildkit-cache-dance@v3.1.2
|
uses: reproducible-containers/buildkit-cache-dance@v3.2.0
|
||||||
with:
|
with:
|
||||||
cache-map: |
|
cache-map: |
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,13 +60,29 @@ RUN \
|
|||||||
echo "Setting up ${BUILD_ENV}"; \
|
echo "Setting up ${BUILD_ENV}"; \
|
||||||
fi && \
|
fi && \
|
||||||
if [[ "${TARGET}" == *gnu ]]; then \
|
if [[ "${TARGET}" == *gnu ]]; then \
|
||||||
echo "export FDB_ARCH=${TARGET%%-*}" >> /env-cargo; \
|
base_arch="${TARGET%%-*}"; \
|
||||||
|
case "$base_arch" in \
|
||||||
|
x86_64) \
|
||||||
|
echo "export FDB_ARCH=amd64" >> /env-cargo; \
|
||||||
|
;; \
|
||||||
|
aarch64) \
|
||||||
|
echo "export FDB_ARCH=aarch64" >> /env-cargo; \
|
||||||
|
;; \
|
||||||
|
*) \
|
||||||
|
exit 1; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
fi
|
fi
|
||||||
# Install FoundationDB
|
# Install FoundationDB
|
||||||
RUN \
|
RUN \
|
||||||
source /env-cargo && \
|
source /env-cargo && \
|
||||||
if [ ! -z "${FDB_ARCH}" ]; then \
|
if [ ! -z "${FDB_ARCH}" ]; then \
|
||||||
curl --retry 5 -Lso /usr/lib/libfdb_c.so "$(curl --retry 5 -Ls 'https://api.github.com/repos/apple/foundationdb/releases' | jq --arg FDB_ARCH "$FDB_ARCH" -r '.[] | select(.prerelease == false) | .assets[] | select(.name | test("libfdb_c." + $FDB_ARCH + ".so")) | .browser_download_url' | head -n1)"; \
|
curl --retry 5 -Lso fdb-client.deb "$(curl --retry 5 -Ls 'https://api.github.com/repos/apple/foundationdb/releases' | jq --arg FDB_ARCH "$FDB_ARCH" -r '.[] | select(.prerelease == false) | .assets[] | select(.name | test("foundationdb-clients.*" + $FDB_ARCH + ".deb$")) | .browser_download_url' | head -n1)" && \
|
||||||
|
mkdir -p /fdb && \
|
||||||
|
dpkg -x fdb-client.deb /fdb && \
|
||||||
|
mv /fdb/usr/include/foundationdb /usr/include && \
|
||||||
|
mv /fdb/usr/lib/libfdb_c.so /usr/lib && \
|
||||||
|
rm -rf fdb-client.deb /fdb; \
|
||||||
fi
|
fi
|
||||||
# Cargo-chef Cache layer
|
# Cargo-chef Cache layer
|
||||||
RUN \
|
RUN \
|
||||||
@@ -98,7 +114,7 @@ RUN \
|
|||||||
--mount=type=cache,target=/usr/local/cargo/git \
|
--mount=type=cache,target=/usr/local/cargo/git \
|
||||||
source /env-cargo && \
|
source /env-cargo && \
|
||||||
if [ ! -z "${FDB_ARCH}" ]; then \
|
if [ ! -z "${FDB_ARCH}" ]; then \
|
||||||
RUSTFLAGS="-L /usr/lib" cargo zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "foundationdb elastic s3 redis enterprise"; \
|
RUSTFLAGS="-L /usr/lib" cargo zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "foundationdb elastic s3 redis enterprise" && \
|
||||||
mv /app/target/${TARGET}/release/stalwart-mail /app/artifact/stalwart-mail-foundationdb; \
|
mv /app/target/${TARGET}/release/stalwart-mail /app/artifact/stalwart-mail-foundationdb; \
|
||||||
fi
|
fi
|
||||||
# Build generic version
|
# Build generic version
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ utils = { path = "../utils" }
|
|||||||
nlp = { path = "../nlp" }
|
nlp = { path = "../nlp" }
|
||||||
trc = { path = "../trc" }
|
trc = { path = "../trc" }
|
||||||
rocksdb = { version = "0.23", optional = true, features = ["multi-threaded-cf"] }
|
rocksdb = { version = "0.23", optional = true, features = ["multi-threaded-cf"] }
|
||||||
foundationdb = { version = "0.9.2", features = ["embedded-fdb-include", "fdb-7_3"], optional = true }
|
foundationdb = { version = "0.9.2", features = ["fdb-7_3"], optional = true }
|
||||||
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
|
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
|
||||||
rust-s3 = { version = "=0.35.0-alpha.2", default-features = false, features = ["tokio-rustls-tls", "no-verify-ssl"], optional = true }
|
rust-s3 = { version = "=0.35.0-alpha.2", default-features = false, features = ["tokio-rustls-tls", "no-verify-ssl"], optional = true }
|
||||||
azure_core = { version = "0.21.0", optional = true }
|
azure_core = { version = "0.21.0", optional = true }
|
||||||
|
|||||||
Reference in New Issue
Block a user