From 486be5440c6e9bfecb9e2da36435d3a7e22003ee Mon Sep 17 00:00:00 2001 From: Hny0305Lin <1553809191@qq.com> Date: Mon, 8 Jul 2024 10:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89Release=201.3=EF=BC=8C=E5=AE=8C?= =?UTF-8?q?=E6=95=B4=E4=BF=AE=E5=A4=8DAndroid=20CI=20Release=E5=A4=A7?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/androidsign.yml | 83 ++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/.github/workflows/androidsign.yml b/.github/workflows/androidsign.yml index 354bf81..14c9bfc 100644 --- a/.github/workflows/androidsign.yml +++ b/.github/workflows/androidsign.yml @@ -113,11 +113,90 @@ jobs: uses: softprops/action-gh-release@v1 with: tag_name: ${{ github.ref_name }} - name: Release ${{ github.ref_name }} + name: ${{ github.ref_name }} body: ${{ env.COMMIT_MESSAGE }} draft: false prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用环境变量 continue-on-error: true - \ No newline at end of file + + multi-platform-test: + runs-on: ubuntu-latest + needs: build + strategy: + matrix: + api-level: [28, 29, 30, 31, 33] # 你可以根据需要调整 API 级别 + target: [default, google_apis] + arch: [x86, x86_64, arm64-v8a] # 你可以根据需要调整架构 + include: + - api-level: 28 + target: default + arch: x86 + - api-level: 29 + target: default + arch: x86_64 + - api-level: 29 + target: default + arch: arm64-v8a + - api-level: 29 + target: google_apis + arch: arm64-v8a + - api-level: 30 + target: default + arch: x86_64 + - api-level: 30 + target: google_apis + arch: x86_64 + - api-level: 30 + target: google_apis + arch: arm64-v8a + - api-level: 31 + target: default + arch: x86_64 + - api-level: 31 + target: google_apis + arch: x86_64 + - api-level: 31 + target: google_apis + arch: arm64-v8a + - api-level: 33 + target: default + arch: x86_64 + - api-level: 33 + target: google_apis + arch: x86_64 + - api-level: 33 + target: google_apis + arch: arm64-v8a + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + + - name: Gradle cache + uses: gradle/actions/setup-gradle@v3 + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + + - name: Instrumentation Tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: x86_64 + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: ./gradlew connectedAndroidTest --stacktrace