CI and test improvements

Started by Justin Pryzbyover 3 years ago4 messages
#1Justin Pryzby
Justin Pryzby
pryzby@telsasoft.com
19 attachment(s)

I'm "joining" a bunch of unresolved threads hoping to present them better since
they're related and I'm maintaining them together anyway.

/messages/by-id/20220219234148.GC9008@telsasoft.com
- set TESTDIR from perl rather than Makefile
/messages/by-id/20220522232606.GZ19626@telsasoft.com
- ccache, MSVC, and meson
/messages/by-id/20220416144454.GX26620@telsasoft.com
- Re: convert libpq uri-regress tests to tap test
/messages/by-id/CA+hUKGLneD+q+E7upHGwn41KGvbxhsKbJ+M-y9nvv7_Xjv8Qog@mail.gmail.com
- Re: A test for replay of regression tests
/messages/by-id/20220409021853.GP24419@telsasoft.com
- cfbot requests

See the commit messages for more thread references.

I'm anticipating the need to further re-arrange the patch set - it's not clear
which patches should go first. Maybe some patches should be dropped in favour
of the meson project. I guess some patches will have to be re-implemented with
meson (msvc warnings).

I think there was some confusion about the vcregress "alltaptests" target.
I said that it's okay to add it and make cirrus use it (and that the buildfarm
could use it too). Andrew responded that the buildfarm wants to run different
tests separately. But Andres seems to have interpretted that as an objection
to the addition of an "alltaptests" target, which I think isn't what's
intended - it's fine if the buildfarm prefers not to use it.

