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

Fix part of #1719, part of #3709: Add build stats CI workflow #4092

Merged
merged 244 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 240 commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
8a3f45c
Add script for computing AAB/APK differences.
BenHenning Jan 11, 2022
ecb742a
Add workflow to show build stats.
BenHenning Jan 11, 2022
4e9ce47
Add missing new build vars.
BenHenning Jan 11, 2022
a34041e
Tests + docs + build changes.
BenHenning Jan 12, 2022
498d24e
Fix CommandExecutorImpl's timeout feature.
BenHenning Jan 12, 2022
a9b686d
Lint fixes.
BenHenning Jan 12, 2022
b06d2b2
Merge branch 'develop' into add-build-stats-ci-workflow
BenHenning Jan 12, 2022
4a9f003
Fix post-merge conflicts.
BenHenning Jan 12, 2022
a19c1a5
Fix workflow name.
BenHenning Jan 13, 2022
ae737ad
Fix workflow names & IDs.
BenHenning Jan 13, 2022
f0af5e5
Temporarily disable workflows -> faster iteration.
BenHenning Jan 13, 2022
4dfdd35
Add Proguard exemption.
BenHenning Jan 13, 2022
7895214
Remove broken & unneeded copy line.
BenHenning Jan 13, 2022
88adf22
Fix variable reference for comment body.
BenHenning Jan 13, 2022
accf003
Add more collapsing in comment.
BenHenning Jan 13, 2022
532bfe5
Only isolate special script deps.
BenHenning Jan 13, 2022
693ce0a
Re-enable CI workflows.
BenHenning Jan 13, 2022
b587830
Merge branch 'develop' into add-build-stats-ci-workflow
BenHenning Mar 20, 2022
2a5f6e0
Post-merge fixes & wording improvements.
BenHenning Mar 21, 2022
53de383
Upgrade to Kotlin 1.6.
BenHenning Mar 22, 2022
9061529
Fix guava_jre deps & in bundle tool client.
BenHenning Mar 22, 2022
31a7605
Buildifier lint fixes.
BenHenning Mar 22, 2022
9ca7e2b
Migrate to rules_jvm_external 5.1.
BenHenning Mar 27, 2023
7238b59
Fix JVm dep build warnings.
BenHenning Mar 27, 2023
f6188ac
Fix Maven license check & update the list.
BenHenning Mar 28, 2023
2c3b6ea
Fix issues with compute_affected_tests.
BenHenning Mar 29, 2023
c325bc9
Use base SHA for computing affected tests.
BenHenning Mar 29, 2023
2012647
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Mar 29, 2023
47f9c02
Post-merge lint fix.
BenHenning Mar 29, 2023
8ae5aa8
Fix updated TODOs.
BenHenning Mar 29, 2023
de3cf14
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Mar 29, 2023
b2ca68b
Fix Dagger structure.
BenHenning Mar 30, 2023
839be0f
Upgrade Dagger version.
BenHenning Mar 30, 2023
c2fe337
Fix test builds that depend on Dagger generation.
BenHenning Mar 30, 2023
a543500
Update Maven dependency licenses.
BenHenning Mar 30, 2023
b882832
Fix broken test & binary builds.
BenHenning Mar 30, 2023
c5b940b
Add support for Kotlin 1.6.
BenHenning Mar 30, 2023
10ae796
Correctly interact with rules_kotlin.
BenHenning Mar 30, 2023
1cf7b76
Fix upgrade by downgrading Moshi to 1.13.
BenHenning Mar 30, 2023
d2799f0
Turn on warnings as errors for Kotlin.
BenHenning Mar 31, 2023
86dacfb
Fix Java build & other warnings.
BenHenning Apr 1, 2023
bc62b22
Try to fix AndroidX databinding compile race.
BenHenning Apr 1, 2023
6f9bbd6
Fix static check failures.
BenHenning Apr 1, 2023
7cc591d
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Apr 1, 2023
a4790a4
Post-merge fixes.
BenHenning Apr 1, 2023
b74ecbb
Fix Proguard builds (temp) and static failures.
BenHenning Apr 1, 2023
aaa0299
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning Apr 1, 2023
d520fa9
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Apr 1, 2023
037be61
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Apr 1, 2023
756534a
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning Apr 1, 2023
a92e37c
Fix CI breakages, including Gradle.
BenHenning Apr 1, 2023
bb8592b
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Apr 1, 2023
9890877
Post-merge dep fixes + test fix.
BenHenning Apr 1, 2023
f118fa2
Undo unnecessary changes.
BenHenning Apr 1, 2023
d8792a8
Fix broken CI checks.
BenHenning Apr 3, 2023
6b5291f
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Apr 3, 2023
125be3c
Post-merge fixes.
BenHenning Apr 3, 2023
59f7f87
Address self-review comments.
BenHenning Apr 3, 2023
0709b3d
Fix broken tests.
BenHenning Apr 3, 2023
e44b59d
Address TODOs as part of the migration.
BenHenning Apr 3, 2023
d2df104
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Apr 3, 2023
3b7df64
Post-merge fixes.
BenHenning Apr 3, 2023
a40f75a
Update build stats workflow.
BenHenning Apr 3, 2023
8a19b4e
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 11, 2023
773f7ff
Fix breakage from develop.
BenHenning May 11, 2023
311951f
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 11, 2023
9e377d5
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 12, 2023
f087488
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning May 12, 2023
413952c
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 12, 2023
e7435a5
Fix hanging CoroutineExecutorService test.
BenHenning May 12, 2023
0b4fefa
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 12, 2023
c0b3894
Permant-ify temporary TODOs for new tests.
BenHenning May 12, 2023
ec33a12
Upgrade runner for build stats.
BenHenning May 12, 2023
8a8101b
Fix broken Gradle build.
BenHenning May 12, 2023
d629d71
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 12, 2023
525a601
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning Jun 6, 2023
6cca78f
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Jun 6, 2023
327114d
Post-merge fixes.
BenHenning Jun 6, 2023
bb4ff28
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Jun 6, 2023
5d924f4
Post-merge fixes.
BenHenning Jun 6, 2023
8690354
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning Jun 6, 2023
66bf94f
Post-merge fixes.
BenHenning Jun 6, 2023
667bf89
Fix a variety of dev platform-specific issues.
BenHenning Aug 22, 2023
fb59232
Tidy some things up, and revert fragment test.
BenHenning Aug 28, 2023
2551d4b
Fix test behavior inconsistency in test.
BenHenning Sep 11, 2023
714f3ea
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Sep 11, 2023
7488b9f
Fix broken ProfileAndDeviceIdFragmentTest test.
BenHenning Sep 13, 2023
e3d4091
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Oct 26, 2023
5671673
Post-merge fix.
BenHenning Oct 26, 2023
f5ed0c9
Merge branch 'fix-platform-specific-issues' into upgrade-compute-affe…
BenHenning Oct 26, 2023
bd1466d
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Jan 16, 2024
d9b38ea
Merge branch 'fix-platform-specific-issues' into upgrade-compute-affe…
BenHenning Jan 16, 2024
9f1a2ec
Some follow-up post-merge fixes.
BenHenning Jan 17, 2024
39a3add
Make TodoOpenCheck locally runnable.
BenHenning Jan 18, 2024
4f7bfd6
Simplify GitHubIssue & some static fixes/docs.
BenHenning Jan 18, 2024
000bba3
Add ScriptBackgroundCoroutineDispatcher.
BenHenning Jan 18, 2024
79878cd
Some more robustness fixes.
BenHenning Jan 19, 2024
a5f71d6
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Jan 19, 2024
0b55bd4
Post-merge fixes.
BenHenning Jan 19, 2024
53d6727
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Jan 19, 2024
00c7c28
Post-merge fixes & adjustments.
BenHenning Jan 20, 2024
bd97611
Fix BUILD file lint issue.
BenHenning Jan 20, 2024
d54829d
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Jan 20, 2024
fa9cae4
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Jan 20, 2024
0618b12
Static fix checks.
BenHenning Jan 20, 2024
fb148ea
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Jan 20, 2024
ab326ff
Post-merge fixes.
BenHenning Jan 20, 2024
d5bfad5
Merge branch 'upgrade-compute-affected-tests' of github.com:oppia/opp…
BenHenning Jan 20, 2024
1067a18
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Jan 20, 2024
1e2df14
Post-merge fixes.
BenHenning Jan 20, 2024
211487c
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 6, 2024
1a666a9
Post-merge fixes.
BenHenning Feb 6, 2024
a2ee5d3
Add smoke tests for instr. binaries & tests.
BenHenning Feb 7, 2024
d5b9012
Some minor refactoring for readability.
BenHenning Feb 7, 2024
e6ec869
Fixed broken instrumentation builds.
BenHenning Feb 7, 2024
9f50469
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 7, 2024
8dbf4dc
Add missing CODEOWNERS line.
BenHenning Feb 7, 2024
9c38057
Remove old files from CODEOWNERS.
BenHenning Feb 7, 2024
f2ff4e3
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 7, 2024
fad48ed
Add missing tests for TestBlazeWorkspace changes.
BenHenning Feb 8, 2024
e1802c8
Add missing Firebase auth tests.
BenHenning Feb 8, 2024
00c32f6
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 8, 2024
2f87f4d
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 8, 2024
aa3547c
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 8, 2024
d3cbd93
Post-merge fixes for previously missed tests.
BenHenning Feb 8, 2024
13e4358
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 8, 2024
622aced
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 8, 2024
50f41d2
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 8, 2024
c8df70e
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 8, 2024
c85d421
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 9, 2024
dcf27b6
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 9, 2024
2369514
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 9, 2024
c7ec5d4
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 9, 2024
4b418bd
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 9, 2024
d6a9f70
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 9, 2024
8de4d51
Improve new test robustness.
BenHenning Feb 9, 2024
3f69f11
Fix updated Maven license deps.
BenHenning Feb 9, 2024
ea8e0b1
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 9, 2024
2916770
Update scripts/src/javatests/org/oppia/android/scripts/common/GitClie…
BenHenning Feb 14, 2024
f2d810a
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 14, 2024
808f412
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 14, 2024
2315aea
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 14, 2024
af51395
Add tests for GitHubClient & TodoOpenCheck.
BenHenning Feb 14, 2024
6856e3c
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 14, 2024
5a050de
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 14, 2024
13b8d4b
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 14, 2024
280b3ec
Add missing docs.
BenHenning Feb 14, 2024
0bd7e2f
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 14, 2024
5951c0f
Post-merge fixes.
BenHenning Feb 15, 2024
ee71b32
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Feb 15, 2024
3627067
Update Maven dep list checker & updater scripts.
BenHenning Feb 15, 2024
a5eb624
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Feb 20, 2024
ae239b3
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 20, 2024
34ea6aa
Fix broken TodoOpenCheck tests & check exemptions.
BenHenning Feb 20, 2024
df61985
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 20, 2024
161ae8d
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Feb 20, 2024
8c87993
Fix broken checks & failing static checks.
BenHenning Feb 22, 2024
bb6e681
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Feb 22, 2024
5c812a1
Post merge build, test, and static check fixes.
BenHenning Feb 23, 2024
57c275c
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning Feb 23, 2024
e0e74d5
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Mar 4, 2024
2dd0cd7
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 4, 2024
79a2f0f
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Mar 4, 2024
60458bf
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Mar 4, 2024
228a037
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Mar 4, 2024
195d604
Some post-merge fixes.
BenHenning Mar 4, 2024
3bdd1e0
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning Mar 4, 2024
7cd345b
Silence deprecation warnings.
BenHenning Mar 5, 2024
70df9b3
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Mar 14, 2024
04fc8b8
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 14, 2024
c301eed
Address reviewer comment.
BenHenning Mar 14, 2024
51a96ce
Merge branch 'develop' into introduce-better-script-execution-support
seanlip Mar 15, 2024
b3e2fd9
Merge commit 'e2f94e41e4cba3bc5b5f3af65f7c43a6543b4c52' into introduc…
BenHenning Mar 20, 2024
73a8bce
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 20, 2024
f48f78e
Merge branch 'develop' into make-todo-check-locally-runnable
BenHenning Mar 20, 2024
02ccc87
Merge branch 'develop' into make-todo-check-locally-runnable
BenHenning May 16, 2024
28fcb9d
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning May 16, 2024
aa8988c
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 16, 2024
658c9f0
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 16, 2024
53d42e1
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning May 16, 2024
4cf06d4
Address self-review comments.
BenHenning May 16, 2024
0cc5d5d
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 17, 2024
c43c036
Address review comment.
BenHenning May 17, 2024
c30a839
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 17, 2024
fbac9a2
Post-merge fixes.
BenHenning May 17, 2024
840de58
Merge branch 'update-dagger-structure' into upgrade-to-kotlin1.6
BenHenning May 17, 2024
ce2c34b
Fix NetworkLoggingInterceptorTest.
BenHenning May 20, 2024
0f48cf5
Fix more tests & upgrade Robolectric.
BenHenning May 20, 2024
caf6f28
Fix more broken tests.
BenHenning May 20, 2024
118d32f
Undo Robolectric upgrade.
BenHenning May 21, 2024
956b358
Upgrade to rules_kotlin 1.5.0 beta 3.
BenHenning May 21, 2024
dd84da3
Merge branch 'upgrade-to-newer-rules-kotlin' into upgrade-to-kotlin1.6
BenHenning May 21, 2024
f5c07fc
Fix build-time Kotlin & Java warnings.
BenHenning May 22, 2024
0429177
Fix a few follow-up issues.
BenHenning May 22, 2024
8dcb531
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning May 22, 2024
c24069b
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 22, 2024
c2fee1b
Post-merge fixes.
BenHenning May 22, 2024
3dc6b7b
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 22, 2024
acd1c0d
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 22, 2024
c672af0
Address reviewer comment.
BenHenning May 22, 2024
1b19f5b
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 22, 2024
3e923e2
Follow-up variable rename for clarity.
BenHenning May 22, 2024
9af41bd
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 22, 2024
6100394
Merge branch 'update-dagger-structure' into upgrade-to-newer-rules-ko…
BenHenning May 22, 2024
b6c3ebe
Merge branch 'upgrade-to-newer-rules-kotlin' into fix-build-time-kotl…
BenHenning May 22, 2024
d3cea44
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning May 22, 2024
da57feb
Address static check failures.
BenHenning May 22, 2024
32733a0
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 22, 2024
441e293
Move forward TODO fixes from #4937.
BenHenning May 23, 2024
2f1eed7
Remove unused view model bridge classes.
BenHenning May 23, 2024
0c96f8d
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning May 23, 2024
afde202
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 23, 2024
e57be5b
Rework CI workflow.
BenHenning May 24, 2024
a07d3a6
Address all reviewer comments.
BenHenning May 25, 2024
785d408
Pull in other warning fixes from #4886.
BenHenning May 26, 2024
7ccba36
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning May 26, 2024
f74d059
Pulled forward Gradle change from #4886.
BenHenning May 26, 2024
baa2c50
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 26, 2024
7951d46
Merge branch 'develop' into update-rules-jvm-external
BenHenning May 26, 2024
d4d8646
Merge branch 'develop' into update-rules-jvm-external
BenHenning May 27, 2024
b6cfd74
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 27, 2024
0468e81
Merge branch 'develop' into update-dagger-structure
BenHenning May 27, 2024
47ad078
Merge branch 'update-dagger-structure' into upgrade-to-newer-rules-ko…
BenHenning May 27, 2024
828e43e
Merge branch 'upgrade-to-newer-rules-kotlin' into fix-build-time-kotl…
BenHenning May 27, 2024
eda781e
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning May 27, 2024
82c530a
Down version to 1.6.10.
BenHenning May 27, 2024
05bc1c2
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 27, 2024
7c186c3
Merge branch 'develop' into upgrade-to-newer-rules-kotlin
BenHenning May 28, 2024
dffff83
Merge branch 'upgrade-to-newer-rules-kotlin' into fix-build-time-kotl…
BenHenning May 28, 2024
bc79bf7
Address review comment.
BenHenning May 29, 2024
2d3f5d5
Merge branch 'develop' into fix-build-time-kotlin-java-warnings
BenHenning May 29, 2024
bc98d27
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning May 29, 2024
bacbc2a
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning May 29, 2024
4b26fd5
Merge branch 'develop' into fix-build-time-kotlin-java-warnings
BenHenning Jun 3, 2024
fd69342
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning Jun 3, 2024
3dcc2ac
Merge branch 'develop' into fix-build-time-kotlin-java-warnings
BenHenning Jun 11, 2024
4cbf04c
Merge branch 'fix-build-time-kotlin-java-warnings' into upgrade-to-ko…
BenHenning Jun 11, 2024
f97c111
Add config for Kotlin warnings.
BenHenning Jun 11, 2024
e9ac7f3
Address reviewer comment.
BenHenning Jun 11, 2024
c1d6959
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Jun 11, 2024
3b682f0
Address lint failures.
BenHenning Jun 11, 2024
9af2662
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Jun 11, 2024
89a184d
Merge branch 'develop' into upgrade-to-kotlin1.6
BenHenning Jun 12, 2024
cae201f
Merge branch 'upgrade-to-kotlin1.6' into add-build-stats-ci-workflow
BenHenning Jun 12, 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
8 changes: 8 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@ build --android_databinding_use_v3_4_args \
--define=android_standalone_dexing_tool=d8_compat_dx \
--android_databinding_use_androidx

