Skip to content

The only downloader you need. 下载器的集大成者。

ci(android): 缓存 libtorrent wheel

XiaoYouChR13bcb7d43893
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6446969d..ce08f9e1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -787,10 +787,23 @@ jobs:
with:
python-version: '3.14'
+ - name: Read libtorrent version
+ id: libtorrent
+ run: echo "version=$(python3 -c "import tomllib; print(next(p['version'] for p in tomllib.load(open('uv.lock', 'rb'))['package'] if p['name'] == 'libtorrent'))")" >> "$GITHUB_OUTPUT"
+
+ - name: Cache libtorrent wheel
+ id: libtorrent-cache
+ uses: actions/cache@v6
+ with:
+ path: android/build-scripts/dist
+ key: libtorrent-android-arm64-v8a-${{ steps.libtorrent.outputs.version }}-${{ hashFiles('android/build-scripts/build_libtorrent_wheel.sh') }}
+
- name: Install wheel tool
+ if: ${{ steps.libtorrent-cache.outputs.cache-hit != 'true' }}
run: pip install wheel
- name: Build libtorrent wheel
+ if: ${{ steps.libtorrent-cache.outputs.cache-hit != 'true' }}
working-directory: android/build-scripts
run: ./build_libtorrent_wheel.sh --abi=arm64-v8a