Subject: PSA: CI compile flags edition

From: [email-masked]
Date: Tue, 01 Mar 2016 17:08:47 +1100

Hey all,

Pursuant to Alan's comment¹ and subsequent follow-ons, in the 
interests of rapid CI turnaround Jenkins now does regular CI runs with 
DEB_BUILD_OPTIONS=noopt. This currently means it does an -O0 build, and 
will disable LTO when that lands.

These changes don't apply to the pre-autolanding builds; they will 
continue to be run with the standard Debian optimisations (-O2) and 
with LTO (again, once that lands).

For those playing at home, the relevant parameter is 
$run_landing_checks on build-2-binpkg-mir if you've got any other 
checks that should be enabled prior to landing but not every CI run.

¹: 
https://code.launchpad.net/~raof/mir/fix-and-enable-lto/+merge/282133/comments/733096

---

From: Alexandros Frantzis <[email-masked]>
Date: Wed, 2 Mar 2016 19:58:44 +0200

On Tue, Mar 01, 2016 at 05:08:47PM +1100, [email-masked] wrote:
> Hey all,
> 
> Pursuant to Alan's comment¹ and subsequent follow-ons, in the interests of
> rapid CI turnaround Jenkins now does regular CI runs with
> DEB_BUILD_OPTIONS=noopt. This currently means it does an -O0 build, and will
> disable LTO when that lands.
> 
> These changes don't apply to the pre-autolanding builds; they will continue
> to be run with the standard Debian optimisations (-O2) and with LTO (again,
> once that lands).
> 
> For those playing at home, the relevant parameter is $run_landing_checks on
> build-2-binpkg-mir if you've got any other checks that should be enabled
> prior to landing but not every CI run.
> 
> ¹: https://code.launchpad.net/~raof/mir/fix-and-enable-lto/+merge/282133/comments/733096

Thanks Chris!

I noticed that after the LTO branch landed, the mir-ci jobs started
taking longer, which is not consistent with disabling optimizations and
LTO.

It turned out there was a misconfiguration in the build-mir job, causing
$run_landing_checks to always be true in all invocations of
build-2-binpkg-mir. I corrected the problem and it had the effect we
want on non-cross builds (e.g., see [1] vs [2]).

Unfortunately, the problem persists on cross builds (e.g., see [3]), due
to an sbuild peculiarity/bug: when cross building, sbuild overwrites
DEB_BUILD_OPTIONS (setting it to "nocheck"). See the the debian bug
report [4] for more info.

I will investigate a few potential workarounds tomorrow (unless someone
else gets to it first).

[1] https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/306/arch=amd64,compiler=gcc,platform=mesa,release=xenial/consoleFull
[2] https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/307/arch=amd64,compiler=gcc,platform=mesa,release=xenial/consoleFull
[3] https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/307/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/consoleFull
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775539

---

From: Alexandros Frantzis <[email-masked]>
Date: Thu, 3 Mar 2016 11:24:00 +0200

> I will investigate a few potential workarounds tomorrow (unless someone

Cross building is now fixed (see [1]) using a workaround in ~/.sbuildrc.
I have also added the fix to the preparation jobs, so it will be applied
automatically if we need to redeploy.

[1] https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/313/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/consoleFull