Skip to content

Commit

Permalink
build: fix debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Feb 9, 2024
1 parent 9e8ee63 commit cd784c5
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 11 deletions.
62 changes: 51 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ jobs:
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
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -68,8 +74,14 @@ jobs:
path: |
TMessagesProj/jni/boringssl/build
key: ${{ hashFiles('boringssl_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -128,8 +140,14 @@ jobs:
path: |
TMessagesProj/jni/boringssl/build
key: ${{ hashFiles('boringssl_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -165,8 +183,14 @@ jobs:
path: |
TMessagesProj/libs/libv2ray.aar
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -200,8 +224,14 @@ jobs:
path: |
TMessagesProj/libs/ss-rust-release.aar
key: ${{ hashFiles('shadowsocks_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -233,8 +263,14 @@ jobs:
path: |
TMessagesProj/libs/ssr-libev-release.aar
key: ${{ hashFiles('shadowsocksr_status') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -251,8 +287,8 @@ jobs:
needs:
- native
- v2ray
# - shadowsocks
# - shadowsocksr
- shadowsocks
- shadowsocksr
strategy:
matrix:
flavor:
Expand All @@ -261,8 +297,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3
- name: Install NDK
run: |
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
Expand Down Expand Up @@ -319,8 +360,7 @@ jobs:
run: |
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
export DEBUG_BUILD=true
sed '/signingConfig signingConfigs.release/d' TMessagesProj/build.gradle > TMessagesProj/build.gradle.tmp
mv TMessagesProj/build.gradle.tmp TMessagesProj/build.gradle
sed -i 's/signingConfig signingConfigs.release//g' TMessagesProj/build.gradle
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
Expand Down
4 changes: 4 additions & 0 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ android {
if (disableCMakeRelWithDebInfo && task.name.contains("CMakeRelWithDebInfo") && !targetTask.contains("fdroid")) {
enabled = false
}
// na: disable cmake debug for pr
if (disableCMakeRelWithDebInfo && task.name.contains("CMakeDebug") && !targetTask.contains("fdroid")) {
enabled = false
}
}

applicationVariants.all { variant ->
Expand Down

0 comments on commit cd784c5

Please sign in to comment.