explorer: added dh arg to hdrs query #2721
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
env: | |
BUILD_TYPE: Release | |
BUILD_CONFIG: RelWithDebInfo | |
jobs: | |
############################################################################### | |
# Build Desktop | |
############################################################################### | |
build_desktop: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: [macos-11] | |
os: [macos-11, ubuntu-18.04, ubuntu-20.04, windows-2019] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Submodule update | |
shell: bash | |
run: | | |
git submodule update --init --recursive --jobs 4 | |
############################################################################### | |
# Create Build Environment | |
############################################################################### | |
- name: Create Build Environment [macos-11] | |
if: matrix.os == 'macos-11' | |
run: | | |
echo $GITHUB_WORKSPACE | |
echo "OPENSSL_ROOT_DIR=/usr/local/opt/[email protected]" >> $GITHUB_ENV | |
- name: Create Build Environment [ununtu all] | |
shell: bash | |
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libssl-dev curl libxi-dev libcups2-dev -y | |
- name: Create Build Environment [ubuntu-18.04] | |
shell: bash | |
if: matrix.os == 'ubuntu-18.04' | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
sudo apt-get update -y | |
sudo apt-get install g++-7 -y | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 | |
sudo update-alternatives --set gcc "/usr/bin/gcc-7" | |
- name: Create Build Environment [windows] | |
shell: bash | |
if: matrix.os == 'windows-2019' | |
run: | | |
git clone --depth=1 https://github.com/BeamMW/libs.git c:/beam-libs | |
echo "OPENSSL_ROOT_DIR=c:\beam-libs\openssl" >> $GITHUB_ENV | |
git clone https://github.com/BeamMW/boost_prebuild_${{matrix.os}}.git c:/boost_prebuild | |
echo "BOOST_ROOT=c:\boost_prebuild" >> $GITHUB_ENV | |
- name: Download boost [ubuntu && macos] | |
if: matrix.os != 'windows-2019' | |
shell: bash | |
run: | | |
rm -rf ${{runner.workspace}}/boost_prebuild | |
git clone --depth=1 https://github.com/BeamMW/boost_prebuild_${{matrix.os}}.git ${{runner.workspace}}/boost_prebuild | |
echo "BOOST_INCLUDEDIR=${{runner.workspace}}/boost_prebuild/include" >> $GITHUB_ENV | |
echo "BOOST_LIBRARYDIR=${{runner.workspace}}/boost_prebuild/lib/" >> $GITHUB_ENV | |
############################################################################### | |
# Configure CMake | |
############################################################################### | |
- name: Configure CMake [macos-11] | |
if: matrix.os == 'macos-11' | |
run: | | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBEAM_LINK_TYPE=Static -DBRANCH_NAME=${GITHUB_REF##*/} -DBEAM_HW_WALLET=Off . | |
- name: Configure CMake [ununtu all] | |
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
run: | | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBEAM_LINK_TYPE=Static -DBEAM_USE_STATIC_RUNTIME=ON -DBRANCH_NAME=${GITHUB_REF##*/} -DBEAM_HW_WALLET=Off . | |
- name: Configure CMake [windows] | |
shell: bash | |
if: matrix.os == 'windows-2019' | |
run: | | |
cmake --version | |
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING=$BUILD_CONFIG -DBEAM_LINK_TYPE=Static -DBEAM_USE_STATIC_RUNTIME=On -DBRANCH_NAME=${GITHUB_REF##*/} -DBEAM_BUILD_JNI=Off -DBEAM_HW_WALLET=Off . | |
- name: Save version info | |
shell: bash | |
run: | | |
echo "BEAM_VERSION=$(cat beam_version.gen)" >> $GITHUB_ENV | |
rm beam_version.gen | |
############################################################################### | |
# Build | |
############################################################################### | |
- name: Build [macos-11] | |
if: matrix.os == 'macos-11' | |
run: cmake --build . --parallel --config $BUILD_TYPE | |
- name: Build [ununtu all] | |
shell: bash | |
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
run: make -j$(nproc) | |
- name: Build [windows] | |
shell: bash | |
if: matrix.os == 'windows-2019' | |
run: cmake --build . --config $BUILD_CONFIG --parallel | |
############################################################################### | |
# Test | |
############################################################################### | |
- name: Test [macos-11] | |
if: matrix.os == 'macos-11' | |
continue-on-error: false | |
run: ctest -C $BUILD_TYPE --verbose | |
- name: Test [ununtu all] | |
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
continue-on-error: false | |
shell: bash | |
run: ctest --verbose | |
- name: Test [windows] | |
if: matrix.os == 'windows-2019' | |
continue-on-error: false | |
shell: bash | |
run: ctest -C $BUILD_CONFIG --verbose | |
############################################################################### | |
# Collect artifacts | |
############################################################################### | |
- name: Import Code-Signing Certificates [macos-11] | |
if: matrix.os == 'macos-11' | |
uses: Apple-Actions/import-codesign-certs@v2 | |
with: | |
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} | |
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} | |
- name: Sign the mac binaries [macos-11] | |
if: matrix.os == 'macos-11' | |
run: | | |
codesign --sign "Developer ID Application" --deep --force --verbose --options runtime --timestamp beam/beam-node | |
codesign --sign "${{secrets.MACOS_SIGN_IDENTITY}}" --deep --force --verbose --options runtime --timestamp beam/beam-node | |
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp beam/beam-node | |
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp wallet/cli/beam-wallet | |
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp wallet/api/wallet-api | |
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp explorer/explorer-node | |
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp wallet/broadcaster/broadcaster | |
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp bvm/ethash_service/ethash-service | |
- name: Checksum [ubuntu] | |
if: matrix.os == 'ubuntu-16.04' || matrix.os =='ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
run: | | |
sha256sum beam/beam-node > beam/beam-node-checksum.txt | |
sha256sum wallet/cli/beam-wallet > wallet/cli/beam-wallet-checksum.txt | |
sha256sum wallet/api/wallet-api > wallet/api/wallet-api-checksum.txt | |
sha256sum explorer/explorer-node > explorer/explorer-node-checksum.txt | |
sha256sum wallet/broadcaster/broadcaster > wallet/broadcaster/broadcaster-checksum.txt | |
sha256sum bvm/ethash_service/ethash-service > bvm/ethash_service/ethash-service-checksum.txt | |
- name: Checksum [macos-11] | |
if: matrix.os == 'macos-11' | |
run: | | |
shasum -a 256 beam/beam-node > beam/beam-node-checksum.txt | |
shasum -a 256 wallet/cli/beam-wallet > wallet/cli/beam-wallet-checksum.txt | |
shasum -a 256 wallet/api/wallet-api > wallet/api/wallet-api-checksum.txt | |
shasum -a 256 explorer/explorer-node > explorer/explorer-node-checksum.txt | |
shasum -a 256 wallet/broadcaster/broadcaster > wallet/broadcaster/broadcaster-checksum.txt | |
shasum -a 256 bvm/ethash_service/ethash-service > bvm/ethash_service/ethash-service-checksum.txt | |
- name: Collect [macos-11 && ununtu all] | |
shell: bash | |
if: matrix.os != 'windows-2019' | |
run: | | |
mkdir artifacts | |
tar -cvf artifacts/beam-node.tar -C beam beam-node beam-node-checksum.txt beam-node.cfg | |
tar -cvf artifacts/beam-wallet.tar -C wallet/cli beam-wallet beam-wallet-checksum.txt beam-wallet.cfg | |
tar -cvf artifacts/wallet-api.tar -C wallet/api wallet-api wallet-api-checksum.txt wallet-api.cfg | |
tar -cvf artifacts/explorer-node.tar -C explorer explorer-node explorer-node-checksum.txt explorer-node.cfg | |
tar -cvf artifacts/broadcaster.tar -C wallet/broadcaster broadcaster broadcaster-checksum.txt | |
tar -cvf artifacts/ethash-service.tar -C bvm/ethash_service ethash-service ethash-service-checksum.txt | |
- name: Collect [windows] | |
shell: bash | |
if: matrix.os == 'windows-2019' | |
run: | | |
mkdir artifacts | |
cp beam/${{env.BUILD_CONFIG}}/beam-node.exe artifacts/beam-node.exe | |
cp beam/beam-node.cfg artifacts/beam-node.cfg | |
cp wallet/cli/${{env.BUILD_CONFIG}}/beam-wallet.exe artifacts/beam-wallet.exe | |
cp wallet/cli/beam-wallet.cfg artifacts/beam-wallet.cfg | |
cp wallet/api/${{env.BUILD_CONFIG}}/wallet-api.exe artifacts/wallet-api.exe | |
cp wallet/api/wallet-api.cfg artifacts/wallet-api.cfg | |
cp explorer/${{env.BUILD_CONFIG}}/explorer-node.exe artifacts/explorer-node.exe | |
cp explorer/explorer-node.cfg artifacts/explorer-node.cfg | |
cp wallet/broadcaster/${{env.BUILD_CONFIG}}/broadcaster.exe artifacts/broadcaster.exe | |
cp bvm/ethash_service/${{env.BUILD_CONFIG}}/ethash-service.exe artifacts/ethash-service.exe | |
cp 3rdparty/asio-ipfs/ipfs_bindings/ipfs-bindings.dll artifacts/ipfs-bindings.dll | |
- name: Collect pdb [windows] | |
shell: bash | |
if: matrix.os == 'windows-2019' | |
run: | | |
mkdir pdb | |
cp beam/${{env.BUILD_CONFIG}}/beam-node.pdb pdb/beam-node.pdb | |
cp wallet/cli/${{env.BUILD_CONFIG}}/beam-wallet.pdb pdb/beam-wallet.pdb | |
cp wallet/api/${{env.BUILD_CONFIG}}/wallet-api.pdb pdb/wallet-api.pdb | |
cp explorer/${{env.BUILD_CONFIG}}/explorer-node.pdb pdb/explorer-node.pdb | |
cp wallet/broadcaster/${{env.BUILD_CONFIG}}/broadcaster.pdb pdb/broadcaster.pdb | |
cp bvm/ethash_service/${{env.BUILD_CONFIG}}/ethash-service.pdb pdb/ethash-service.pdb | |
- name: Checksum [windows] | |
if: matrix.os == 'windows-2019' | |
run: | | |
certUtil -hashfile artifacts/beam-node.exe SHA256 > artifacts/beam-node-checksum.txt | |
certUtil -hashfile artifacts/beam-wallet.exe SHA256 > artifacts/beam-wallet-checksum.txt | |
certUtil -hashfile artifacts/wallet-api.exe SHA256 > artifacts/wallet-api-checksum.txt | |
certUtil -hashfile artifacts/explorer-node.exe SHA256 > artifacts/explorer-node-checksum.txt | |
certUtil -hashfile artifacts/broadcaster.exe SHA256 > artifacts/broadcaster-checksum.txt | |
certUtil -hashfile artifacts/ethash-service.exe SHA256 > artifacts/ethash-service-checksum.txt | |
certUtil -hashfile artifacts/ipfs-bindings.dll SHA256 > artifacts/ipfs-bindings-checksum.txt | |
- name: OS name [macos-11] | |
if: matrix.os == 'macos-11' | |
run: echo "PLATFORM_NAME=mac" >> $GITHUB_ENV | |
- name: OS name [ununtu all] | |
shell: bash | |
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
run: echo "PLATFORM_NAME=linux" >> $GITHUB_ENV | |
- name: OS name [ununtu-18.04] | |
shell: bash | |
if: matrix.os == 'ubuntu-18.04' | |
run: echo "PLATFORM_NAME=ubuntu-18" >> $GITHUB_ENV | |
- name: OS name [windows] | |
shell: bash | |
if: matrix.os == 'windows-2019' | |
run: echo "PLATFORM_NAME=win" >> $GITHUB_ENV | |
############################################################################### | |
# Upload | |
############################################################################### | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{env.PLATFORM_NAME}}-beam-node-${{env.BEAM_VERSION}} | |
path: artifacts/beam-node* | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{env.PLATFORM_NAME}}-beam-wallet-cli-${{env.BEAM_VERSION}} | |
path: artifacts/beam-wallet* | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{env.PLATFORM_NAME}}-wallet-api-${{env.BEAM_VERSION}} | |
path: | | |
artifacts/wallet-api* | |
artifacts/ipfs-bindings* | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{env.PLATFORM_NAME}}-explorer-node-${{env.BEAM_VERSION}} | |
path: artifacts/explorer-node* | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{env.PLATFORM_NAME}}-broadcaster-${{env.BEAM_VERSION}} | |
path: artifacts/broadcaster* | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{env.PLATFORM_NAME}}-ethash-service-${{env.BEAM_VERSION}} | |
path: artifacts/ethash-service* | |
if-no-files-found: error | |
############################################################################### | |
# Upload windows pdb | |
############################################################################### | |
- uses: actions/upload-artifact@v2 | |
if: matrix.os == 'windows-2019' | |
with: | |
name: pdb-${{env.BEAM_VERSION}} | |
path: pdb | |
if-no-files-found: error | |
############################################################################### | |
# Build IOS | |
############################################################################### | |
build_ios: | |
runs-on: macos-11 | |
#if: ${{false}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Submodule update | |
shell: bash | |
run: | | |
git submodule update --init --recursive --jobs 4 | |
############################################################################### | |
# Create Build Environment | |
############################################################################### | |
- name: Create Build Environment | |
run: | | |
git clone --depth=1 https://github.com/BeamMW/boost-ios.git ${{runner.workspace}}/dependencies/boost-ios | |
git clone --depth=1 https://github.com/BeamMW/boost-ios-simulator.git ${{runner.workspace}}/dependencies/boost-ios-simulator | |
git clone --depth=1 https://github.com/BeamMW/openssl-ios.git ${{runner.workspace}}/dependencies/openssl-ios | |
git clone --depth=1 https://github.com/leetal/ios-cmake.git ${{runner.workspace}}/dependencies/toolchain-ios | |
# echo "BUILD_TYPE=Release" >> $GITHUB_ENV | |
echo "OPENSSL_ROOT_DIR=${{runner.workspace}}/dependencies/openssl-ios/" >> $GITHUB_ENV | |
echo "OPENSSL_CRYPTO_LIBRARY=${{runner.workspace}}/dependencies/openssl-ios/lib/libcrypto.a" >> $GITHUB_ENV | |
echo "OPENSSL_INCLUDE_DIR=${{runner.workspace}}/dependencies/openssl-ios/include" >> $GITHUB_ENV | |
echo "OPENSSL_SSL_LIBRARY=${{runner.workspace}}/dependencies/openssl-ios/lib/libssl.a" >> $GITHUB_ENV | |
echo "OPENSSL_LIBRARIES=${{runner.workspace}}/dependencies/openssl-ios/lib" >> $GITHUB_ENV | |
############################################################################### | |
# Configure CMake && Build | |
############################################################################### | |
- name: Configure CMake && Build | |
run: | | |
export BOOST_ROOT_IOS="${{runner.workspace}}/dependencies/boost-ios" | |
cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/dependencies/toolchain-ios/ios.toolchain.cmake -DPLATFORM=OS64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -DBEAM_IPFS_SUPPORT=Off -B./build | |
make -C ./build -j$(sysctl -n hw.ncpu) | |
export BOOST_ROOT_IOS="${{runner.workspace}}/dependencies/boost-ios-simulator" | |
cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/dependencies/toolchain-ios/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -DBEAM_IPFS_SUPPORT=Off -B./build-simulator | |
make -C ./build-simulator -j$(sysctl -n hw.ncpu) | |
- name: Save version info | |
run: | | |
echo "BEAM_VERSION=$(cat beam_version.gen)" >> $GITHUB_ENV | |
rm beam_version.gen | |
############################################################################### | |
# Collect artifacts | |
############################################################################### | |
- name: Collect | |
run: | | |
echo BEAM_VERSION = $BEAM_VERSION | |
mkdir -p ${{runner.workspace}}/results/beam-ios/include | |
mkdir -p ${{runner.workspace}}/results/beam-ios/lib | |
find ./build -name \*.a -type f -exec cp {} ${{runner.workspace}}/results/beam-ios/lib/ \; | |
rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios/include/ | |
cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios/include/core/ | |
mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/include | |
mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/lib | |
find ./build-simulator -name \*.a -type f -exec cp {} ${{runner.workspace}}/results/beam-ios-simulator/lib/ \; | |
rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios-simulator/include/ | |
cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios-simulator/include/core/ | |
mkdir -p ${{runner.workspace}}/results/beam-ios-combined/include | |
mkdir -p ${{runner.workspace}}/results/beam-ios-combined/lib | |
find ${{runner.workspace}}/results/beam-ios/lib -type f -print0 | while IFS= read -r -d $'\0' file; do lipo -create -output ${{runner.workspace}}/results/beam-ios-combined/lib/$(basename "$file") "$file" ${{runner.workspace}}/results/beam-ios-simulator/lib/$(basename "$file"); done; | |
rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios-combined/include/ | |
############################################################################### | |
# Upload | |
############################################################################### | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: beam-ios-${{env.BEAM_VERSION}} | |
path: ${{runner.workspace}}/results/beam-ios | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: beam-ios-simulator-${{env.BEAM_VERSION}} | |
path: ${{runner.workspace}}/results/beam-ios-simulator | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: beam-ios-combined-${{env.BEAM_VERSION}} | |
path: ${{runner.workspace}}/results/beam-ios-combined | |
if-no-files-found: error | |
############################################################################### | |
# Build ANDROID | |
############################################################################### | |
build_android: | |
runs-on: ubuntu-20.04 | |
#if: ${{false}} | |
strategy: | |
matrix: | |
abi: [x86, x86_64, armeabi-v7a, arm64-v8a] | |
env: | |
ANDROID_ABI: ${{matrix.abi}} | |
ANDROID_SDK_VERSION: 25 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Submodule update | |
shell: bash | |
run: | | |
git submodule update --init --recursive --jobs 4 | |
############################################################################### | |
# Create Build Environment | |
############################################################################### | |
- name: Create Build Environment | |
run: | | |
git clone --depth=1 https://github.com/BeamMW/boost-android.git ${{runner.workspace}}/dependencies/boost_1_68-android | |
git clone --depth=1 https://github.com/BeamMW/openssl-android.git ${{runner.workspace}}/dependencies/Prebuilt-OpenSSL-Android | |
echo "ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME" >> $GITHUB_ENV | |
ls /usr/local/lib/android/sdk | |
echo "BOOST_ROOT_ANDROID=${{runner.workspace}}/dependencies/boost_1_68-android" >> $GITHUB_ENV | |
echo "OPENSSL_ROOT_DIR_ANDROID=${{runner.workspace}}/dependencies/Prebuilt-OpenSSL-Android" >> $GITHUB_ENV | |
############################################################################### | |
# Configure CMake | |
############################################################################### | |
- name: Configure CMake | |
run: | | |
export PATH=${{env.ANDROID_NDK_HOME}}:$PATH | |
cmake -DCMAKE_TOOLCHAIN_FILE=${{env.ANDROID_NDK_HOME}}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${{env.ANDROID_SDK_VERSION}} -DANDROID_ABI=${{env.ANDROID_ABI}} -DBEAM_IPFS_SUPPORT=Off -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} . | |
############################################################################### | |
# Build | |
############################################################################### | |
- name: Build | |
run: | | |
export PATH=${{env.ANDROID_NDK_HOME}}:$PATH | |
make wallet-jni -j$(nproc) | |
- name: Save version info | |
run: | | |
echo "BEAM_VERSION=$(cat beam_version.gen)" >> $GITHUB_ENV | |
rm beam_version.gen | |
############################################################################### | |
# Upload | |
############################################################################### | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: libwallet-jni-${{env.ANDROID_ABI}}-${{env.BEAM_VERSION}} | |
path: | | |
android/libwallet-jni.so | |
android/com | |
if-no-files-found: error | |
############################################################################### | |
# Build Key Keeper Web Assembly | |
############################################################################### | |
build_key_keeper: | |
if: ${{false}} # disabled | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Submodule update | |
shell: bash | |
run: | | |
git submodule update --init --recursive --jobs 4 | |
############################################################################### | |
# Create Build Environment | |
############################################################################### | |
- name: Download and install emscripten | |
shell: bash | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
git pull | |
./emsdk install 3.1.10 | |
./emsdk activate 3.1.10 | |
- name: Download boost | |
shell: bash | |
run: | | |
git clone --depth=1 https://github.com/BeamMW/boost-linux.git ${{runner.workspace}}/boost_prebuild | |
echo "BOOST_ROOT=${{runner.workspace}}/boost_prebuild" >> $GITHUB_ENV | |
############################################################################### | |
# Configure CMake | |
############################################################################### | |
- name: Configure CMake | |
run: | | |
source ./emsdk/emsdk_env.sh | |
emcmake cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE keykeeper | |
############################################################################### | |
# Build | |
############################################################################### | |
- name: Build | |
run: | | |
make -j$(nproc) | |
############################################################################### | |
# Upload | |
############################################################################### | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: wasm-key-keeper | |
path: | | |
wasm-key-keeper.* | |
if-no-files-found: error | |
############################################################################### | |
# Build Web Assembly | |
############################################################################### | |
build_wasm: | |
runs-on: ubuntu-20.04 | |
#if: ${{false}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Submodule update | |
shell: bash | |
run: | | |
git submodule update --init --recursive --jobs 4 | |
############################################################################### | |
# Create Build Environment | |
############################################################################### | |
- name: Download and install emscripten | |
shell: bash | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git ${{runner.workspace}}/emsdk | |
cd ${{runner.workspace}}/emsdk | |
git pull | |
./emsdk install 3.1.10 | |
./emsdk activate 3.1.10 | |
- name: Download boost | |
shell: bash | |
run: | | |
git clone --depth=1 https://github.com/BeamMW/boost_prebuild_ubuntu-20.04.git ${{runner.workspace}}/boost_prebuild | |
echo "BOOST_INCLUDEDIR=${{runner.workspace}}/boost_prebuild/include" >> $GITHUB_ENV | |
echo "BOOST_LIBRARYDIR=${{runner.workspace}}/boost_prebuild/lib/" >> $GITHUB_ENV | |
- name: Download openssl | |
shell: bash | |
run: | | |
git clone --depth=1 https://github.com/BeamMW/openssl-wasm.git ${{runner.workspace}}/openssl-wasm | |
############################################################################### | |
# Configure CMake && Build | |
############################################################################### | |
- name: Configure CMake && Build | |
run: | | |
source ${{runner.workspace}}/emsdk/emsdk_env.sh | |
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DBoost_DEBUG=On -DBEAM_TESTS_ENABLED=Off -DBEAM_WALLET_CLIENT_LIBRARY=On -DBEAM_ATOMIC_SWAP_SUPPORT=Off -DBEAM_IPFS_SUPPORT=Off -DBEAM_LASER_SUPPORT=Off -DBEAM_ASSET_SWAP_SUPPORT=Off -DBEAM_USE_STATIC=On -DBOOST_ROOT=${{runner.workspace}}/boost_prebuild -DCMAKE_FIND_ROOT_PATH:FILEPATH="${{runner.workspace}}/boost_prebuild;${{runner.workspace}}/openssl-wasm" -DOPENSSL_ROOT_DIR=${{runner.workspace}}/openssl-wasm -B${{runner.workspace}}/build_wasm | |
emmake make -j$(nproc) -C ${{runner.workspace}}/build_wasm | |
- name: Save version info | |
run: | | |
echo "BEAM_VERSION=$(cat beam_version.gen)" >> $GITHUB_ENV | |
rm beam_version.gen | |
############################################################################### | |
# Upload | |
############################################################################### | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: beam-wasm-${{env.BEAM_VERSION}} | |
path: | | |
${{runner.workspace}}/build_wasm/wasmclient/wasm-client.* | |
if-no-files-found: error | |
- uses: actions/setup-node@v2 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
- run: npm publish ${{runner.workspace}}/build_wasm/wasmclient/ | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |