Actually run `CargoTargetTest`.
This commit is contained in:
Родитель
50294f8b5a
Коммит
fe0e14fc64
|
@ -1,34 +1,64 @@
|
|||
name: CI
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
# Controls when the action will run. Triggers the workflow on push or pull
|
||||
# request events, but only for the `master` branch (generally) or the `citest`
|
||||
# branch (for testing).
|
||||
on:
|
||||
push:
|
||||
branches: [ master, citest ]
|
||||
branches: [master, citest]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
generate_versions:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v1
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE for the job.
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Gradle test
|
||||
run: |
|
||||
./gradlew -p plugin generateTestTasksJson
|
||||
- name: Gradle test
|
||||
run: |
|
||||
./gradlew -p plugin generateTestTasksJson
|
||||
|
||||
- id: setup-matrix
|
||||
run: echo "::set-output name=matrix::$(cat plugin/build/build-resources/androidTestTasks.json)"
|
||||
- id: setup-matrix
|
||||
run: echo "::set-output name=matrix::$(cat plugin/build/build-resources/androidTestTasks.json)"
|
||||
|
||||
- name: debug
|
||||
run: echo ${{ steps.setup-matrix.outputs.matrix }}
|
||||
- name: debug
|
||||
run: echo ${{ steps.setup-matrix.outputs.matrix }}
|
||||
|
||||
outputs:
|
||||
matrix: ${{ steps.setup-matrix.outputs.matrix }}
|
||||
|
||||
android_unversioned_tests:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE for the job.
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Setup Rust
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add x86_64-linux-android
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
rustup target add aarch64-linux-android
|
||||
|
||||
# Use Java 8
|
||||
- name: Setup Java 8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 8
|
||||
|
||||
- name: Gradle setup
|
||||
run: |
|
||||
./gradlew -p plugin tasks --warning-mode all
|
||||
|
||||
- name: Gradle test
|
||||
run: |
|
||||
./gradlew -p plugin test --tests CargoTargetTest --info --warning-mode all
|
||||
|
||||
android_version_tests:
|
||||
needs: [generate_versions] # , sanity_check]
|
||||
|
||||
|
@ -42,40 +72,40 @@ jobs:
|
|||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v1
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
# # Sets up the NDK required by AGP 3.6.x
|
||||
# - name: Setup NDK
|
||||
# run: sudo $ANDROID_HOME/tools/bin/sdkmanager 'ndk;20.0.5594570'
|
||||
# # Sets up the NDK required by AGP 3.6.x
|
||||
# - name: Setup NDK
|
||||
# run: sudo $ANDROID_HOME/tools/bin/sdkmanager 'ndk;20.0.5594570'
|
||||
|
||||
# - name: Install Rustup
|
||||
# run: |
|
||||
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
|
||||
# echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
# - name: Install Rustup
|
||||
# run: |
|
||||
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
|
||||
# echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Setup Rust
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add x86_64-linux-android
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
rustup target add aarch64-linux-android
|
||||
- name: Setup Rust
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add x86_64-linux-android
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
rustup target add aarch64-linux-android
|
||||
|
||||
# Use Java 8
|
||||
- name: Setup Java 8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 8
|
||||
# Use Java 8
|
||||
- name: Setup Java 8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 8
|
||||
|
||||
- name: Gradle setup
|
||||
run: |
|
||||
./gradlew -p plugin tasks --warning-mode all
|
||||
- name: Gradle setup
|
||||
run: |
|
||||
./gradlew -p plugin tasks --warning-mode all
|
||||
|
||||
- name: Gradle test
|
||||
run: |
|
||||
./gradlew -p plugin ${{ matrix.androidTestTask }} --tests CargoBuildTest --info --warning-mode all
|
||||
- name: Gradle test
|
||||
run: |
|
||||
./gradlew -p plugin ${{ matrix.androidTestTask }} --tests CargoBuildTest --info --warning-mode all
|
||||
|
||||
# # Gradle build
|
||||
# - uses: eskatos/gradle-command-action@v1
|
||||
# with:
|
||||
# arguments: ${{ matrix.androidTestTask }} -I gradle/buildScanInit.gradle
|
||||
# # Gradle build
|
||||
# - uses: eskatos/gradle-command-action@v1
|
||||
# with:
|
||||
# arguments: ${{ matrix.androidTestTask }} -I gradle/buildScanInit.gradle
|
||||
|
|
|
@ -128,7 +128,7 @@ supportedVersions.keySet().each { androidVersion ->
|
|||
def testTaskName = androidTestTaskName(androidVersion)
|
||||
def jdkVersion = jdkVersionFor(androidVersion)
|
||||
def versionSpecificTest = tasks.register(testTaskName, Test) {
|
||||
description = "Runs the multi-version tests for AGP ${androidVersion}"
|
||||
description = "Runs the multi-version tests for AGP ${androidVersion} (JDK version ${jdkVersion})"
|
||||
group = "verification"
|
||||
|
||||
javaLauncher = javaToolchains.launcherFor {
|
||||
|
|
|
@ -17,6 +17,10 @@ class TestVersions {
|
|||
}
|
||||
|
||||
static VersionNumber latestAndroidVersionForCurrentJDK() {
|
||||
String currentJDKVersion = System.getProperty("java.version");
|
||||
if (currentJDKVersion.startsWith("1.")) {
|
||||
return allCandidateTestVersions.keySet().findAll {it < VersionNumber.parse("7.0.0-alpha01")}.max()
|
||||
}
|
||||
return allCandidateTestVersions.keySet().max()
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче