forked from XTXMarkets/ternfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·44 lines (35 loc) · 1.03 KB
/
build.sh
File metadata and controls
executable file
·44 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# Copyright 2025 XTX Markets Technologies Limited
#
# SPDX-License-Identifier: GPL-2.0-or-later
set -eu -o pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
build_variant=$1
out_dir=build/$build_variant
mkdir -p build/$build_variant
${PWD}/cpp/build.py alpine rs crc32c # build C libs we need for for go
${PWD}/go/build.py --generate # generate C++ files
# build C++
${PWD}/cpp/build.py $build_variant
# build go
${PWD}/go/build.py
# copy binaries
binaries=(
cpp/build/$build_variant/registry/ternregistry
cpp/build/$build_variant/shard/ternshard
cpp/build/$build_variant/dbtools/terndbtools
cpp/build/$build_variant/cdc/terncdc
cpp/build/$build_variant/ktools/ternktools
go/ternweb/ternweb
go/ternrun/ternrun
go/ternblocks/ternblocks
go/ternfuse/ternfuse
go/terncli/terncli
go/terngc/terngc
go/terntests/terntests
go/ternregistryproxy/ternregistryproxy
)
for binary in "${binaries[@]}"; do
cp $binary $out_dir
done