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