<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>Hi Johannes,</div>
<br>
<div>I'm just proposing this as a temporary solution until we are inside the monorepo and using LLVM's existing infrastructure in general. We just wanted a quick and easy way to get CI up and running without provisioning our own machines.</div>
<div>I couldn't see a way of using the LLVM buildbot infrastructure as an external project (i.e. a project not inside the LLVM repo) but I may have missed something, please let me know if I have!</div>
<br>
<div>David Truby</div>
<br>
<div class="gmail_quote_attribution">On Nov 11 2019, at 6:56 pm, Doerfert, Johannes <jdoerfert@anl.gov> wrote:</div>
<blockquote>
<div>
<div>First, thanks for working on this!</div>
<br>
<div>Did you consider setting up buildbot instances, as the public facing</div>
<div>LLVM testing infrastructure does? I don't think they need to be</div>
<div>externally accessible but all we care about is the reports (with log</div>
<div>files) that they send to http://lab.llvm.org:8011/ .</div>
<br>
<div>Cheers,</div>
<div>Johannes</div>
<br>
<br>
<div>On 11/11, David Truby via flang-dev wrote:</div>
<blockquote>
<div>Hi all,</div>
<div>I have been investigating the possibility of adding testing infrastructure to F18 on github, I have covered here the rationale and results of my investigation, and would appreciate some thoughts/feedback on whether this is something we want to move forward
 with.</div>
<br>
<div># Rationale</div>
<br>
<div>F18 currently has no testing infrastructure upstream. This has led to a few issues with certain additions breaking builds on certain compilers. Since it is unrealistic to expect developers to test with every compiler we claim to support, some testing infrastructure
 should be in place to catch these issues. Such a measure would be a stop-gap until F18 is fully integrated into the upstream LLVM infrastructure, which has its own testing.</div>
<br>
<div># Investigated Services</div>
<br>
<div>A number of possible options were investigated for use as a CI service</div>
<div>for F18, but investigation focused on the following services:</div>
<div>* Travis CI</div>
<div>* Shippable</div>
<div>* Jenkins</div>
<div>* Drone CI</div>
<br>
<div>Since F18 is an upstream open source project, the preference was to attempt to use an externally accessible CI service rather than running a service internally on Arm servers; this discounted Jenkins as it requires self-hosting. Initially Travis seemed
 promising as it is a commonly used service that is free for open source projects. However, Travis only gives access to test nodes with 2 CPU cores, 8GB of RAM and a 30 minute time limit: this is not sufficient for building F18.</div>
<br>
<div>Shippable had similar issues due to having the same constraints on resources, however Shippable does allow a "bring your own node" mode where custom machines can be added to the CI for testing, similar to LLVM’s buildbot. This would require provisioning
 nodes for CI though, and since this is a temporary measure it would be best to avoid that if possible.</div>
<br>
<div>Drone CI is a newer service, and is less widely used and therefore less well documented than the other services investigated. However, the Drone cloud service is free for open source software and gives access to entire bare metal AMD and Arm nodes provided
 by packet.com. This allows F18 to be built in a more reasonable time, making it feasible to use this for F18’s CI.</div>
<br>
<div># Drone CI</div>
<br>
<div>For the reasons listed above, Drone CI was selected for further investigation. It turned out to be fairly easy to add multiple build configurations to the drone .star file, and get pre-commit working with run times of around 10 minutes. Currently this
 has been tested with clang-9/libc++ and gcc-9 on both amd64 and arm64. Other compilers and configurations can be added easily, so a discussion should be had as to what we want to actually test for.</div>
<br>
<div># User-facing consequences</div>
<br>
<div>I have implemented support for this CI on my own branch of f18 to check what the user-facing consequences of this look like. CI results are reported through the github UI, in two separate places: firstly, when a PR is submitted, on the PR review page a
 notification will appear that CI is running, and will be updated to state whether the tests passed or failed. A link is given to the run on cloud.drone.io so that you can see which platform/compiler failed, and what the failure output was. Additionally, after
 merging a PR, CI will run on the merged commit, and give a notification if it fails.</div>
<br>
<div>Currently these pre- and post-commit runs run the same number of tests, as none of the f18 tests take very long to run. In future it would be possible to separate the tests into short and long tests, as LLVM does, and run the long tests only after merging.
 However since this is a stop-gap measure until we move to LLVM’s testing infrastructure this might never be necessary.</div>
<br>
<div>It is possible to also set up emails to this mailing list (or a separate mailing list) with post-commit test failures if this is something that people would find useful.</div>
<br>
<div># Next steps</div>
<br>
<div>If this is something we want to go ahead with, the next step is for me to submit a PR with the required CI configuration file. Once this is merged, someone with commit access will need to log in with their github account to cloud.drone.io and activate
 CI for F18; this should be as simple as pressing a single activate button next to the repository name, however it may be necessary to change a couple of settings as well. After the CI has been activated on drone, the results should appear automatically in
 the github UI as mentioned above.</div>
<br>
<div>Please let me know what you think.</div>
<div>David Truby</div>
</blockquote>
<br>
<blockquote>
<div>_______________________________________________</div>
<div>flang-dev mailing list</div>
<div>flang-dev@lists.llvm.org</div>
<div>https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</div>
</blockquote>
<br>
<br>
<div>--</div>
<br>
<div>Johannes Doerfert</div>
<div>Researcher</div>
<br>
<div>Argonne National Laboratory</div>
<div>Lemont, IL 60439, USA</div>
<br>
<div>jdoerfert@anl.gov</div>
</div>
</blockquote>
</body>
</html>