# Ensure all built Java files treat warnings as errors (similar to the Kotlin configuration) to help
# reduce code smell & potential bugs during development.
build --javacopt="-Werror"

# Note that this doesn't stop 'Werror' from being passed above, but that shouldn't affect most of
# the Oppia Android-specific build.
build:ignore_build_warnings --//tools/kotlin:warn_mode=warning

# Show all test output by default (for better debugging).
test --test_output=all
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ WORKSPACE @oppia/android-app-infrastructure-reviewers
.bazelrc @oppia/android-app-infrastructure-reviewers
.bazelversion @oppia/android-app-infrastructure-reviewers
/tools/android/ @oppia/android-app-infrastructure-reviewers
/tools/kotlin/ @oppia/android-app-infrastructure-reviewers

# Configurations for Bazel-built Android App Bundles.
/bundle_config.pb.json @oppia/android-dev-workflow-reviewers
Expand Down
216 changes: 216 additions & 0 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
# Contains jobs corresponding to stats, including build stats due to changes in a PR.

name: Stats Checks & Reports

on:
workflow_dispatch:
schedule:
- cron: "30 02 * * *"

permissions:
pull-requests: write

jobs:
find_open_pull_requests:
name: Find open PRs
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.compute-pull-request-matrix.outputs.matrix }}
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4