Maybe the improvements to vcregress should go into v15 ? CI should run all the
tests (which also serves to document *how* to run all the tests, even if there
isn't a literal check-world target).

Attachments:

0015-msvc-do-not-install-libpq-test-tools-by-default.patchtext/x-diff; charset=us-ascii
0016-cirrus-code-coverage.patchtext/x-diff; charset=us-ascii
0001-cirrus-windows-add-compiler_warnings_script.patchtext/x-diff; charset=us-ascii
0002-cirrus-vcregress-test-modules-contrib-with-NO_INSTAL.patchtext/x-diff; charset=us-ascii
0003-set-TESTDIR-from-src-test-perl-rather-than-Makefile-.patchtext/x-diff; charset=us-ascii
0004-s-also-remove-PATH.patchtext/x-diff; charset=us-ascii
0017-cirrus-build-docs-as-a-separate-task.patchtext/x-diff; charset=us-ascii
0018-cirrus-upload-changed-html-docs-as-artifacts.patchtext/x-diff; charset=us-ascii
0019-f-html-index-file.patchtext/x-diff; charset=us-ascii
0005-cirrus-macos-enable-various-runtime-checks.patchtext/x-diff; charset=us-ascii
0006-cirrus-linux-compile-with-fsanitize.patchtext/x-diff; charset=us-ascii
0007-cirrus-windows-increase-timeout-to-25min.patchtext/x-diff; charset=us-ascii
0008-vcregress-add-alltaptests.patchtext/x-diff; charset=us-ascii
0009-tmp-run-tap-tests-first.patchtext/x-diff; charset=us-ascii
0010-vcregress-run-alltaptests-in-parallel.patchtext/x-diff; charset=us-ascii
0011-cirrus-make-DebugInformationFormat-OldStyle-for-CI-b.patchtext/x-diff; charset=us-ascii
0012-cirrus-windows-ccache.patchtext/x-diff; charset=us-ascii
0013-another-way-to-install-uri-regress-uri_regress.patchtext/x-diff; charset=us-ascii
0014-Move-libpq_pipeline-test-into-src-interfaces-libpq.patchtext/x-diff; charset=us-ascii
#2Justin Pryzby
Justin Pryzby
pryzby@telsasoft.com
In reply to: Justin Pryzby (#1)
20 attachment(s)
Re: CI and test improvements

On Sat, May 28, 2022 at 10:37:41AM -0500, Justin Pryzby wrote:

I'm "joining" a bunch of unresolved threads hoping to present them better since
they're related and I'm maintaining them together anyway.

This resolves an error with libpq tests in an intermediate commit, probably
caused by rebasing (and maybe hidden by the fact that the tests weren't being
run).

And updates ccache to avoid CCACHE_COMPILER.

Should any of the test changes go into v15 ?

Subject: [PATCH 02/19] cirrus/vcregress: test modules/contrib with NO_INSTALLCHECK=1
Subject: [PATCH 08/19] vcregress: add alltaptests
Subject: [PATCH 14/19] Move libpq_pipeline test into src/interfaces/libpq.
Subject: [PATCH 15/19] msvc: do not install libpq test tools by default

I also added: cirrus/ccache: disable compression and show stats

Since v4.0, ccache enables zstd compression by default, saving roughly 2x-3x.
But, cirrus caches are compressed as tar.gz, so we could disable ccache
compression, allowing cirrus to gzip the uncompressed data (better than
ccache's default of zstd-1).

https://cirrus-ci.com/build/5194596123672576
debian/bullseye has ccache 4.2; cirrus says 92MB cache after a single compilation; cache_size_kibibyte 102000
macos: has 4.5.1: 46MB cache; cache_size_kibibyte 51252
freebsd: has 3.7.12: 41MB cache; cache_size_kibibyte 130112

For some reason, mac's ccache uses 2x less space than either freesbsd or linux.
Linux is ~30% larger.
Freebsd uploads an artifact 3x smaller than the size ccache reports, because
its ccache is old so doesn't enable compression by default.

I've also sent some patches to Thomas for cfbot to help progress some of these
patches (code coverage and documentation upload as artifacts).
https://github.com/justinpryzby/cfbot/commits/master

--
Justin

Attachments:

0001-cirrus-windows-add-compiler_warnings_script.patchtext/x-diff; charset=us-ascii
0002-cirrus-vcregress-test-modules-contrib-with-NO_INSTAL.patchtext/x-diff; charset=us-ascii
0003-set-TESTDIR-from-src-test-perl-rather-than-Makefile-.patchtext/x-diff; charset=us-ascii
0004-s-also-remove-PATH.patchtext/x-diff; charset=us-ascii
0005-cirrus-macos-enable-various-runtime-checks.patchtext/x-diff; charset=us-ascii
0006-cirrus-linux-compile-with-fsanitize.patchtext/x-diff; charset=us-ascii
0007-cirrus-windows-increase-timeout-to-25min.patchtext/x-diff; charset=us-ascii
0008-vcregress-add-alltaptests.patchtext/x-diff; charset=us-ascii
0009-tmp-run-tap-tests-first.patchtext/x-diff; charset=us-ascii
0010-vcregress-run-alltaptests-in-parallel.patchtext/x-diff; charset=us-ascii
0011-cirrus-make-DebugInformationFormat-OldStyle-for-CI-b.patchtext/x-diff; charset=us-ascii
0012-cirrus-windows-ccache.patchtext/x-diff; charset=us-ascii
0013-cirrus-ccache-disable-compression-and-show-stats.patchtext/x-diff; charset=us-ascii
0014-another-way-to-install-uri-regress-uri_regress.patchtext/x-diff; charset=us-ascii
0015-Move-libpq_pipeline-test-into-src-interfaces-libpq.patchtext/x-diff; charset=us-ascii
0016-msvc-do-not-install-libpq-test-tools-by-default.patchtext/x-diff; charset=us-ascii
0017-cirrus-code-coverage.patchtext/x-diff; charset=us-ascii
0018-cirrus-build-docs-as-a-separate-task.patchtext/x-diff; charset=us-ascii
0019-cirrus-upload-changed-html-docs-as-artifacts.patchtext/x-diff; charset=us-ascii
0020-f-html-index-file.patchtext/x-diff; charset=us-ascii
#3Thomas Munro
Thomas Munro
thomas.munro@gmail.com
In reply to: Justin Pryzby (#2)
Re: CI and test improvements

[Resending -- sorry if you receive this twice. Jacob's mail server
has apparently offended the list management software so emails bounce
if he's in CC.]

On Fri, Jun 24, 2022 at 7:23 AM Justin Pryzby <pryzby@telsasoft.com> wrote:

Freebsd uploads an artifact 3x smaller than the size ccache reports, because
its ccache is old so doesn't enable compression by default.

That port/package got stuck on 3.x because of some dependency problems
when using in bootstrapping FreeBSD itself (or other ports?),
apparently. I didn't follow the details but the recent messages here
sound hopeful and I'm keeping my eye on it to see if 4.x lands as a
separate package we'd need to install, or something. Fingers crossed!

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234971

I've also sent some patches to Thomas for cfbot to help progress some of these
patches (code coverage and documentation upload as artifacts).
https://github.com/justinpryzby/cfbot/commits/master

Thanks, sorry for lack of action, will get to these soon.

#4Justin Pryzby
Justin Pryzby
pryzby@telsasoft.com
In reply to: Justin Pryzby (#1)
21 attachment(s)
Re: CI and test improvements

rebased on b6a5158f9 and 054325c5e

Also, cirrus/freebsd task can run 3x faster with more CPUs.
Subject: [PATCH 21/21] cirrus: run freebsd with more CPUs+RAM
https://cirrus-ci.com/task/4664440120410112
https://cirrus-ci.com/task/5100411110555648

In the past, I gather there was some undiagnosed issue when using more CPUs
(cirrus now enforces >5GB RAM when using 6 CPUs - maybe you tried to use too
little RAM, or maybe hit bad performance involving NUMA?)
/messages/by-id/20220310033347.hgxk4pyarzq4hxwp@alap3.anarazel.de

Attachments:

0019-cirrus-upload-changed-html-docs-as-artifacts.patchtext/x-diff; charset=us-ascii
0020-f-html-index-file.patchtext/x-diff; charset=us-ascii
0021-cirrus-run-freebsd-with-more-CPUs-RAM.patchtext/x-diff; charset=us-ascii
0003-set-TESTDIR-from-src-test-perl-rather-than-Makefile-.patchtext/x-diff; charset=us-ascii
0004-s-also-remove-PATH.patchtext/x-diff; charset=us-ascii
0015-Move-libpq_pipeline-test-into-src-interfaces-libpq.patchtext/x-diff; charset=us-ascii
0016-msvc-do-not-install-libpq-test-tools-by-default.patchtext/x-diff; charset=us-ascii
0017-cirrus-code-coverage.patchtext/x-diff; charset=us-ascii
0018-cirrus-build-docs-as-a-separate-task.patchtext/x-diff; charset=us-ascii
0001-cirrus-windows-add-compiler_warnings_script.patchtext/x-diff; charset=us-ascii
0002-cirrus-vcregress-test-modules-contrib-with-NO_INSTAL.patchtext/x-diff; charset=us-ascii
0005-cirrus-macos-enable-various-runtime-checks.patchtext/x-diff; charset=us-ascii
0006-cirrus-linux-compile-with-fsanitize.patchtext/x-diff; charset=us-ascii
0007-cirrus-windows-increase-timeout-to-25min.patchtext/x-diff; charset=us-ascii
0008-vcregress-add-alltaptests.patchtext/x-diff; charset=us-ascii
0009-tmp-run-tap-tests-first.patchtext/x-diff; charset=us-ascii
0010-vcregress-run-alltaptests-in-parallel.patchtext/x-diff; charset=us-ascii
0011-cirrus-make-DebugInformationFormat-OldStyle-for-CI-b.patchtext/x-diff; charset=us-ascii
0012-WIP-cirrus-windows-ccache.patchtext/x-diff; charset=us-ascii
0013-cirrus-ccache-disable-compression-and-show-stats.patchtext/x-diff; charset=us-ascii
0014-another-way-to-install-uri-regress-uri_regress.patchtext/x-diff; charset=us-ascii