mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Since wal-g does not provide binaries for aarch64, build them from source. While building them from source for arm64 would better ensure that build process is tested, the build process takes 7min and 700M of temp files, which is an unacceptable cost; we thus only build on aarch64. Since the wal-g build process uses submodules, which are not in the Github export, we clone the full wal-g repository. Because the repository is relatively small, we clone it anew on each new version, rather than attempt to manage the remotes. Fixes #21070.
		
			
				
	
	
		
			36 lines
		
	
	
		
			604 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			604 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
set -eux
 | 
						|
 | 
						|
apt-get install -y \
 | 
						|
    liblzo2-dev \
 | 
						|
    libbrotli-dev \
 | 
						|
    libsodium-dev \
 | 
						|
    build-essential \
 | 
						|
    gcc \
 | 
						|
    cmake \
 | 
						|
    libc-dev
 | 
						|
 | 
						|
tmpdir="$(mktemp -d)"
 | 
						|
trap 'rm -r "$tmpdir"' EXIT
 | 
						|
 | 
						|
export GOCACHE="$tmpdir/cache"
 | 
						|
export GOPATH="$tmpdir/build"
 | 
						|
 | 
						|
src_dir="/srv/zulip-wal-g-src-$1"
 | 
						|
dst="/srv/zulip-wal-g-$1"
 | 
						|
 | 
						|
cd "$src_dir"
 | 
						|
 | 
						|
if [ "$(git rev-parse HEAD)" != "$2" ]; then
 | 
						|
    echo "Commit tag has changed; expected $2, got $(git rev-parse HEAD)"
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
 | 
						|
export PATH="$PATH:$GOBIN"
 | 
						|
export USE_LZO=1
 | 
						|
export USE_LIBSODIUM=1
 | 
						|
make deps pg_build
 | 
						|
 | 
						|
mv "main/pg/wal-g" "$dst"
 |