Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also run CI on main declarative #17

Merged
merged 24 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
10af03d
First checkout declarative-gradle
tresat Apr 3, 2024
a21af01
Merge pull request #6 from gradle/tt/checkout-declarative-gradle
tresat Apr 3, 2024
35dbd60
Checkout declarative-gradle to proper dir one level up
tresat Apr 3, 2024
c1aa7e5
Merge pull request #7 from gradle/tt/adjust-checkout-dir
tresat Apr 3, 2024
53e5fd6
Adjust NiA checkout to subdir
tresat Apr 3, 2024
0a61e5f
Merge pull request #8 from gradle/tt/adjust-nia-checkout-dir
tresat Apr 3, 2024
a7ddaea
Specify NiA repo explicit to get expected checkout dir
tresat Apr 3, 2024
b7b6c2c
Merge pull request #9 from gradle/tt/explicit-nia-repo
tresat Apr 3, 2024
94c4958
Correct local tests dir
tresat Apr 3, 2024
094162a
Merge pull request #10 from gradle/tt/fix-local-tests
tresat Apr 3, 2024
c0212d0
Fix check lint step
tresat Apr 4, 2024
d525a21
Merge pull request #11 from gradle/tt/fix-check-lint
tresat Apr 4, 2024
d354281
Update release yaml with new locations
tresat Apr 4, 2024
143a673
Merge pull request #12 from gradle/tt/fix-release
tresat Apr 4, 2024
96b50f2
Fix path in release
tresat Apr 4, 2024
0594dff
Merge pull request #13 from gradle/tt/fix-release-path
tresat Apr 4, 2024
7bd6018
Fix androidTest GH jobs
tresat Apr 4, 2024
d618ba4
Merge pull request #14 from gradle/tt/fix-androidTest
tresat Apr 4, 2024
c59d3dc
Fix checkout
tresat Apr 4, 2024
2117a89
Merge pull request #15 from gradle/tt/fix-checkout-tests
tresat Apr 4, 2024
3f5dd73
Merge branch 'main' of https://github.com/gradle/nowinandroid
tresat Apr 22, 2024
f5b0223
Also run CI on main declarative branch
tresat Apr 22, 2024
3c0b83f
Restore deleted Project info
tresat Apr 22, 2024
9f85d52
Checkout declarative no-conventions branch
tresat Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 35 additions & 14 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- main-declarative
pull_request:

concurrency:
Expand All @@ -22,14 +23,24 @@ jobs:
timeout-minutes: 60

steps:
- name: Checkout
- name: Checkout Declarative Gradle
uses: actions/checkout@v4
with:
repository: 'gradle/declarative-gradle'
ref: 'tt/declarative-no-conventions-nia'
path: 'declarative-gradle'

- name: Checkout Now in Android
uses: actions/checkout@v4
with:
repository: 'gradle/nowinandroid'
path: 'now-in-android'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
run: mkdir -p ~/.gradle ; cp now-in-android/.github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -41,15 +52,15 @@ jobs:
uses: gradle/gradle-build-action@v3

- name: Check build-logic
run: ./gradlew check -p build-logic
run: ./now-in-android/gradlew check -p now-in-android/build-logic

- name: Check spotless
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
run: ./now-in-android/gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache -p now-in-android

- name: Check Dependency Guard
id: dependencyguard_verify
continue-on-error: true
run: ./gradlew dependencyGuard
run: ./now-in-android/gradlew dependencyGuard -p now-in-android

- name: Prevent updating Dependency Guard baselines if this is a fork
id: checkfork_dependencyguard
Expand All @@ -63,7 +74,7 @@ jobs:
id: dependencyguard_baseline
if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
./gradlew dependencyGuardBaseline
./now-in-android/gradlew dependencyGuardBaseline -p now-in-android

- name: Push new Dependency Guard baselines if available
uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -76,7 +87,7 @@ jobs:
- name: Run all local screenshot tests (Roborazzi)
id: screenshotsverify
continue-on-error: true
run: ./gradlew verifyRoborazziDemoDebug
run: ./now-in-android/gradlew verifyRoborazziDemoDebug -p now-in-android

- name: Prevent pushing new screenshots if this is a fork
id: checkfork_screenshots
Expand All @@ -103,17 +114,18 @@ jobs:
# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots.
- name: Run local tests and create report
if: always()
run: ./gradlew testDemoDebug :lint:test
run: ./now-in-android/gradlew testDemoDebug :lint:test -p now-in-android
# Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when
# https://android-review.googlesource.com/c/platform/frameworks/support/+/2602790 landed in a
# release build

- name: Build all build type and flavor permutations
run: ./gradlew :app:assemble :benchmarks:assemble
run: ./now-in-android/gradlew :app:assemble :benchmarks:assemble
-x pixel6Api33ProdNonMinifiedReleaseAndroidTest
-x pixel6Api33DemoNonMinifiedReleaseAndroidTest
-x collectDemoNonMinifiedReleaseBaselineProfile
-x collectProdNonMinifiedReleaseBaselineProfile
-p now-in-android

- name: Upload build outputs (APKs)
uses: actions/upload-artifact@v4
Expand All @@ -129,7 +141,7 @@ jobs:
path: '**/build/test-results/test*UnitTest/**.xml'

- name: Check lint
run: ./gradlew :app:lintProdRelease :app-nia-catalog:lintRelease :lint:lint
run: ./now-in-android/gradlew :app:lintProdRelease :app-nia-catalog:lintRelease :lint:lint -p now-in-android

- name: Upload lint reports (HTML)
if: always()
Expand All @@ -139,7 +151,7 @@ jobs:
path: '**/build/reports/lint-results-*.html'

- name: Check badging
run: ./gradlew :app:checkProdReleaseBadging
run: ./now-in-android/gradlew :app:checkProdReleaseBadging -p now-in-android

androidTest:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -167,11 +179,20 @@ jobs:
sudo udevadm trigger --name-match=kvm
ls /dev/kvm

- name: Checkout
- name: Checkout Declarative Gradle
uses: actions/checkout@v4
with:
repository: 'gradle/declarative-gradle'
path: 'declarative-gradle'

- name: Checkout Now in Android
uses: actions/checkout@v4
with:
repository: 'gradle/nowinandroid'
path: 'now-in-android'

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
run: mkdir -p ~/.gradle ; cp now-in-android/.github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -190,7 +211,7 @@ jobs:
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: ./gradlew connectedDemoDebugAndroidTest --daemon
script: ./now-in-android/gradlew connectedDemoDebugAndroidTest --daemon -p now-in-android

- name: Run local tests (including Roborazzi) for the combined coverage report (only API 30)
if: matrix.api-level == 30
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ jobs:
sudo udevadm trigger --name-match=kvm
ls /dev/kvm

- name: Checkout
uses: actions/checkout@v4
- name: Checkout Declarative Gradle
uses: actions/checkout@v4
with:
repository: 'gradle/declarative-gradle'
path: 'declarative-gradle'

- name: Checkout Now in Android
uses: actions/checkout@v4
with:
repository: 'gradle/nowinandroid'
path: 'now-in-android'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
run: mkdir -p ~/.gradle ; cp now-in-android.github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
Loading