postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Add test of meson upstream versions

Open anarazel opened this issue 2 years ago • 7 comments

I'd like to have a (perpetual) branch that modifies .cirrus.yml to use a specific branch of meson for all tasks. Then I'd like to create a cirrus cron "job" that tests at least meson's master branch and the newest "minor release" branch on a regular basis.

A good starting point would be to add something like https://github.com/anarazel/postgres/commit/5bac378f56a41a2e2216186f8a6aa56b5a919f24 to a central place and use it in all tasks. It should use a variable to describe the specific repo + version to install though.

A second step will be to allow that variable to be set from a the cron job's definition. I don't know the precedence of cirrus variables between cron job and job definition, that might make it easier or harder.

anarazel avatar Mar 27 '23 17:03 anarazel

I implemented something like this: 5808e628b04dec8460ce3df6dda11d94897c7085. CI run shows it uses latest meson. You can override 'MESON_REPO' and 'MESON_BRANCH' variables from Cirrus CI repository settings page to set different repos and branches but I am not sure how to set them from cron job's definition.

Does something like that work?

nbyavuz avatar Mar 28 '23 15:03 nbyavuz

Yes, that's going in the right direction!

Why are you cloning meson on unix? You should be able to use use the "pip install git+https://github.com/meson/meson@master" approach there as well? Then all the meson invocations don't need to be modified.

The other aspect I'd like to see is for the branch to rebase itself onto postgres HEAD. Likely you'd need to git remote add, git fetch etc. to do that.

anarazel avatar Mar 28 '23 18:03 anarazel

Why are you cloning meson on unix? You should be able to use use the "pip install git+https://github.com/meson/meson@master" approach there as well? Then all the meson invocations don't need to be modified.

There are couple of unix instances and each one has different command for installing pip and meson.

nbyavuz avatar Mar 29 '23 07:03 nbyavuz

There are couple of unix instances and each one has different command for installing pip and meson.

Re pip: We don't already have pip installed in them? Or is the issue that the installed script wrappers are not in PATH?

Re meson: I don't see how the command for installing meson matters, given that we'd be installing it via pip?

I really would like to reduce the change to existing statements for this change, otherwise we'll constantly deal with conflicts...

anarazel avatar Mar 29 '23 16:03 anarazel

Re pip: We don't already have pip installed in them? Or is the issue that the installed script wrappers are not in PATH?

I checked only FreeBSD and pip wasn't installed. I need to double check whether it is related to PATH or not.

Re meson: I don't see how the command for installing meson matters, given that we'd be installing it via pip?

For the FreeBSD it was pip-{pip_version} but we can create symbolic links.

I think we can implement these stuff while creating the images.

nbyavuz avatar Mar 29 '23 16:03 nbyavuz

Re pip: We don't already have pip installed in them? Or is the issue that the installed script wrappers are not in PATH?

I checked only FreeBSD and pip wasn't installed. I need to double check whether it is related to PATH or not.

I double checked and confirmed pip wasn't installed on FreeBSD. I created a script and moved commands to the there for minimizing conflicts. It installs meson and rebases itself onto Postgres head.

Commit: 09a0a119a65f3f122be9217792d1f4ca402e19aa CI Run: https://cirrus-ci.com/build/6288442863124480

nbyavuz avatar Mar 30 '23 14:03 nbyavuz

Can you open a PR?

I'd still like to get rid of all the changes doing s/meson/${MESON}/ due to the likelihood of conflicts that introduces. I don't think they are required with your script approach?

anarazel avatar Apr 02 '23 16:04 anarazel