From eea95aeebb49de6f2b204bab96b3f497ae4f2c43 Mon Sep 17 00:00:00 2001 From: neodix42 Date: Fri, 13 Sep 2024 21:48:38 +0400 Subject: [PATCH] Add tonlib libraries for Android to release (#1169) * add android tonlib artifacts to release * change final artifacts access rights --- .../workflows/build-ton-linux-android-tonlib.yml | 2 +- .github/workflows/create-release.yml | 16 ++++++++++++++++ assembly/native/build-macos-portable.sh | 4 +--- assembly/native/build-macos-shared.sh | 6 +++--- assembly/native/build-ubuntu-portable.sh | 4 +--- assembly/native/build-ubuntu-shared.sh | 2 +- assembly/nix/build-linux-arm64-nix.sh | 1 + assembly/nix/build-linux-x86-64-nix.sh | 1 + assembly/nix/build-macos-nix.sh | 1 + 9 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-ton-linux-android-tonlib.yml b/.github/workflows/build-ton-linux-android-tonlib.yml index bbd956610..a1a6bc99d 100644 --- a/.github/workflows/build-ton-linux-android-tonlib.yml +++ b/.github/workflows/build-ton-linux-android-tonlib.yml @@ -28,5 +28,5 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@master with: - name: tonlib-android + name: ton-android-tonlib path: artifacts diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 367dd6638..263bd9a43 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -83,6 +83,14 @@ jobs: workflow_conclusion: success skip_unpack: true + - name: Download Android Tonlib artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build-ton-linux-android-tonlib.yml + path: artifacts + workflow_conclusion: success + skip_unpack: true + - name: Show all artifacts run: | tree artifacts @@ -501,3 +509,11 @@ jobs: file: artifacts/ton-wasm-binaries.zip asset_name: ton-wasm-binaries.zip tag: ${{ steps.tag.outputs.TAG }} + + - name: Upload Android Tonlib artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-android-tonlib.zip + asset_name: ton-android-tonlib.zip + tag: ${{ steps.tag.outputs.TAG }} diff --git a/assembly/native/build-macos-portable.sh b/assembly/native/build-macos-portable.sh index b296d3393..d17525f55 100644 --- a/assembly/native/build-macos-portable.sh +++ b/assembly/native/build-macos-portable.sh @@ -192,8 +192,6 @@ if [ "$with_artifacts" = true ]; then echo Creating artifacts... rm -rf artifacts mkdir artifacts - cp crypto/fift/lib artifacts/ - cp -R crypto/smartcont/ artifacts/ cp build/storage/storage-daemon/storage-daemon artifacts/ cp build/storage/storage-daemon/storage-daemon-cli artifacts/ cp build/blockchain-explorer/blockchain-explorer artifacts/ @@ -213,9 +211,9 @@ if [ "$with_artifacts" = true ]; then cp build/utils/json2tlo artifacts/ cp build/adnl/adnl-proxy artifacts/ cp build/emulator/libemulator.dylib artifacts/ - chmod +x artifacts/* rsync -r crypto/smartcont artifacts/ rsync -r crypto/fift/lib artifacts/ + chmod -R +x artifacts/* fi if [ "$with_tests" = true ]; then diff --git a/assembly/native/build-macos-shared.sh b/assembly/native/build-macos-shared.sh index 7574f481a..20cb70cff 100644 --- a/assembly/native/build-macos-shared.sh +++ b/assembly/native/build-macos-shared.sh @@ -140,9 +140,9 @@ if [ "$with_artifacts" = true ]; then cp build/utils/json2tlo artifacts/ cp build/adnl/adnl-proxy artifacts/ cp build/emulator/libemulator.dylib artifacts/ - chmod +x artifacts/* - rsync -r crypto/smartcont artifacts/ - rsync -r crypto/fift/lib artifacts/ + cp -R crypto/smartcont artifacts/ + cp -R crypto/fift/lib artifacts/ + chmod -R +x artifacts/* fi if [ "$with_tests" = true ]; then diff --git a/assembly/native/build-ubuntu-portable.sh b/assembly/native/build-ubuntu-portable.sh index b5a167626..aa2947cb7 100644 --- a/assembly/native/build-ubuntu-portable.sh +++ b/assembly/native/build-ubuntu-portable.sh @@ -193,8 +193,6 @@ cd .. if [ "$with_artifacts" = true ]; then rm -rf artifacts mkdir artifacts - cp crypto/fift/lib artifacts/ - cp -R crypto/smartcont/ artifacts/ mv build/tonlib/libtonlibjson.so.0.5 build/tonlib/libtonlibjson.so 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/blockchain-explorer/blockchain-explorer \ @@ -204,9 +202,9 @@ if [ "$with_artifacts" = true ]; then build/utils/generate-random-id build/utils/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.so \ artifacts test $? -eq 0 || { echo "Can't copy final binaries"; exit 1; } - chmod +x artifacts/* cp -R crypto/smartcont artifacts cp -R crypto/fift/lib artifacts + chmod -R +x artifacts/* fi if [ "$with_tests" = true ]; then diff --git a/assembly/native/build-ubuntu-shared.sh b/assembly/native/build-ubuntu-shared.sh index 4ce86d81f..a62698d26 100644 --- a/assembly/native/build-ubuntu-shared.sh +++ b/assembly/native/build-ubuntu-shared.sh @@ -112,9 +112,9 @@ if [ "$with_artifacts" = true ]; then build/utils/generate-random-id build/utils/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.so \ artifacts test $? -eq 0 || { echo "Can't copy final binaries"; exit 1; } - chmod +x artifacts/* cp -R crypto/smartcont artifacts cp -R crypto/fift/lib artifacts + chmod -R +x artifacts/* fi if [ "$with_tests" = true ]; then diff --git a/assembly/nix/build-linux-arm64-nix.sh b/assembly/nix/build-linux-arm64-nix.sh index 7e85a8712..6fc2fab20 100644 --- a/assembly/nix/build-linux-arm64-nix.sh +++ b/assembly/nix/build-linux-arm64-nix.sh @@ -35,3 +35,4 @@ cp ./result/lib/libtonlibjson.so.0.5 artifacts/libtonlibjson.so cp ./result/lib/libemulator.so artifacts/ cp ./result/lib/fift/* artifacts/lib/ cp -r ./result/share/ton/smartcont artifacts/ +chmod -R +x artifacts diff --git a/assembly/nix/build-linux-x86-64-nix.sh b/assembly/nix/build-linux-x86-64-nix.sh index c1f1dcf37..30ab79f72 100644 --- a/assembly/nix/build-linux-x86-64-nix.sh +++ b/assembly/nix/build-linux-x86-64-nix.sh @@ -35,3 +35,4 @@ cp ./result/lib/libtonlibjson.so.0.5 artifacts/libtonlibjson.so cp ./result/lib/libemulator.so artifacts/ cp ./result/lib/fift/* artifacts/lib/ cp -r ./result/share/ton/smartcont artifacts/ +chmod -R +x artifacts diff --git a/assembly/nix/build-macos-nix.sh b/assembly/nix/build-macos-nix.sh index c75ca0428..8a07bea20 100644 --- a/assembly/nix/build-macos-nix.sh +++ b/assembly/nix/build-macos-nix.sh @@ -35,3 +35,4 @@ cp ./result/lib/libtonlibjson.dylib artifacts/ cp ./result/lib/libemulator.dylib artifacts/ cp ./result/lib/fift/* artifacts/lib/ cp -r ./result/share/ton/smartcont artifacts/ +chmod -R +x artifacts