postgres
postgres copied to clipboard
ci: Add feature to use different meson versions
We want to have a branch that uses a specific branch of meson for all tasks. Then, we can create a Cirrus cron "job" that tests Postgres againts different meson branches.
Set a different meson branch by using MESON_REPO
and MESON_BRANCH
environment variables. Use a bash script to install this specific meson branch and rebase current Postgres branch onto Postgres HEAD.
Fixes #81.
https://github.com/anarazel/pg-vm-images/pull/70 needs to be merged first.
I pushed this with a commit to run on 'pg-ci-images-dev' project since https://github.com/anarazel/pg-vm-images/pull/70 didn't run on 'pg-ci-images' yet. After https://github.com/anarazel/pg-vm-images/pull/70 is merged, I will push this without "run on 'pg-ci-images-dev'" commit.
I just tested it for the new meson version about to be released - very useful!
I got one failure that i'm somewhat confused by: https://cirrus-ci.com/task/6190199437262848?logs=configure#L8 that doesn't seem related to the new meson version, but doesn't happen otherwise?
An improvement for this would be to list which commit we rebased onto: https://cirrus-ci.com/task/6190199437262848?logs=install_meson_and_rebase#L46 doesn't allow to figure that out:
[21:31:59.899] + git remote add default-postgres https://github.com/postgres/postgres.git
[21:31:59.930] + git fetch default-postgres master
[21:32:04.399] From https://github.com/postgres/postgres
[21:32:04.399] * branch master -> FETCH_HEAD
[21:32:04.399] * [new branch] master -> default-postgres/master
[21:32:04.415] + git rebase --no-verify default-postgres/master
[21:32:05.879] Rebasing (1/1)
Successfully rebased and updated detached HEAD.
Something like
echo Rebasing onto: $(git show --no-patch --abbrev-commit --pretty=oneline default-postgres/master)
maybe?
I got one failure that i'm somewhat confused by: https://cirrus-ci.com/task/6190199437262848?logs=configure#L8 that doesn't seem related to the new meson version, but doesn't happen otherwise?
I found the cause and fixed it. It seems rebase part changing file endings to CLRF on Windows, I added git config core.autocrlf false
.
Also, I realized that CI only collects *.diffs
files but sometimes diff logs are written in *.diff
files (for example pg_bsd_indent). It can be fixed by editing on_failure parts but I couldn't decide between editing on_failure parts and changing *.diff to *.diffs.
Something like
echo Rebasing onto: $(git show --no-patch --abbrev-commit --pretty=oneline default-postgres/master)
Added.
I got one failure that i'm somewhat confused by: https://cirrus-ci.com/task/6190199437262848?logs=configure#L8 that doesn't seem related to the new meson version, but doesn't happen otherwise?
I found the cause and fixed it. It seems rebase part changing file endings to CLRF on Windows, I added
git config core.autocrlf false
.
Great.
Also, I realized that CI only collects
*.diffs
files but sometimes diff logs are written in*.diff
files (for example pg_bsd_indent). It can be fixed by editing on_failure parts but I couldn't decide between editing on_failure parts and changing *.diff to *.diffs.
Heh, yea, I noticed that too and even wrote an email about it: https://www.postgresql.org/message-id/20230711233307.hu4wetabjm5f7ver%40awork3.anarazel.de and am planning to rename the file.
Something like
echo Rebasing onto: $(git show --no-patch --abbrev-commit --pretty=oneline default-postgres/master)
Added.
Thanks!