-
Notifications
You must be signed in to change notification settings - Fork 61
/
local-build-targz.sh
executable file
·49 lines (39 loc) · 1.79 KB
/
local-build-targz.sh
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
45
46
47
48
49
#!/bin/bash
# Example usage `./local-build-targz.sh ubuntu v0.11.0-rc14` from yagna directory
# Result build will be named the same as CI build with tag `pre-rel-local-v0.10-rc3`
# You need sudo to install musl and rust musl target.
if ! command -v musl-gcc --h &> /dev/null
then
echo "musl-gcc could not be found. Install it with:"
echo "sudo apt-get install musl musl-tools"
exit
fi
rustup target add x86_64-unknown-linux-musl
export OPENSSL_STATIC=1
# Required by pack-build.sh script
export OS_NAME=$1
export GITHUB_REF=pre-rel-local-$2
cargo build --release --features static-openssl --target x86_64-unknown-linux-musl
(cd core/gftp && cargo build --bin gftp -p gftp --features bin --release --target x86_64-unknown-linux-musl)
(cd golem_cli && cargo build --bin golemsp -p golemsp --release --target x86_64-unknown-linux-musl)
(cd agent/provider && cargo build --bin ya-provider -p ya-provider --release --target x86_64-unknown-linux-musl)
(cd exe-unit && cargo build --bin exe-unit -p ya-exe-unit --release --features openssl/vendored --target x86_64-unknown-linux-musl)
bash .ci/pack-build.sh
CURRENT_DIR=`pwd`
SUBNET="public"
YAGNA_VERSION=${GITHUB_REF}
RELEASE_DIR="${CURRENT_DIR}/releases"
PROVIDER_BINARY_PATH="${RELEASE_DIR}/golem-provider-linux-${YAGNA_VERSION}.tar.gz"
REQUESTOR_BINARY_PATH="${RELEASE_DIR}/golem-requestor-linux-${YAGNA_VERSION}.tar.gz"
echo ""
echo "Binaries generated in: ${RELEASE_DIR}"
echo ""
echo "To update devnet ${SUBNET} run following command from yagna-testnet-scripts/ansible:"
echo "ansible-playbook -i envs/production/${SUBNET} \
--extra-vars=\"{\
ya_provider_yagna_url: ${PROVIDER_BINARY_PATH}, \
ya_provider_yagna_version: ${YAGNA_VERSION}, \
checker_yagna_url: ${REQUESTOR_BINARY_PATH}, \
checker_yagna_version: ${YAGNA_VERSION}\
}\" \
play_ya_provider.yml"