Github actions CI for mason packages

Hi there,

I'm currently writing a couple of libraries and I was wondering whether there is some support for github actions integration with mason packages. Basically, I would like the CI to automatically run mason test whenever I push to a branch (or to a PR or similar). Some integration with codecov could also be nice, but not that critical. Is anyone aware of a CI.yml template to achieve this?

Hi Luca —

That is a very cool idea but, to my knowledge, not something that anyone has done with mason... yet (someone should correct me if I'm mistaken).

If there are things on the Chapel side that would enable (or simplify) such support, please feel free to file a feature request for it on our GitHub.


Thanks for the answer. To my understanding (but to be clear, I am no expert on the topic), supporting this would require to create an action that setups chapel and runs the tests, github has some docs about this, don't know how tricky to actually implement though :smiley: I'll open an issue about this to better discus the technicalities

Hi Luca —

For our own development purposes, we have some Chapel GitHub actions that do various quick-ish Chapel builds and tests as part of our PR validation (including a build and possibly simple test of mason itself?), so it seems likely to me that there is existing code that could be leveraged and customized for this purpose. To my knowledge, we've never done anything to try and bundle it up or codify it for end-user use, so it's probably not in a very user-friendly form at present. That said, I haven't had the chance to learn about GitHub actions myself much, so am tagging @ronawho who I think has done the most with us on our team (though others could probably help as well).


1 Like

for the interested readers of this discussion, here is the follow-up github issue

1 Like

Hi @lucaferranti . I am running mason test in a GitHub action pipeline . Have a look.

It downloads clang, installs chapel from sources, compiles those sources and runs mason test. I would have to say it is very slow, but it works.

I hope this can hjelp you adopt your own pipeline.

1 Like

Hi @ahysing ,

thank you very much for sharing your gh action. With some help from the issue I opened above, I ended app with the following yaml-file

That works well (as far as I know) for testing on the released versions, which have a docker image on dockerhub. However as nightly versions don't have a docker image and I'd like to also run the workflow on nightly (so that I can detect and react on time if something is going to break). I suspect your yaml file solves my problem :slight_smile:

hi again @lucaferranti

Now that i I understand your need I thought how this problem can be solved. I assume you want to be able to run your tests quickly on your latest stable release and also with the next upcoming chapel release. Hopefully you want to run the next upcoming chapel release every night on a schedule.

I would have to say. Your solution CI.yaml is the best one I have seen so far. I it is fast and stable.

Running tests on current chapel 1.27.0

However I feel that i loose some of the tight control when I run chapel with docker. I just don't understand how my chapel codde are mapped into the docker container on the build agent. So i did an experiment with chapel installed through homebrew, and it ended up in with chapel-current.yaml
I was very disappointed that this apporach spends a full 5 minutes installing chapel with dependancies.

Running tests on chapel 1.28.0

I also wanted to see if I could build and run my tests on the latest source code of chapel. So I packed together an approach with git clone on the chapel compiler sources followed by compile and run on the code I build. Also note that I install clang 18 as a first step, and stick it into a cache for future runs.
This approach is just as slow as before. It still spends 11 minutes copiling and runnig, but it works.

Here it is

Now I run on chapel 1.28. I am happy

1 Like