diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 00000000..089af583 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,167 @@ +name: Create release + +on: [workflow_dispatch] + +permissions: write-all + +jobs: + create-release: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - name: Show all artifacts + run: | + mkdir artifacts + ls -lart artifacts + + - name: Download Ubuntu x86-64 artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: ubuntu-compile.yml + path: artifacts + workflow_conclusion: success + skip_unpack: true + + - name: Download Ubuntu arm64 artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: docker-compile-ubuntu.yml + path: artifacts + workflow_conclusion: success + skip_unpack: true + + - name: Download MacOS 11.7 artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: macos-11.7-compile.yml + path: artifacts + workflow_conclusion: success + skip_unpack: true + + - name: Download MacOS 12.6 artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: macos-12.6-compile.yml + path: artifacts + workflow_conclusion: success + skip_unpack: true + + - name: Download Windows artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: win-2019-compile.yml + path: artifacts + workflow_conclusion: success + skip_unpack: true + + - name: Show all artifacts + run: | + tree artifacts + +# create release + + - name: Read Changelog.md and use it as a body of new release + id: read_release + shell: bash + run: | + r=$(cat Changelog.md) + r="${r//'%'/'%25'}" + r="${r//$'\n'/'%0A'}" + r="${r//$'\r'/'%0D'}" + echo "::set-output name=CHANGELOG_BODY::$r" + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y.%m')" + + - name: Get registration token + id: getRegToken + run: | + curl -X POST -H \"Accept: application/vnd.github+json\" -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/neodix42/HardTestDevelopment/actions/runners/registration-token + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ steps.date.outputs.date }} + release_name: v${{ steps.date.outputs.date }} + body: | + ${{ steps.read_release.outputs.CHANGELOG_BODY }} + draft: false + prerelease: false + + - name: Upload Windows 2019 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-win-binaries.zip + asset_name: ton-windows-2019-x86-64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload MacOS 11.7 x86-64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-macos-11.7.zip + asset_name: ton-macos-11.7-x86-64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload MacOS 12.6 x86-64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-macos-12.6.zip + asset_name: ton-macos-12.6-x86-64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload Ubuntu 18.04 x86-64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-binaries-ubuntu-18.04.zip + asset_name: ton-ubuntu-18.04-x86-64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload Ubuntu 20.04 x86-64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-binaries-ubuntu-20.04.zip + asset_name: ton-ubuntu-20.04-x86-64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload Ubuntu 22.04 x86-64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-binaries-ubuntu-22.04.zip + asset_name: ton-ubuntu-22.04-x86-64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload Ubuntu 18.04 arm64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-ubuntu-18.04-arm64.zip + asset_name: ton-ubuntu-18.04-arm64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload Ubuntu 20.04 arm64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-ubuntu-20.04-arm64.zip + asset_name: ton-ubuntu-20.04-arm64.zip + tag: v${{ steps.date.outputs.date }} + + - name: Upload Ubuntu 22.04 arm64 artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-ubuntu-22.04-arm64.zip + asset_name: ton-ubuntu-22.04-arm64.zip + tag: v${{ steps.date.outputs.date }} \ 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 57b97ee5..6709bf83 100644 --- a/.github/workflows/ubuntu-18.04-compile.yml +++ b/.github/workflows/ubuntu-18.04-compile.yml @@ -32,9 +32,11 @@ jobs: run: | mkdir artifacts cp 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 -R crypto/smartcont artifacts/ + cp -R crypto/fift/lib artifacts/ - name: Upload artifacts uses: actions/upload-artifact@master with: - name: ton-binaries + name: ton-ubuntu-binaries path: artifacts diff --git a/.github/workflows/ubuntu-18.04-ton-ccpcheck.yml b/.github/workflows/ubuntu-18.04-ton-ccpcheck.yml index b6d532ae..f440d7a5 100644 --- a/.github/workflows/ubuntu-18.04-ton-ccpcheck.yml +++ b/.github/workflows/ubuntu-18.04-ton-ccpcheck.yml @@ -1,8 +1,6 @@ name: TON ccpcheck -on: - workflow_dispatch: - push: +on: [push,workflow_dispatch,workflow_call] jobs: build: @@ -11,7 +9,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'recursive' diff --git a/.github/workflows/ubuntu-compile.yml b/.github/workflows/ubuntu-compile.yml index 22a8699e..653d7c0a 100644 --- a/.github/workflows/ubuntu-compile.yml +++ b/.github/workflows/ubuntu-compile.yml @@ -1,6 +1,6 @@ -name: Ubuntu Compile х86-64 +name: Ubuntu Compile x86-64 -on: [push,workflow_dispatch] +on: [push,workflow_dispatch,workflow_call] jobs: build: @@ -12,7 +12,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'recursive' @@ -33,6 +33,8 @@ jobs: run: | mkdir artifacts-${{ matrix.os }} cp build-${{ matrix.os }}/crypto/fift build-${{ matrix.os }}/crypto/tlbc build-${{ matrix.os }}/crypto/func build-${{ matrix.os }}/crypto/create-state build-${{ matrix.os }}/validator-engine-console/validator-engine-console build-${{ matrix.os }}/tonlib/tonlib-cli build-${{ matrix.os }}/tonlib/libtonlibjson.so.0.5 build-${{ matrix.os }}/http/http-proxy build-${{ matrix.os }}/rldp-http-proxy/rldp-http-proxy build-${{ matrix.os }}/dht-server/dht-server build-${{ matrix.os }}/lite-client/lite-client build-${{ matrix.os }}/validator-engine/validator-engine build-${{ matrix.os }}/utils/generate-random-id build-${{ matrix.os }}/utils/json2tlo build-${{ matrix.os }}/adnl/adnl-proxy artifacts-${{ matrix.os }} + cp -R crypto/smartcont artifacts-${{ matrix.os }} + cp -R crypto/fift/lib artifacts-${{ matrix.os }} - name: Upload artifacts uses: actions/upload-artifact@master with: diff --git a/.github/workflows/windows2019x64-compile.yml b/.github/workflows/win-2019-compile.yml similarity index 70% rename from .github/workflows/windows2019x64-compile.yml rename to .github/workflows/win-2019-compile.yml index 4f763d4d..e9abd525 100644 --- a/.github/workflows/windows2019x64-compile.yml +++ b/.github/workflows/win-2019-compile.yml @@ -22,7 +22,7 @@ jobs: submodules: 'recursive' - name: Check out zlib repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: desktop-app/zlib path: zlib @@ -40,17 +40,13 @@ jobs: curl -Lo openssl-1.1.1o.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-1.1.1o.zip jar xf openssl-1.1.1o.zip - - name: Configure + - name: Compile 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 -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=%root%/openssl-1.1/x64/include -DOPENSSL_CRYPTO_LIBRARY=%root%/openssl-1.1/x64/lib/libcrypto.lib -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" .. - - - name: Build - run: | - cd build cmake --build . --target 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 --config Release - name: Show executables @@ -68,11 +64,15 @@ jobs: - 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 + mkdir artifacts\smartcont + mkdir artifacts\lib + + for %%I in (build\crypto\Release\fift.exe build\crypto\Release\tlbc.exe build\crypto\Release\func.exe build\crypto\Release\create-state.exe build\validator-engine-console\Release\validator-engine-console.exe build\tonlib\Release\tonlib-cli.exe build\tonlib\Release\tonlibjson.dll build\http\Release\http-proxy.exe build\rldp-http-proxy\Release\rldp-http-proxy.exe build\dht-server\Release\dht-server.exe build\lite-client\Release\lite-client.exe build\validator-engine\Release\validator-engine.exe build\utils\Release\generate-random-id.exe build\utils\Release\json2tlo.exe build\adnl\Release\adnl-proxy.exe) do copy %%I artifacts\ + xcopy /e /k /h /i crypto\smartcont artifacts\smartcont + xcopy /e /k /h /i crypto\fift\lib artifacts\lib - name: Upload artifacts uses: actions/upload-artifact@master with: - name: ton-win64-binaries + name: ton-win-binaries path: artifacts