mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
chore: update workflow and Nyx config for x86_64
This commit is contained in:
+34
-74
@@ -42,52 +42,12 @@ env:
|
||||
ReleaseAndroidIDE: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
build_debug_apk:
|
||||
name: Build Debug APK
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.ref != 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
uses: styfle/cancel-workflow-action@0.12.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ env.BUILD_JAVA_VERSION }}
|
||||
distribution: ${{ env.BUILD_JAVA_DIST }}
|
||||
- name: Change Gradle wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Assemble Debug
|
||||
run: ./gradlew assembleDebug
|
||||
- name: Copy debug APK
|
||||
run: cp app/build/outputs/apk/**/debug/*.apk ./
|
||||
- name: Upload arm64-v8a-debug APK
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: apk-arm64-v8a-debug
|
||||
path: app-arm64-v8a-arm64-v8a-debug.apk
|
||||
- name: Upload armeabi-v7a-debug APK
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: apk-armeabi-v7a-debug
|
||||
path: app-armeabi-v7a-armeabi-v7a-debug.apk
|
||||
|
||||
build_release_apk:
|
||||
name: Build Release APK
|
||||
build_apk:
|
||||
strategy:
|
||||
matrix:
|
||||
build_type: ['debug', 'release']
|
||||
flavor: ['arm64-v8a', 'armeabi-v7a', 'x86_64']
|
||||
name: Build APK
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
@@ -114,28 +74,24 @@ jobs:
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Assemble Release
|
||||
run: ./gradlew assembleRelease
|
||||
- name: Copy release APK
|
||||
run: cp app/build/outputs/apk/**/release/*.apk ./
|
||||
- name: Upload arm64-v8a-release APK
|
||||
- name: Assemble
|
||||
run: |
|
||||
build_type=${{ matrix.build_type }}
|
||||
flavor=${{ matrix.flavor }}
|
||||
./gradlew :app:assemble${flavor^}${$build_type^}
|
||||
- name: Copy APK
|
||||
run: |
|
||||
build_type=${{ matrix.build_type }}
|
||||
flavor=${{ matrix.flavor }}
|
||||
cp app/build/outputs/apk/$flavor/$build_type/app-$flavor-$flavor.apk ./app-$flavor-$build_type.apk
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: apk-arm64-v8a-release
|
||||
path: app-arm64-v8a-arm64-v8a-release.apk
|
||||
- name: Upload armeabi-v7a-release APK
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: apk-armeabi-v7a-release
|
||||
path: app-armeabi-v7a-armeabi-v7a-release.apk
|
||||
- name: Upload mappings
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release-mappings
|
||||
path: '**/build/outputs/mapping'
|
||||
name: AndroidIDE-${{ matrix.flavor }}-${{ matrix.build_type }}
|
||||
path: app-${{ matrix.flavor }}-${{ matrix.build_type }}.apk
|
||||
|
||||
unit_test_debug:
|
||||
name: Run local tests
|
||||
run_unit_tests:
|
||||
name: Run unit tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -158,18 +114,18 @@ jobs:
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Run debug tests
|
||||
- name: Run unit tests
|
||||
run: ./gradlew runTestsInCI --continue
|
||||
env:
|
||||
ANDROIDIDE_TEST: true
|
||||
- name: Upload Test Reports
|
||||
- name: Upload test reports
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: test-results-unit-tests
|
||||
path: '**/build/reports/tests/'
|
||||
|
||||
unit_test_tooling_api:
|
||||
run_tooling_api_tests:
|
||||
name: Build and test Tooling API
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -193,12 +149,12 @@ jobs:
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Run debug tests
|
||||
- name: Run tooling API tests
|
||||
run: ./gradlew :subprojects:tooling-api-impl:build --continue
|
||||
env:
|
||||
ANDROIDIDE_TEST: true
|
||||
TEST_TOOLING_API_IMPL: true
|
||||
- name: Upload Test Reports
|
||||
- name: Upload test reports
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -208,8 +164,8 @@ jobs:
|
||||
publish:
|
||||
name: Publish release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build_release_apk, unit_test_debug, unit_test_tooling_api ]
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && needs.build_release_apk.result == 'success' && needs.unit_test_debug.result == 'success' && needs.unit_test_tooling_api.result == 'success' }}
|
||||
needs: [ build_apk, run_unit_tests, run_tooling_api_tests ]
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && needs.build_apk.result == 'success' && needs.run_unit_tests.result == 'success' && needs.run_tooling_api_tests.result == 'success' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -224,6 +180,10 @@ jobs:
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: apk-arm64-v8a-release
|
||||
- name: Download x86_64 APK
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: apk-x86_64-release
|
||||
- name: Download armeabi-v7a APK
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@@ -251,8 +211,8 @@ jobs:
|
||||
publish_snapshots:
|
||||
name: Publish package snapshots
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build_debug_apk ]
|
||||
if: ${{ always() && github.ref != 'refs/heads/main' && github.event_name != 'pull_request' && needs.build_debug_apk.result == 'success' }}
|
||||
needs: [ build_apk ]
|
||||
if: ${{ always() && github.ref != 'refs/heads/main' && github.event_name != 'pull_request' && needs.build_apk.result == 'success' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -17,12 +17,17 @@ releaseAssets:
|
||||
apk_arm64:
|
||||
fileName: "androidide-{{version}}-arm64-v8a.apk"
|
||||
description: "AndroidIDE {{version}} arm64-v8a release APK"
|
||||
path: app-arm64-v8a-arm64-v8a-release.apk
|
||||
path: app-arm64-v8a-release.apk
|
||||
type: application/octet-stream
|
||||
apk_x86_64:
|
||||
fileName: "androidide-{{version}}-x86_64.apk"
|
||||
description: "AndroidIDE {{version}} x86_64 release APK"
|
||||
path: app-x86_64-release.apk
|
||||
type: application/octet-stream
|
||||
apk_arm:
|
||||
fileName: "androidide-{{version}}-armeabi-v7a.apk"
|
||||
description: "AndroidIDE {{version}} armeabi-v7a release APK"
|
||||
path: app-armeabi-v7a-armeabi-v7a-release.apk
|
||||
path: app-armeabi-v7a-release.apk
|
||||
type: application/octet-stream
|
||||
|
||||
releaseTypes:
|
||||
|
||||
Reference in New Issue
Block a user