RUMM-2845: Speed up build of sample app for CodeQL scan#1221
Conversation
| # Manually build the java bytecode | ||
| - name: Execute Gradle build | ||
| run: ./gradlew assemble | ||
| run: ./gradlew assemble -Pcodeql-build |
There was a problem hiding this comment.
Instead of making this conditonal in the sample project, we could limit this script to run the assemble tasks on the library content only. The codeql check is only mandatory for code distributed to our customers' apps
There was a problem hiding this comment.
I was thinking we can also cover the binaries which can be built in the customer environment by cloning this repository, not only releasable artifacts. With the current change it seems overall CodeQL analysis takes the same time as other stages (the slowest is Bitrise), so at least we are not making overall checks timeline slower.
But yes, we can push it more by ignoring non-releasable content. WDYT?
There was a problem hiding this comment.
Covering the samples and other non releasable contents don't really make sense, as no customer would publish our sample app on the store.
There was a problem hiding this comment.
Yes, I was more thinking about running "bad" binary (even for the sample app) in the customer internal environment, which still have a risk to be exploited.
I will update this PR to build only releasable artifacts.
Codecov Report✅ All modified and coverable lines are covered by tests. Please upload reports for the commit 30b1168 to get more accurate results. Additional details and impacted files@@ Coverage Diff @@
## develop #1221 +/- ##
===========================================
+ Coverage 82.30% 82.31% +0.02%
===========================================
Files 353 353
Lines 11799 11806 +7
Branches 2009 2010 +1
===========================================
+ Hits 9710 9718 +8
- Misses 1474 1475 +1
+ Partials 615 613 -2 🚀 New features to boost your workflow:
|
170b981 to
30b1168
Compare
What does this PR do?
Gradle build for the CodeQL scan take 35-40 minutes it seems, because all the variants ((
eu1,us1,us3,us5,us1_fed,staging) x (debug,release) = 12) are built (it takes majority of the build).To speed it up and still have a complete coverage of all the binaries which can be created in the customer environment (not only release artifacts, but also binaries which can be created by cloning this repo), let's build onlyus1flavor for sample app, because all DC flavors are the same code-wise.To speed it up we are going to build only releasable modules.
Review checklist (to be filled by reviewers)