geforkt von Mirrors/Velocity
af629cf000
This time around, instead of the very ad hoc approach I have historically taken, this time we actually have a convenient script that takes care of basically all the hard work necessary, including cross-compilation. We compile natives for Ubuntu 20.04 LTS (OpenSSL 1.1.x native and libdeflate) and Ubuntu 22.04 LTS (OpenSSL 3.x.x native), for both x86_64 and aarch64. The macOS natives have also been recompiled on macOS Sonoma.
32 Zeilen
1.2 KiB
Bash
Ausführbare Datei
32 Zeilen
1.2 KiB
Bash
Ausführbare Datei
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# make sure we're in the correct directory - the top-level `native` directory
|
|
cd "$(dirname "$0")/.." || exit 1
|
|
|
|
ARCHS=(x86_64 aarch64)
|
|
BASE_DOCKERFILE_VARIANTS=(ubuntu-focal ubuntu-jammy)
|
|
|
|
for variant in "${BASE_DOCKERFILE_VARIANTS[@]}"; do
|
|
docker_platforms=""
|
|
for arch in "${ARCHS[@]}"; do
|
|
docker_platforms="$docker_platforms --platform linux/${arch}"
|
|
done
|
|
|
|
echo "Building base build image for $variant..."
|
|
docker build -t velocity-native-build:$variant $docker_platforms -f build-support/$variant.Dockerfile .
|
|
done
|
|
|
|
for arch in "${ARCHS[@]}"; do
|
|
for variant in "${BASE_DOCKERFILE_VARIANTS[@]}"; do
|
|
echo "Building native crypto for $arch on $variant..."
|
|
|
|
docker run --rm -v "$(pwd)":/app --platform linux/${arch} velocity-native-build:$variant /bin/bash -c "cd /app && ./build-support/compile-linux-crypto.sh"
|
|
done
|
|
|
|
# Use only the oldest variant for the compression library
|
|
variant=${BASE_DOCKERFILE_VARIANTS[0]}
|
|
echo "Building native compression for $arch on $variant..."
|
|
docker run --rm -v "$(pwd)":/app --platform linux/${arch} velocity-native-build:$variant /bin/bash -c "cd /app && ./build-support/compile-linux-compress.sh"
|
|
done |