GSoC 2019 [Collect build statistics]

Mojca Miklavec mojca at macports.org
Mon Mar 11 17:58:38 UTC 2019


On Mon, 11 Mar 2019 at 09:18, Arjun Salyan via macports-dev wrote:
>
> I have a couple of doubts here:
>
> 1. Once I install mpstats does it still send weekly reports? I could not find the required code to do this in the port files. Code for manually submitting is available in mpstats.tcl but I am unable to locate the code for automating the submissions. What am I missing here?

Maybe try
    port contents mpstats
and check the files that MacPorts reports as belonging to mpstats.

> 2. I am completely new to Buildbot. I went though their website buildbot.net, I understand its functioning, but am not getting the practical approach. Can you give me a brief idea of how it is implemented with Macports? Like what are the events that are taking place and when?

Joshua already sent you the link to master.cfg which is the python
code that checks for new commits in the repository and starts the
builds. The other missing link might be
https://github.com/macports/mpbb, which are shell scripts used to
reduce the complexity of master.cfg (helper/convenience scripts
between buildbot and macports). The same scripts (mpbb) are used for
Travis and Azure pipelines.

(Joshua: I thought that buildbot watches the git repository on its
own, rather than listening to webhooks, but I might be wrong.)

The "results" are probably easiest to see here:
    https://build.macports.org/waterfall

In principle it goes as follows:

- something is pushed to git(hub)
- buildbot sees the commits and triggers a build on every "port
watcher" (on different macOS versions)
  - a list of modified ports is established
  - for each port that needs to be built
    - first the sources are fetched / mirrored (jobs-mirror)
    - then the port is built and uploaded to the server in multiple steps
  - buildbot also notifies GitHub whether the build was successful or
not (you'll see a green checkbox / red cross next to commits in
macports-ports commit history)

The build can also be triggered manually.

Sadly we are still using buildbot 0.8 rather than 2.x. The github
repository contains instructions for running a buildbot master and
slave locally on your machine, so that you can test things, as Joshua
suggested.

If something is not clear, please ask in more detail.

Mojca


More information about the macports-dev mailing list