- name: Compute PR matrix
id: compute-pull-request-matrix
# Remove spaces to ensure the matrix output is on one line. Reference:
# https://stackoverflow.com/a/3232433.
run: |
CURRENT_OPEN_PR_INFO="$(gh pr list --json number,baseRefName,headRefName,headRepository,headRepositoryOwner | tr -d '[:space:]')"
echo "matrix={\"prInfo\": $CURRENT_OPEN_PR_INFO}" >> "$GITHUB_OUTPUT"

build_stats:
name: Build Stats
needs: find_open_pull_requests
runs-on: ubuntu-20.04
# Reduce parallelization due to high build times, and allow individual PRs to fail.
strategy:
fail-fast: false
max-parallel: 5
matrix: ${{ fromJson(needs.find_open_pull_requests.outputs.matrix) }}
env:
ENABLE_CACHING: false
CACHE_DIRECTORY: ~/.bazel_cache
steps:
- name: Compute PR head owner/repo reference
env:
PR_HEAD_REPO: ${{ matrix.prInfo.headRepository.name }}
PR_HEAD_REPO_OWNER: ${{ matrix.prInfo.headRepositoryOwner.login }}
run: |
echo "PR_HEAD=$PR_HEAD_REPO_OWNER/$PR_HEAD_REPO" >> "$GITHUB_ENV"
- name: Print PR information for this run
env:
PR_BASE_REF_NAME: ${{ matrix.prInfo.baseRefName }}
PR_HEAD_REF_NAME: ${{ matrix.prInfo.headRefName }}
PR_NUMBER: ${{ matrix.prInfo.number }}
run: |
echo "PR $PR_NUMBER is merging into $PR_BASE_REF_NAME from https://github.com/$PR_HEAD branch $PR_HEAD_REF_NAME."

