Skip to content

Commit e569e80

Browse files
committed
fix: ci: setup cmake
1 parent ea955ab commit e569e80

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/pr_ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ jobs:
4848
restore-keys: |
4949
gradle-builds
5050
51+
- name: Setup SDK
52+
run: |
53+
echo "ANDROID_HOME=${ANDROID_HOME}"
54+
echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}"
55+
mkdir -p "$ANDROID_HOME/licenses/"
56+
echo > "$ANDROID_HOME/licenses/android-sdk-license"
57+
echo -n 24333f8a63b6825ea9c5514f83c2829b004d1fee > "$ANDROID_HOME/licenses/android-sdk-license"
58+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.31.1"
59+
echo "sdk.dir=${ANDROID_HOME}" > local.properties
60+
5161
- name: Grant execute permission for gradlew
5262
run: chmod +x gradlew
5363

.github/workflows/push_ci.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ jobs:
5050
restore-keys: |
5151
gradle-builds
5252
53+
- name: Setup SDK
54+
run: |
55+
echo "ANDROID_HOME=${ANDROID_HOME}"
56+
echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}"
57+
mkdir -p "$ANDROID_HOME/licenses/"
58+
echo > "$ANDROID_HOME/licenses/android-sdk-license"
59+
echo -n 24333f8a63b6825ea9c5514f83c2829b004d1fee > "$ANDROID_HOME/licenses/android-sdk-license"
60+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.31.1"
61+
echo "sdk.dir=${ANDROID_HOME}" > local.properties
62+
5363
- name: Grant execute permission for gradlew
5464
run: chmod +x gradlew
5565

@@ -69,7 +79,7 @@ jobs:
6979
if: ${{ !github.event.pull_request }}
7080
with:
7181
path: './app/build/outputs/*'
72-
name: build_output_${{ github.event.head_commit.id }}.zip
82+
name: build_output_${{ github.event.head_commit.id }}
7383

7484
upload-telegram:
7585
name: Upload Release
@@ -80,11 +90,11 @@ jobs:
8090
- telegram-bot-api
8191
steps:
8292
- name: Download Artifacts
83-
uses: actions/download-artifact@v4.1.7
93+
uses: actions/download-artifact@v4
8494
with:
8595
path: artifacts
8696
- name: Download Telegram Bot API Binary
87-
uses: actions/download-artifact@master
97+
uses: actions/download-artifact@v4
8898
with:
8999
name: telegram-bot-api-binary
90100
path: .
@@ -100,6 +110,7 @@ jobs:
100110
run: |
101111
ESCAPED=`python3 -c 'import json,os,urllib.parse; msg = json.dumps(os.environ["COMMIT_MESSAGE"]); print(urllib.parse.quote(msg if len(msg) <= 1024 else json.dumps(os.environ["COMMIT_URL"])))'`
102112
export universal=$(find artifacts -name "*.apk")
113+
echo "universal=$universal"
103114
chmod +x telegram-bot-api-binary
104115
./telegram-bot-api-binary --api-id=21724 --api-hash=3e0cb5efcd52300aec5994fdfc5bdc16 --local 2>&1 > /dev/null &
105116
curl -v "http://127.0.0.1:8081/bot${{ secrets.TELEGRAM_TOKEN }}/sendMediaGroup?chat_id=-${{ vars.TG_CI_UPLOAD_TARGET_CHANNEL }}&message_thread_id=${{ vars.TG_CI_UPLOAD_TARGET_REPLY_ID }}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Funiversal%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22:${ESCAPED}%7D%5D" \

0 commit comments

Comments
 (0)