keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
392 stars 109 forks source link

chore(common): add new PR control commands to manage builds #8361

Open mcdurdin opened 1 year ago

mcdurdin commented 1 year ago

It would be useful to be able to skip certain builds or do only builds without artifacts etc. Rationale: many of our minor changes are triggering many builds, and while this is a good default, we can reduce the burden on the build agents by being a little more circumspect when we know certain platforms will not be impacted. We can also reduce the artifact burden and build times by skipping release builds when they are not needed.

These commands would override the defaults -- so you could force a build where it would not automatically run otherwise, for example. The following commands would be supported:

QUESTION: Do we need to support additional commands or parameters for commands? For example, Developer has a set of low-cost unit tests, plus a very long regression test suite (25+ minutes), which we could do with test(quick), test(full) and the default (test) would be test(quick). Something like that?

Multiple commands in a comment should be supported.

The following build targets should be defined:

QUESTION: Am I missing any? Perhaps the ability to specify platform for common + core would be helpful?

Multiple targets should be comma separated, suggest no spaces between to support future parameters.

The commands could be:

QUESTION: Should these commands be checked only on the initial comment on a PR, or on any comment? How do we resolve conflicting commands?

IDEA: reduce set of default builds, e.g. don't build Developer,Android,iOS if Web builds?

mcdurdin commented 1 year ago

Developer build time, rounded, things that could be eliminated during a shorter test build:

Time (min) Process
26:30 regression tests against keyboards repo (additional flag required?)
4:30 build installer
0:45 signcode
0:15 design-time packages
2:30 excess npm ci calls
1:15 upload artifacts
36:45 total skippable steps
47:45 total build time
11:00 new build time!
darcywong00 commented 1 year ago

The commands could be:

no -- don't build anything for this target

I was hoping we could reuse skip like with the test-bot. Otherwise, I can easily see my future self mixing up no/skip in my PRs...

mcdurdin commented 4 months ago

Suggest doing this as a commit message trailer instead of as a PR command. Ties the implementation to looking at the last commit which avoids a bunch of potential conflicts.

Keyman-build-bot: <command>