- name: Set up JDK 9
uses: actions/setup-java@v1
with:
java-version: 9

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0

# For reference on this & the later cache actions, see:
# https://github.com/actions/cache/issues/239#issuecomment-606950711 &
# https://github.com/actions/cache/issues/109#issuecomment-558771281. Note that these work
# with Bazel since Bazel can share the most recent cache from an unrelated build and still
# benefit from incremental build performance (assuming that actions/cache aggressively removes
# older caches due to the 5GB cache limit size & Bazel's large cache size).
- uses: actions/cache@v2
id: cache
with:
path: ${{ env.CACHE_DIRECTORY }}
key: ${{ runner.os }}-${{ env.CACHE_DIRECTORY }}-bazel-binary-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.CACHE_DIRECTORY }}-bazel-binary-
${{ runner.os }}-${{ env.CACHE_DIRECTORY }}-bazel-

# This check is needed to ensure that Bazel's unbounded cache growth doesn't result in a
# situation where the cache never updates (e.g. due to exceeding GitHub's cache size limit)
# thereby only ever using the last successful cache version. This solution will result in a
# few slower CI actions around the time cache is detected to be too large, but it should
# incrementally improve thereafter.
- name: Ensure cache size
env:
BAZEL_CACHE_DIR: ${{ env.CACHE_DIRECTORY }}
run: |
# See https://stackoverflow.com/a/27485157 for reference.
EXPANDED_BAZEL_CACHE_PATH="${BAZEL_CACHE_DIR/#\~/$HOME}"
CACHE_SIZE_MB=$(du -smc $EXPANDED_BAZEL_CACHE_PATH | grep total | cut -f1)
echo "Total size of Bazel cache (rounded up to MBs): $CACHE_SIZE_MB"
# Use a 4.5GB threshold since actions/cache compresses the results, and Bazel caches seem
# to only increase by a few hundred megabytes across changes for unrelated branches. This
# is also a reasonable upper-bound (local tests as of 2021-03-31 suggest that a full build
# of the codebase (e.g. //...) from scratch only requires a ~2.1GB uncompressed/~900MB
# compressed cache).
if [[ "$CACHE_SIZE_MB" -gt 4500 ]]; then
echo "Cache exceeds cut-off; resetting it (will result in a slow build)"
rm -rf $EXPANDED_BAZEL_CACHE_PATH
fi

