ldc-developers / ldc2.snap

Snap package definition for LDC, the LLVM-based D compiler
11 stars 4 forks source link

Add basic CI support for Azure Pipelines #66

Closed WebDrake closed 5 years ago

WebDrake commented 5 years ago

Since snapd is available in the Azure Ubuntu 16.04 image, we might as well keep it simple, install snapcraft as a snap package and run it.

This should pretty much match what happens on Launchpad, apart from the lack of LXD container.

WebDrake commented 5 years ago

Ooo, this is looking nice -- both snap and systemctl available. Let's add a few more checks ...

WebDrake commented 5 years ago

This last patch is looking promising, although I think it would be helpful to add set -x to the build script to ensure commands are output to the log ...

WebDrake commented 5 years ago

... done. Let's see how this does. It will be VERY amusing if success is really as simple as it seems, when compared against CircleCI :-P

WebDrake commented 5 years ago

The setup was apparently fine apart from the default timeout killing us after 60 minutes. Given build times from Launchpad I've disabled the timeout entirely (meaning the build will continue until it hits Microsoft's hard upper limit of 360 minutes, which hopefully should not happen). Unfortunately this requires making the YAML config a little more involved, explicitly specifying jobs:, but it's still extremely simple.

If there is still an issue then most likely we can return to the idea of disabling or reducing the tests, as these (apart from the LLVM build) take up the bulk of the build time.

WebDrake commented 5 years ago

What may be worth checking out if this version succeeds is whether we can split the snapcraft calls down into smaller chunks, i.e. snapcraft build llvm, snapcraft build ldc-bootstrap, and the final snapcraft call that builds LDC and ties everything up.

WebDrake commented 5 years ago

Ah damn, I think this is going to fail once it gets to the tests stage, as it's failed to install lit correctly. I think this should be fixable by adding python-wheel as a build-package.

WebDrake commented 5 years ago

... or maybe, if we're lucky, not: I forgot we'd disabled the lit tests, since they were highly flaky in the snapcraft build context. But this might mean we ought to drop the installation of lit and anything else not needed by the tests we actually run.

WebDrake commented 5 years ago

OK, so this works. @kinke any concerns from your side with the current setup? Otherwise I'll take this in and get on with the real packaging changes that I've been wanting to pursue.

kinke commented 5 years ago

Nope, looks good to me.