diff --git a/.github/workflows/macos-10.15-compile.yml b/.github/workflows/macos-10.15-compile.yml index 3165d39d..be8e44e8 100644 --- a/.github/workflows/macos-10.15-compile.yml +++ b/.github/workflows/macos-10.15-compile.yml @@ -20,21 +20,41 @@ jobs: ./Configure --prefix=/usr/local/macos darwin64-x86_64-cc -static -mmacosx-version-min=10.15 make build_libs -j4 - - name: Build TON + - name: Build all run: | rootPath=`pwd` mkdir build cd build cmake -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$rootPath/openssl_1_1_1/include -DOPENSSL_CRYPTO_LIBRARY=$rootPath/openssl_1_1_1/libcrypto.a -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_BUILD_TYPE=Release .. make -j4 - + + - name: Build native-lib + run: | + rootPath=`pwd` + export JAVA_AWT_LIBRARY=NotNeeded + export JAVA_JVM_LIBRARY=NotNeeded + export JAVA_INCLUDE_PATH=${JAVA_HOME}/include + export JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include + export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/darwin + git fetch --all + git pull --all + git checkout wallets + cd example/android/ + mkdir build + cd build + cmake -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$rootPath/openssl_1_1_1/include -DOPENSSL_CRYPTO_LIBRARY=$rootPath/openssl_1_1_1/libcrypto.a -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_BUILD_TYPE=Release -DTON_ONLY_TONLIB=ON .. + cmake --build . --target prepare_cross_compiling + cmake --build . --target native-lib + - name: Find & copy binaries run: | - mkdir artifacts + mkdir -p artifacts/tonlib-java rsync -r --exclude 'CMakeFiles' --exclude 'Makefile' --exclude '*.a' --exclude '*.cmake' --exclude 'third-party' --exclude 'test-*' --exclude '*.cc' --exclude '*.json' --exclude '*.txt' build/* artifacts/ - + cp example/android/src/drinkless/org/ton/TonApi.java artifacts/tonlib-java/ + cp example/android/build/libnative-lib.dylib artifacts/tonlib-java/ + - name: Upload artifacts uses: actions/upload-artifact@master with: name: ton-macos-binaries - path: artifacts + path: artifacts \ No newline at end of file diff --git a/.github/workflows/ubuntu-18.04-compile.yml b/.github/workflows/ubuntu-18.04-compile.yml index 6a654665..46136fbf 100644 --- a/.github/workflows/ubuntu-18.04-compile.yml +++ b/.github/workflows/ubuntu-18.04-compile.yml @@ -26,20 +26,41 @@ jobs: - name: mkdir run: | mkdir build - - name: cmake + - name: cmake all run: | cd build - cmake .. - - name: make -j4 + cmake -DCMAKE_BUILD_TYPE=Release .. + - name: make all run: | cd build - make -j4 + make -j4 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 create-hardfork + + - name: build native-lib + run: | + export JAVA_AWT_LIBRARY=NotNeeded + export JAVA_JVM_LIBRARY=NotNeeded + export JAVA_INCLUDE_PATH=${JAVA_HOME}/include + export JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include + export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux + git fetch --all + git pull --all + git checkout wallets + cd example/android/ + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -DTON_ONLY_TONLIB=ON .. + cmake --build . --target prepare_cross_compiling + cmake --build . --target native-lib + - name: find & copy binaries run: | - mkdir artifacts - cp --parents build/crypto/fift build/crypto/adjust-block build/crypto/dump-block 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/tddb/io-bench build/http/http-proxy build/tdnet/udp_ping_pong build/tdnet/tcp_ping_pong 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/pack-viewer build/utils/json2tlo build/adnl/adnl-proxy build/adnl/adnl-pong artifacts + mkdir -p artifacts/tonlib-java + cp --parents 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 + cp example/android/src/drinkless/org/ton/TonApi.java artifacts/tonlib-java/ + cp example/android/build/libnative-lib.so artifacts/tonlib-java/ + - name: Upload artifacts uses: actions/upload-artifact@master with: name: ton-binaries - path: artifacts + path: artifacts \ No newline at end of file diff --git a/.github/workflows/windows2019x64-compile.yml b/.github/workflows/windows2019x64-compile.yml index 54bfa1d6..1f0c2a1c 100644 --- a/.github/workflows/windows2019x64-compile.yml +++ b/.github/workflows/windows2019x64-compile.yml @@ -5,7 +5,7 @@ on: [push,workflow_dispatch] defaults: run: shell: cmd - + jobs: build: @@ -20,58 +20,79 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' - + - name: Check out zlib repository uses: actions/checkout@v2 with: repository: desktop-app/zlib path: zlib - + - name: Setup msbuild.exe uses: microsoft/setup-msbuild@v1.0.2 - + - name: Compile zlib Win64 run: | cd zlib\contrib\vstudio\vc14 - msbuild zlibstat.vcxproj /p:Configuration=Debug /p:platform=x64 - msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 - + msbuild zlibstat.vcxproj /p:Configuration=Debug /p:platform=x64 -p:PlatformToolset=v142 + msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 -p:PlatformToolset=v142 + - name: Install OpenSSL Win64 run: | - curl -o openssl.msi https://slproweb.com/download/Win64OpenSSL-1_1_1L.msi + curl -o openssl.msi https://slproweb.com/download/Win64OpenSSL-1_1_1m.msi msiexec /i openssl.msi /quiet /qn /norestart - + - name: Build ton run: | set root=%cd% echo %root% mkdir build cd build - cmake -DZLIB_FOUND=1 -DZLIB_INCLUDE_DIR=%root%\zlib -DZLIB_LIBRARY=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" -DCMAKE_BUILD_TYPE=Release .. - + cmake -DZLIB_FOUND=1 -DZLIB_INCLUDE_DIR=%root%\zlib -DZLIB_LIBRARY=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" .. + - name: Compile ton run: | cd build - cmake --build . - continue-on-error: true - + cmake --build . --config Release + continue-on-error: true + + - name: Compile native-lib + run: | + set root=%cd% + set JAVA_AWT_LIBRARY=NotNeeded + set JAVA_JVM_LIBRARY=NotNeeded + set JAVA_INCLUDE_PATH=${JAVA_HOME}/include + set JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include + set JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/win32 + git fetch --all + git pull --all + git checkout wallets + cd example/android/ + mkdir build + cd build + cmake -DZLIB_FOUND=1 -DZLIB_INCLUDE_DIR=%root%\zlib -DZLIB_LIBRARY=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib -DTON_ONLY_TONLIB=ON .. + cmake --build . --target native-lib --config Release + - name: Show executables run: | - cd build + cd build + del Release\test-* dir *.exe /a-D /S /B - + dir *.dll /a-D /S /B + - name: Check if validator-engine.exe exists run: | set root=%cd% - copy %root%\build\validator-engine\Debug\validator-engine.exe test - + copy %root%\build\validator-engine\Release\validator-engine.exe test + - name: Find & copy binaries run: | mkdir artifacts for /f %%a in ('dir *.exe /b /a /s') do copy /Y %%a artifacts - + copy build\tonlib\Release\tonlibjson.dll artifacts + copy example\android\build\Release\native-lib.dll artifacts + - name: Upload artifacts uses: actions/upload-artifact@master with: name: ton-win64-binaries - path: artifacts + path: artifacts \ No newline at end of file