- name: Configure Bazel to use a local cache
env:
BAZEL_CACHE_DIR: ${{ env.CACHE_DIRECTORY }}
run: |
EXPANDED_BAZEL_CACHE_PATH="${BAZEL_CACHE_DIR/#\~/$HOME}"
echo "Using $EXPANDED_BAZEL_CACHE_PATH as Bazel's cache path"
echo "build --disk_cache=$EXPANDED_BAZEL_CACHE_PATH" >> $HOME/.bazelrc
shell: bash

# This checks out the actual true develop branch separately to ensure that the stats check is
# run from the latest develop rather than the base branch (which might be different for
# chained PRs).
- name: Check out develop repository
uses: actions/checkout@v4
with:
path: develop

- name: Set up build environment
uses: ./develop/.github/actions/set-up-android-bazel-build-environment

- name: Check Bazel environment
run: |
cd develop
bazel info

- name: Check out base repository and branch
env:
PR_BASE_REF_NAME: ${{ matrix.prInfo.baseRefName }}
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.PR_BASE_REF_NAME }}
path: base

- name: Check out head repository and branch
env:
PR_HEAD_REF_NAME: ${{ matrix.prInfo.headRefName }}
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: ${{ env.PR_HEAD }}
ref: ${{ env.PR_HEAD_REF_NAME }}
path: head

