mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-13 03:32:22 +00:00
* integrate static openssl into linux binaries; do not use AVX and AVX2 CPU instructions in windows binaries. * integrate static openssl into linux binaries; do not use AVX and AVX2 CPU instructions in windows binaries.
64 lines
2.4 KiB
YAML
64 lines
2.4 KiB
YAML
name: Ubuntu 22.04 Compile
|
|
|
|
on: [push,workflow_dispatch,workflow_call]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Install libraries
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y build-essential git make cmake clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev ninja-build
|
|
|
|
- name: Show CPU flags
|
|
run: |
|
|
cat /proc/cpuinfo
|
|
|
|
- name: Configure & Build
|
|
run: |
|
|
export CC=$(which clang)
|
|
export CXX=$(which clang++)
|
|
export CCACHE_DISABLE=1
|
|
|
|
git clone https://github.com/openssl/openssl openssl_1_1_1
|
|
cd openssl_1_1_1
|
|
git checkout OpenSSL_1_1_1-stable
|
|
./config
|
|
make build_libs -j4
|
|
|
|
cd ..
|
|
rootPath=`pwd`
|
|
mkdir build
|
|
cd build
|
|
|
|
cmake -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$rootPath/openssl_1_1_1/include -DOPENSSL_CRYPTO_LIBRARY=$rootPath/openssl_1_1_1/libcrypto.a -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DCMAKE_CXX_FLAGS="-mavx2" ..
|
|
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli validator-engine lite-client pow-miner validator-engine-console generate-random-id json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state
|
|
|
|
- name: Find & copy binaries
|
|
run: |
|
|
mkdir artifacts
|
|
cp build/storage/storage-daemon/storage-daemon build/storage/storage-daemon/storage-daemon-cli build/crypto/fift build/crypto/tlbc build/crypto/func build/crypto/create-state build/validator-engine-console/validator-engine-console build/tonlib/tonlib-cli build/tonlib/libtonlibjson.so.0.5 build/http/http-proxy build/rldp-http-proxy/rldp-http-proxy build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine build/utils/generate-random-id build/utils/json2tlo build/adnl/adnl-proxy artifacts
|
|
chmod +x artifacts/*
|
|
cp -R crypto/smartcont artifacts/
|
|
cp -R crypto/fift/lib artifacts/
|
|
|
|
- name: Simple binaries test
|
|
run: |
|
|
artifacts/validator-engine -V
|
|
artifacts/lite-client -V
|
|
artifacts/fift -V
|
|
artifacts/func -V
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: ton-ubuntu-binaries
|
|
path: artifacts
|