Closed Bug 1328164 Opened 7 years ago Closed 5 years ago

Support |ac_add_options --enable-artifact-builds| / build mode which doesn't require compilation and linking for changes in static files (JS,HTML,XML,XUL)

Categories

(MailNews Core :: Build Config, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 69.0

People

(Reporter: aryx, Assigned: darktrojan)

References

()

Details

Attachments

(3 files, 2 obsolete files)

Support |ac_add_options --enable-artifact-builds| / build mode which doesn't require compiling and linking for changes in static files (JS,HTML,XML,XUL). Unchanged artifacts should be downloaded from a server.

Bug 901840 added this for Firefox.

Comparison on a Windows machine for a Firefox build after clobber:

without artifact mode: >42 minutes
with artifact mode: <3 minutes

And |mach build faster| after that takes only 6 seconds.
See bug 1279781 for a previous attempt to get mach build faster going. Bug 901840 has a lot of dependencies. Do you happen to have a tl;dr version of what needs to be changed in Thunderbird?
I'm assigning myself this bug as I have something approaching what could be considered "working". I'm going to need to make some changes on mozilla-central and there's also some things on comm-central that break the build.

My current changes needed are here: https://gist.github.com/darktrojan/4e24e58658a682a9d34be408dec7c852
Assignee: nobody → geoff
Depends on: 1442851
Depends on: 1444219
Depends on: 1444220
Assignee: geoff → nobody

After many attempts, I have a working Try build. Start-to-finish time: 44 minutes, which would be much less if the decision task didn't take 8 minutes (I think this is because I used a modified mozilla-* tree).

Assignee: nobody → geoff
Status: NEW → ASSIGNED

The next step is to get bug 1444220 fixed.

This is part one of two. In it I change the mozconfig files so that Try server jobs with --artifact do as expected, and fix up Mac and Windows packaging so that things work correctly in both types of builds.

Attachment #9072577 - Flags: review?(rob)
Comment on attachment 9072577 [details] [diff] [review]
1328164-artifact-config-1.diff [landed in comment #11]

Scratch that, it's decided to break again. Bah!
Attachment #9072577 - Attachment is obsolete: true
Attachment #9072577 - Flags: review?(rob)
Attached patch 1328164-artifact-config-2.diff (obsolete) — Splinter Review

Same again, but also with win32 working. I forgot I hadn't done win32, as linux32 artifact builds just don't work, and mac doesn't have 32-bit any more.

Attachment #9072584 - Flags: review?(rob)
Comment on attachment 9072584 [details] [diff] [review]
1328164-artifact-config-2.diff

Okay, I give up on win32, it's broken as well. Back to patch one, sorry about the noise.
Attachment #9072584 - Attachment is obsolete: true
Attachment #9072584 - Flags: review?(rob)
Attachment #9072577 - Attachment is obsolete: false
Attachment #9072577 - Flags: review?(rob)
Attached patch 1328164-artifact-calendar-1.diff (obsolete) — Splinter Review

Part two of two, calendar.

These changes would be mostly unnecessary if it weren't for this problem which makes an artifact build of Lightning unusable. (In a nutshell, the code which compiles a single chrome.manifest for the extension doesn't run in an artifact build without XPI_NAME, but having XPI_NAME and DIST_SUBDIR at the same time produces an even worse result. Instead, we specify XPI_NAME and after the build, copy the files from dist/xpi-stage/lightning to dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}.)

This is almost the simplest set of changes I could make that enable both types of build. There's a lot more cleaning up to do but right now I just want to get things moving.

Attachment #9072601 - Flags: review?(philipp)
Comment on attachment 9072577 [details] [diff] [review]
1328164-artifact-config-1.diff [landed in comment #11]

Review of attachment 9072577 [details] [diff] [review]:
-----------------------------------------------------------------

It all looks reasonable enough to me.
Attachment #9072577 - Flags: review?(rob) → review+
Keywords: leave-open
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3a3901fff903
Enable artifact builds, part 1: build config; r=rjl

Here's a slightly different version that symlinks Lightning from dist/xpi-stage to dist/bin instead of copying it, which makes development much less annoying.

Attachment #9072601 - Attachment is obsolete: true
Attachment #9072601 - Flags: review?(philipp)
Attachment #9073710 - Flags: review?(philipp)

I found out something I wish I had known earlier: on mozilla-central, packaging errors are ignored for artifact builds. That's helpful for situations like we currently have with bug 1560545.

Since this bug is still open, I'm reusing it, so this is part three of two.

Attachment #9074132 - Flags: review?(rob)
Comment on attachment 9074132 [details] [diff] [review]
1328164-ignore-package-errors-1.diff [landed in comment #15]

Review of attachment 9074132 [details] [diff] [review]:
-----------------------------------------------------------------

Neat!
Attachment #9074132 - Flags: review?(rob) → review+
Keywords: checkin-needed
Attachment #9072577 - Attachment description: 1328164-artifact-config-1.diff → 1328164-artifact-config-1.diff [landed in comment #11]

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/f046db4f15a1
Make packaging errors non-fatal for artifact builds. r=rjl

Keywords: checkin-needed
Target Milestone: --- → Thunderbird 69.0
Comment on attachment 9073710 [details] [diff] [review]
1328164-artifact-calendar-2.diff

Review of attachment 9073710 [details] [diff] [review]:
-----------------------------------------------------------------

I'm a bit weary of this patch,  if it were this simple why wouldn't someone have done this before in m-c? I'm ready to try it though.
Attachment #9073710 - Flags: review?(philipp) → review+
Keywords: leave-open
Attachment #9074132 - Attachment description: 1328164-ignore-package-errors-1.diff → 1328164-ignore-package-errors-1.diff [landed in comment #15]

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1afa90fe6710
Enable artifact builds, part 2: calendar packaging. r=philipp

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

(In reply to Philipp Kewisch [:Fallen] [:📆] from comment #16)

I'm a bit weary of this patch, if it were this simple why wouldn't someone
have done this before in m-c? I'm ready to try it though.

Which part?

(In reply to Geoff Lankow (:darktrojan) from comment #18)

(In reply to Philipp Kewisch [:Fallen] [:📆] from comment #16)

I'm a bit weary of this patch, if it were this simple why wouldn't someone
have done this before in m-c? I'm ready to try it though.

Which part?

I think it is fine. I was thinking that normally there was a hard split between dist/xpi-stage and dist/bin, but in hindsight I think they are symlinked anyway. I was thinking about that OSX dist thing where they actually copy in to dist/Daily.app/.. so there is a proper application bundle to run (which can't contain symlinks).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: