Skip to content

Commit

Permalink
ci: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYi0526 committed Apr 2, 2024
1 parent 3ac7c88 commit 204b287
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 39 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:
needs: check
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Fetch Status
run: |
sed -i 's/\/\///g' settings.gradle
git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
git submodule status TMessagesProj/jni/libvpx > libvpx_status
- name: FFmpeg Cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/jni/ffmpeg/build
TMessagesProj/jni/libvpx/build
key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
Expand All @@ -67,20 +67,20 @@ jobs:
needs: check
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Fetch Status
run: |
sed -i 's/\/\///g' settings.gradle
git submodule status TMessagesProj/jni/boringssl > boringssl_status
- name: BoringSSL Cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/jni/boringssl/build
key: ${{ hashFiles('boringssl_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- arm64-v8a
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Fetch Status
run: |
sed -i 's/\/\///g' settings.gradle
Expand All @@ -121,7 +121,7 @@ jobs:
git submodule status TMessagesProj/jni/boringssl > boringssl_status
- name: Native Cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/src/main/libs
Expand All @@ -131,22 +131,22 @@ jobs:
run: |
git submodule update --init 'TMessagesProj/jni/*'
- name: FFmpeg Cache
uses: actions/cache@v2
uses: actions/cache@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: |
TMessagesProj/jni/ffmpeg/build
TMessagesProj/jni/libvpx/build
key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }}
- name: BoringSSL Cache
uses: actions/cache@v2
uses: actions/cache@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: |
TMessagesProj/jni/boringssl/build
key: ${{ hashFiles('boringssl_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
Expand Down Expand Up @@ -176,20 +176,20 @@ jobs:
needs: check
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Fetch Status
run: |
sed -i 's/\/\///g' settings.gradle
git submodule status v2ray > v2ray_status
- name: V2ray Cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/libs/libv2ray.aar
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
Expand All @@ -204,7 +204,7 @@ jobs:
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Install Golang
uses: actions/setup-go@v2
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.21
Expand All @@ -225,20 +225,20 @@ jobs:
needs: check
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Fetch Status
run: |
sed -i 's/\/\///g' settings.gradle
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
- name: Shadowsocks Cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/libs/ss-rust-release.aar
key: ${{ hashFiles('shadowsocks_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
Expand All @@ -264,20 +264,20 @@ jobs:
needs: check
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Fetch Status
run: |
sed -i 's/\/\///g' settings.gradle
git submodule status 'ssr-libev/*' > shadowsocksr_status
- name: ShadowsocksR Cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/libs/ssr-libev-release.aar
key: ${{ hashFiles('shadowsocksr_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
Expand Down Expand Up @@ -309,9 +309,9 @@ jobs:
- MiniRelease
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -331,31 +331,31 @@ jobs:
git submodule status 'ssr-libev/*' > shadowsocksr_status
git submodule status v2ray > v2ray_status
- name: Native Cache (armeabi-v7a)
uses: actions/cache@v2
uses: actions/cache@v4
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
uses: actions/cache@v4
with:
path: |
TMessagesProj/src/main/libs
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a
- name: V2ray Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/libs/libv2ray.aar
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
- name: Shadowsocks Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/libs/ss-rust-release.aar
key: ${{ hashFiles('shadowsocks_status') }}
- name: ShadowsocksR Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
TMessagesProj/libs/ssr-libev-release.aar
Expand All @@ -365,7 +365,7 @@ jobs:
sed -i -e "s/16384/6144/g" gradle.properties
echo "sdk.dir=${ANDROID_HOME}" >> local.properties
- name: Gradle cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle') }}
Expand All @@ -377,7 +377,7 @@ jobs:
APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
APK=$(dirname $APK)
echo "APK=$APK" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.flavor }}
path: ${{ env.APK }}
Expand All @@ -390,11 +390,11 @@ jobs:
- telegram-bot-api
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Download Telegram Bot API Binary
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: telegram-bot-api-binary
path: .
Expand Down Expand Up @@ -444,14 +444,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- 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
uses: actions/cache@v4
with:
path: telegram-bot-api-binary
key: CI-telegram-bot-api-${{ hashFiles('telegram-bot-api-status') }}
Expand All @@ -470,7 +470,7 @@ jobs:
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
uses: actions/upload-artifact@v4
with:
name: telegram-bot-api-binary
path: telegram-bot-api-binary
4 changes: 2 additions & 2 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ android {
}

def lib = "libtmessages.*.so"
pickFirst "lib/armeabi-v7a/$lib"
pickFirst "lib/arm64-v8a/$lib"
// pickFirst "lib/armeabi-v7a/$lib"
// pickFirst "lib/arm64-v8a/$lib"
}
namespace "org.telegram.messenger"
lint {
Expand Down
Empty file modified bin/init/action/shadowsocks.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions bin/libs/native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

source "bin/init/env.sh"

OUT=TMessagesProj/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib
OUT=TMessagesProj/build/intermediates/merged_native_libs/miniRelease/mergeMiniReleaseNativeLibs/out/lib
DIR=TMessagesProj/src/main/libs

export COMPILE_NATIVE=1
./gradlew TMessagesProj:stripReleaseDebugSymbols || exit 1
./gradlew TMessagesProj:stripMiniReleaseDebugSymbols || exit 1

function install() {
local ABI="$1"
Expand Down
Empty file modified bin/libs/shadowsocks.sh
100644 → 100755
Empty file.
Empty file modified bin/libs/ssr.sh
100644 → 100755
Empty file.
Empty file modified bin/libs/v2ray.sh
100644 → 100755
Empty file.
Empty file modified bin/libs/v2ray/build.sh
100644 → 100755
Empty file.
Empty file modified bin/libs/v2ray/init.sh
100644 → 100755
Empty file.

0 comments on commit 204b287

Please sign in to comment.