# Note that Bazel is shutdown between builds since multiple Bazel servers will otherwise end
# up being active (due to multiple repositories being used) and this can quickly overwhelm CI
# worker resources.
- name: Build Oppia dev, alpha, beta, and GA (feature branch)
run: |
cd head
git log -n 1
bazel build -- //:oppia_dev //:oppia_alpha //:oppia_beta //:oppia_ga
cp bazel-bin/oppia_dev.aab ../develop/oppia_dev_with_changes.aab
cp bazel-bin/oppia_alpha.aab ../develop/oppia_alpha_with_changes.aab
cp bazel-bin/oppia_beta.aab ../develop/oppia_beta_with_changes.aab
cp bazel-bin/oppia_ga.aab ../develop/oppia_ga_with_changes.aab
bazel shutdown

- name: Build Oppia dev, alpha, beta, and GA (base branch)
run: |
cd base
git log -n 1
bazel build -- //:oppia_dev //:oppia_alpha //:oppia_beta //:oppia_ga
cp bazel-bin/oppia_dev.aab ../develop/oppia_dev_without_changes.aab
cp bazel-bin/oppia_alpha.aab ../develop/oppia_alpha_without_changes.aab
cp bazel-bin/oppia_beta.aab ../develop/oppia_beta_without_changes.aab
cp bazel-bin/oppia_ga.aab ../develop/oppia_ga_without_changes.aab
bazel shutdown

