Skip to content

Commit

Permalink
Merge branch 'NextAlone:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nubesurrealista authored May 27, 2024
2 parents 82daf2f + 356ada2 commit 731c059
Show file tree
Hide file tree
Showing 11,569 changed files with 69,514 additions and 13,851 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
169 changes: 11 additions & 158 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- native
strategy:
matrix:
flavor:
# - FullRelease
- MiniRelease
- MiniReleaseNoGcm
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -225,182 +219,41 @@ jobs:
- name: Debug Build
run: |
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
export DEBUG_BUILD=true
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
./gradlew TMessagesProj:assembleRelease
APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
APK=$(dirname $APK)
echo "APK=$APK" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.flavor }}
name: Release
path: ${{ env.APK }}
# build-nogcm:
# name: Gradle Build (nogcm)
# runs-on: ubuntu-latest
# needs:
# - native
# - v2ray
# - shadowsocks
# - shadowsocksr
# - build
# strategy:
# matrix:
# flavor:
# - FullReleaseNoGcm
# - MiniReleaseNoGcm
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Setup Android SDK Tools
# uses: android-actions/setup-android@v2
# - name: Install NDK
# run: |
# echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
# - name: Fetch Status
# run: |
# sed -i 's/\/\///g' settings.gradle
# git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
# git submodule status TMessagesProj/jni/boringssl > boringssl_status
# git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
# git submodule status 'ssr-libev/*' > shadowsocksr_status
# git submodule status v2ray > v2ray_status
# - name: Native Cache (armeabi-v7a)
# uses: actions/cache@v2
# with:
# path: |
# TMessagesProj/src/main/libs
# key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a
# - name: Native Cache (arm64-v8a)
# uses: actions/cache@v2
# with:
# path: |
# TMessagesProj/src/main/libs
# key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a
# - name: V2ray Cache
# uses: actions/cache@v2
# with:
# path: |
# TMessagesProj/libs/libv2ray.aar
# key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
# - name: Shadowsocks Cache
# uses: actions/cache@v2
# with:
# path: |
# TMessagesProj/libs/ss-rust-release.aar
# key: ${{ hashFiles('shadowsocks_status') }}
# - name: ShadowsocksR Cache
# uses: actions/cache@v2
# with:
# path: |
# TMessagesProj/libs/ssr-libev-release.aar
# key: ${{ hashFiles('shadowsocksr_status') }}
# - name: Configure Gradle
# run: |
# sed -i -e "s/16384/6144/g" gradle.properties
# echo "sdk.dir=${ANDROID_HOME}" >> local.properties
# - name: Gradle cache
# uses: actions/cache@v2
# with:
# path: ~/.gradle
# key: gradle-${{ hashFiles('**/*.gradle') }}
# - name: Debug Build
# run: |
# export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
# export DEBUG_BUILD=true
# ./gradlew TMessagesProj:assemble${{ matrix.flavor }}
#
# APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
# APK=$(dirname $APK)
# echo "APK=$APK" >> $GITHUB_ENV
# - uses: actions/upload-artifact@v2
# with:
# name: ${{ matrix.flavor }}
# path: ${{ env.APK }}
upload:
name: Upload debug
if: github.event.inputs.upload != 'y'
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'bump version') }}
needs:
- build
# - build-nogcm
- telegram-bot-api
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Donwload Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Download Telegram Bot API Binary
uses: actions/download-artifact@master
- name: Set up Python
uses: actions/setup-python@v5
with:
name: telegram-bot-api-binary
path: .
python-version: 3.12
- name: Send to Telegram
run: |
chmod +x telegram-bot-api-binary
function start() {
./telegram-bot-api-binary --api-id=11535358 --api-hash=33d372962fadb01df47e6ceed4e33cd6 --local 2>&1 > /dev/null &
}
start
curl http://127.0.0.1:8081/ || start
curl http://127.0.0.1:8081/ || start
curl http://127.0.0.1:8081/ || start
# send release via telegram bot api
export mini64=$(find artifacts -name "*arm64-v8a.apk")
export mini32=$(find artifacts -name "*armeabi-v7a.apk")
# export full64=$(find artifacts -name "*full-arm64-v8a.apk")
# export full32=$(find artifacts -name "*full-armeabi-v7a.apk")
export mini64nogcm=$(find artifacts -name "*arm64-v8aNoGcm.apk")
export mini32nogcm=$(find artifacts -name "*armeabi-v7aNoGcm.apk")
# export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk")
# export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk")
echo $mini64
echo $mini32
# echo $full64
# echo $full32
echo $mini64nogcm
echo $mini32nogcm
# echo $full64nogcm
# echo $full32nogcm
curl --http0.9 http://127.0.0.1:8081/bot${{ secrets.HELPER_BOT_TOKEN }}/sendMediaGroup --form-string chat_id=${{ secrets.HELPER_BOT_TARGET }} --form apk1=@"${mini64}" --form apk2=@"${mini32}" --form apk3=@"${mini64nogcm}" --form apk4=@"${mini32nogcm}" --form-string media="[{\"type\": \"document\",\"media\": \"attach://apk1\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk2\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk3\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk4\",\"caption\": \"Test version, ${{ github.event.head_commit.message }}\",\"parse_mode\": \"Markdown\"}]" --verbose >/dev/null
pkill telegram-bot
telegram-bot-api:
name: Telegram Bot API
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clone Telegram Bot API
run: |
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
git status telegram-bot-api >> telegram-bot-api-status
- name: Cache Bot API Binary
id: cache-bot-api
uses: actions/cache@v2
with:
path: telegram-bot-api-binary
key: CI-telegram-bot-api-${{ hashFiles('telegram-bot-api-status') }}
- name: Compile Telegram Bot API
if: steps.cache-bot-api.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++
cd telegram-bot-api
rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. ..
cmake --build . --target install -j$(nproc)
cd ../..
ls -l telegram-bot-api/bin/telegram-bot-api*
cp telegram-bot-api/bin/telegram-bot-api telegram-bot-api-binary
- name: Upload Binary
uses: actions/upload-artifact@master
with:
name: telegram-bot-api-binary
path: telegram-bot-api-binary
python -m pip install -r bin/scripts/requirements.txt
git log -1 --pretty=format:"%s%n%n%b" > artifacts/caption.txt
python bin/scripts/upload.py ${{ secrets.HELPER_BOT_TOKEN }} ${{ secrets.HELPER_BOT_TARGET }} test
8 changes: 2 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- native
strategy:
matrix:
flavor:
- MiniRelease
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -223,12 +219,12 @@ jobs:
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
export DEBUG_BUILD=true
sed -i 's/signingConfig signingConfigs.release//g' TMessagesProj/build.gradle
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
./gradlew TMessagesProj:assembleRelease
APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
APK=$(dirname $APK)
echo "APK=$APK" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.flavor }}
name: Debug
path: ${{ env.APK }}
82 changes: 10 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- native
strategy:
matrix:
flavor:
# - FullRelease
- MiniRelease
# - FullReleaseNoGcm
- MiniReleaseNoGcm
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -229,96 +222,41 @@ jobs:
- name: Release Build
run: |
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
./gradlew TMessagesProj:assembleRelease
APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
APK=$(dirname $APK)
echo "APK=$APK" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.flavor }}
name: Release
path: ${{ env.APK }}
upload:
name: Upload release
if: github.event.inputs.upload != 'y'
runs-on: ubuntu-latest
needs:
- build
- telegram-bot-api
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Donwload Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Download Telegram Bot API Binary
uses: actions/download-artifact@master
- name: Set up Python
uses: actions/setup-python@v5
with:
name: telegram-bot-api-binary
path: .
python-version: 3.12
- name: Send to Telegram
run: |
chmod +x telegram-bot-api-binary
function start() {
./telegram-bot-api-binary --api-id=11535358 --api-hash=33d372962fadb01df47e6ceed4e33cd6 --local 2>&1 > /dev/null &
}
start
curl http://127.0.0.1:8081/ || start
curl http://127.0.0.1:8081/ || start
curl http://127.0.0.1:8081/ || start
# send release via telegram bot api
export mini64=$(find artifacts -name "*arm64-v8a.apk")
export mini32=$(find artifacts -name "*armeabi-v7a.apk")
# export full64=$(find artifacts -name "*full-arm64-v8a.apk")
# export full32=$(find artifacts -name "*full-armeabi-v7a.apk")
export mini64nogcm=$(find artifacts -name "*arm64-v8aNoGcm.apk")
export mini32nogcm=$(find artifacts -name "*armeabi-v7aNoGcm.apk")
# export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk")
# export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk")
echo $mini64
echo $mini32
# echo $full64
# echo $full32
echo $mini64nogcm
echo $mini32nogcm
# echo $full64nogcm
# echo $full32nogcm
curl --http0.9 http://127.0.0.1:8081/bot${{ secrets.HELPER_BOT_TOKEN }}/sendMediaGroup --form-string chat_id=${{ secrets.HELPER_BOT_TARGET }} --form apk1=@"${mini64}" --form apk2=@"${mini32}" --form apk3=@"${mini64nogcm}" --form apk4=@"${mini32nogcm}" --form-string media="[{\"type\": \"document\",\"media\": \"attach://apk1\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk2\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk3\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk4\",\"caption\": \"${{ github.event.head_commit.message }}\",\"parse_mode\": \"Markdown\"}]" --verbose >/dev/null
pkill telegram-bot
telegram-bot-api:
name: Telegram Bot API
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clone Telegram Bot API
run: |
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
git status telegram-bot-api >> telegram-bot-api-status
- name: Cache Bot API Binary
id: cache-bot-api
uses: actions/cache@v2
with:
path: telegram-bot-api-binary
key: CI-telegram-bot-api-${{ hashFiles('telegram-bot-api-status') }}
- name: Compile Telegram Bot API
if: steps.cache-bot-api.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++
cd telegram-bot-api
rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. ..
cmake --build . --target install -j$(nproc)
cd ../..
ls -l telegram-bot-api/bin/telegram-bot-api*
cp telegram-bot-api/bin/telegram-bot-api telegram-bot-api-binary
- name: Upload Binary
uses: actions/upload-artifact@master
with:
name: telegram-bot-api-binary
path: telegram-bot-api-binary
python -m pip install -r bin/scripts/requirements.txt
git log -1 --pretty=format:"%s%n%n%b" > artifacts/caption.txt
python bin/scripts/upload.py ${{ secrets.HELPER_BOT_TOKEN }} ${{ secrets.HELPER_BOT_TARGET }} release
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,16 @@
build/
local.properties
obj/
service_account_credentials.json
service_account_credentials.json
__pycache__/
release/

TMessagesProj/.cxx/
TMessagesProj/jniLibs/
TMessagesProj/jniRes/
**/.DS_Store
TMessagesProj/afat/
TMessagesProj_App/afat/
TMessagesProj_AppHockeyApp/afat/
TMessagesProj_AppStandalone/afat/
TMessagesProj_AppHuawei/afat/
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[submodule "TMessagesProj/jni/libwebp"]
path = TMessagesProj/jni/libwebp
url = https://github.com/webmproject/libwebp
[submodule "TMessagesProj/jni/ffmpeg"]
path = TMessagesProj/jni/ffmpeg
url = https://github.com/FFmpeg/FFmpeg
ignore = dirty
[submodule "TMessagesProj/jni/boringssl"]
path = TMessagesProj/jni/boringssl
url = https://github.com/google/boringssl
Expand All @@ -13,3 +9,6 @@
path = TMessagesProj/jni/libvpx
url = https://github.com/webmproject/libvpx
ignore = dirty
[submodule "TMessagesProj/jni/ffmpeg"]
path = TMessagesProj/jni/ffmpeg
url = https://github.com/FFmpeg/FFmpeg
Loading

0 comments on commit 731c059

Please sign in to comment.