-
Notifications
You must be signed in to change notification settings - Fork 49
113 lines (108 loc) · 3.71 KB
/
build-verification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Verify Build
on:
push:
branches: [ main, citest ]
pull_request:
workflow_dispatch:
jobs:
generate_versions:
name: Generate versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: setup-matrix
run: echo "matrix=$(jq -cM '.supportedVersions | keys' src/main/resources/versions.json | sed -e 's/\./_/g' -e 's/-/_/g')" >> $GITHUB_OUTPUT
- name: debug
run: echo "matrix=${{ steps.setup-matrix.outputs.matrix }}"
outputs:
matrix: ${{ steps.setup-matrix.outputs.matrix }}
sanity_check:
name: Sanity check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Run sanityCheck
run: ./gradlew sanityCheck -Porg.gradle.java.installations.auto-download=false
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Run unit tests
run: >-
./gradlew test
-x signPluginMavenPublication
-x signAndroidCacheFixPluginPluginMarkerMavenPublication
-Porg.gradle.java.installations.auto-download=false
-Dpts.mode=$PTS_MODE
env:
PTS_MODE: "${{ github.ref_name == 'main' && 'REMAINING_TESTS' || 'RELEVANT_TESTS' }}"
android_version_tests:
name: Android version tests
needs: [ generate_versions, sanity_check ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
versions: ${{ fromJson(needs.generate_versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: List Android Packages
run: sudo ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --list | sed -n '/Available Packages/q;p'
- name: Accept license 34.0.0
run: echo "y" | sudo ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;34.0.0"
- name: Setup ZULU_JDK
uses: actions/setup-java@v4
with:
java-version: 11.0.12
distribution: 'zulu'
- name: Set ZULU_JDK environment variable
run: |
echo "ZULU_JDK=$JAVA_HOME" >> $GITHUB_ENV
- name: Setup ZULU_ALT_JDK
uses: actions/setup-java@v4
with:
java-version: 11.0.13
distribution: 'zulu'
- name: Set ZULU_ALT_JDK environment variable
run: |
echo "ZULU_ALT_JDK=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up Java 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Run integration tests
run: >-
./gradlew testAndroid${{ matrix.versions }}
-x signPluginMavenPublication
-x signAndroidCacheFixPluginPluginMarkerMavenPublication
-Porg.gradle.java.installations.auto-download=false
-Dpts.mode=$PTS_MODE
env:
PTS_MODE: "${{ github.ref_name == 'main' && 'REMAINING_TESTS' || 'RELEVANT_TESTS' }}"