- name: Run stats analysis tool (develop branch)
run: |
cd develop
git log -n 1
bazel run //scripts:compute_aab_differences -- \
$(pwd)/brief_build_summary.log $(pwd)/full_build_summary.log \
dev $(pwd)/oppia_dev_without_changes.aab $(pwd)/oppia_dev_with_changes.aab \
alpha $(pwd)/oppia_alpha_without_changes.aab $(pwd)/oppia_alpha_with_changes.aab \
beta $(pwd)/oppia_beta_without_changes.aab $(pwd)/oppia_beta_with_changes.aab \
ga $(pwd)/oppia_ga_without_changes.aab $(pwd)/oppia_ga_with_changes.aab

# Reference: https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file.
# Also, for multi-line env values, see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings.
- name: Extract reports for uploading & commenting
env:
PR_NUMBER: ${{ matrix.prInfo.number }}
id: compute-comment-body
run: |
{
echo 'comment_body<<EOF'
cat $GITHUB_WORKSPACE/develop/brief_build_summary.log
echo EOF
} >> "$GITHUB_OUTPUT"
FULL_BUILD_SUMMARY_FILE_NAME="full_build_summary_pr_$PR_NUMBER.log"
FULL_BUILD_SUMMARY_FILE_PATH="$GITHUB_WORKSPACE/develop/$FULL_BUILD_SUMMARY_FILE_NAME"
echo "FULL_BUILD_SUMMARY_FILE_NAME=$FULL_BUILD_SUMMARY_FILE_NAME" >> "$GITHUB_ENV"
echo "FULL_BUILD_SUMMARY_FILE_PATH=$FULL_BUILD_SUMMARY_FILE_PATH" >> "$GITHUB_ENV"
cp "$GITHUB_WORKSPACE/develop/full_build_summary.log" "$FULL_BUILD_SUMMARY_FILE_PATH"

- name: Add build stats summary comment
env:
PR_NUMBER: ${{ matrix.prInfo.number }}
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ env.PR_NUMBER }}
body: ${{ steps.compute-comment-body.outputs.comment_body }}

- uses: actions/upload-artifact@v2
with:
name: ${{ env.FULL_BUILD_SUMMARY_FILE_NAME }}
path: ${{ env.FULL_BUILD_SUMMARY_FILE_PATH }}
63 changes: 48 additions & 15 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ This file lists and imports all external dependencies needed to build Oppia Andr

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")
load("//:build_vars.bzl", "BUILD_SDK_VERSION", "BUILD_TOOLS_VERSION")
load("//third_party:versions.bzl", "HTTP_DEPENDENCY_VERSIONS", "MAVEN_REPOSITORIES", "get_maven_dependencies")

# Android SDK configuration. For more details, see:
# https://docs.bazel.build/versions/master/be/android.html#android_sdk_repository
# TODO(#1542): Sync Android SDK version with the manifest.
android_sdk_repository(
name = "androidsdk",
api_level = 33,
build_tools_version = "29.0.2",
api_level = BUILD_SDK_VERSION,
build_tools_version = BUILD_TOOLS_VERSION,
)

# Oppia's backend proto API definitions.
Expand Down Expand Up @@ -42,17 +43,22 @@ http_archive(
# Add support for Kotlin: https://github.com/bazelbuild/rules_kotlin.
http_archive(
name = "io_bazel_rules_kotlin",
patches = ["//tools/kotlin:add_kotlinc_optin_support.patch"],
sha256 = HTTP_DEPENDENCY_VERSIONS["rules_kotlin"]["sha"],
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/%s/rules_kotlin_release.tgz" % HTTP_DEPENDENCY_VERSIONS["rules_kotlin"]["version"]],
)

load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories")
load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories", "kotlinc_version")

kotlin_repositories()

load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")
# Use the 1.6 compiler since rules_kotlin 1.5 defaults to the 1.5 compiler.
kotlin_repositories(
compiler_release = kotlinc_version(
release = "1.6.10",
sha256 = "432267996d0d6b4b17ca8de0f878e44d4a099b7e9f1587a98edc4d27e76c215a",
),
)

kt_register_toolchains()
register_toolchains("//tools/kotlin:kotlin_16_jdk9_toolchain")

# The proto_compiler and proto_java_toolchain bindings load the protos rules needed for the model
# module while helping us avoid the unnecessary compilation of protoc. Referecences:
Expand Down Expand Up @@ -141,18 +147,25 @@ git_repository(

git_repository(
name = "android-spotlight",
commit = "ebde38335bfb56349eae57e705b611ead9addb15",
commit = "cc23499d37dc8533a2876e45b5063e981a4583f4",
remote = "https://github.com/oppia/android-spotlight",
shallow_since = "1668824029 -0800",
shallow_since = "1680147372 -0700",
)

# A custom fork of KotliTeX that removes resources artifacts that break the build, and updates the
# min target SDK version to be compatible with Oppia.
git_repository(
name = "kotlitex",
commit = "43139c140833c7120f351d63d74b42c253d2b213",
commit = "ccdf4170817fa3b48b8e1e452772dd58ecb71cf2",
remote = "https://github.com/oppia/kotlitex",
shallow_since = "1675741075 -0800",
shallow_since = "1679426649 -0700",
)

git_repository(
name = "archive_patcher",
commit = "d1c18b0035d5f669ddaefadade49cae0748f9df2",
remote = "https://github.com/oppia/archive-patcher",
shallow_since = "1642022460 -0800",
)

bind(
Expand Down Expand Up @@ -199,6 +212,7 @@ maven_install(
maven_install_json = "//third_party:maven_install.json",
override_targets = {
"com.google.guava:guava": "@//third_party:com_google_guava_guava",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm": "@//third_party:kotlinx-coroutines-core-jvm",
},
repositories = DAGGER_REPOSITORIES + MAVEN_REPOSITORIES,
strict_visibility = True,
Expand All @@ -208,13 +222,32 @@ load("@maven//:defs.bzl", "pinned_maven_install")

pinned_maven_install()

[
http_jar(
name = "guava_%s" % guava_type,
sha256 = HTTP_DEPENDENCY_VERSIONS["guava_%s" % guava_type]["sha"],
urls = [
"{0}/com/google/guava/guava/{1}-{2}/guava-{1}-{2}.jar".format(
url_base,
HTTP_DEPENDENCY_VERSIONS["guava_%s" % guava_type]["version"],
guava_type,
)
for url_base in DAGGER_REPOSITORIES + MAVEN_REPOSITORIES
],
)
for guava_type in [
"android",
"jre",
]
]

http_jar(
name = "guava_android",
sha256 = HTTP_DEPENDENCY_VERSIONS["guava_android"]["sha"],
name = "kotlinx-coroutines-core-jvm",
sha256 = HTTP_DEPENDENCY_VERSIONS["kotlinx-coroutines-core-jvm"]["sha"],
urls = [
"{0}/com/google/guava/guava/{1}-android/guava-{1}-android.jar".format(
"{0}/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/{1}/kotlinx-coroutines-core-jvm-{1}.jar".format(
url_base,
HTTP_DEPENDENCY_VERSIONS["guava_android"]["version"],
HTTP_DEPENDENCY_VERSIONS["kotlinx-coroutines-core-jvm"]["version"],
)
for url_base in DAGGER_REPOSITORIES + MAVEN_REPOSITORIES
],
Expand Down
Loading
Loading