Re: Adding CI to our tree

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Daniel Gustafsson <daniel@yesql.se>
Date: 2022-02-16T06:42:09Z
Lists: pgsql-hackers
Hi,

On February 15, 2022 10:12:36 PM PST, Justin Pryzby <pryzby@telsasoft.com> wrote:
>On Sun, Feb 13, 2022 at 01:53:19PM -0800, Andres Freund wrote:
>> Hi,
>> 
>> On 2022-02-13 15:31:20 -0600, Justin Pryzby wrote:
>> > Oh - I suppose you're right.  That's an unfortunate consequence of running a
>> > single prove instance without chdir.
>> 
>> I don't think it's chdir that's relevant (that changes into the source
>> directory after all). It's the TESTDIR environment variable.
>> 
>> I was thinking that we should make Utils.pm's INIT block responsible for
>> figuring out both the directory a test should run in and the log location,
>> instead having that in vcregress.pl and Makefile.global.in. Mostly because
>> doing it in the latter means we can't start tests with different TESTDIR and
>> working dir at the same time.
>> 
>> If instead we pass the location of the top-level build and top-level source
>> directory from vcregress.pl / Makefile.global, the tap test infrastructure can
>> figure out that stuff themselves, on a per-test basis.
>> 
>> For msvc builds we probably would need to pass in some information that allow
>> Utils.pm to set up PATH appropriately. I think that might just require knowing
>> that a) msvc build system is used b) Release vs Debug.
>
>I'm totally unsure if this resembles what you're thinking of, and I'm surprised
>I got it working so easily.  But it gets the tap test output in separate dirs,
>and CI is passing for everyone (windows failed because I injected a "false" to
>force it to upload artifacts).
>
>https://github.com/justinpryzby/postgres/runs/5211673291

Yes, that's along the lines I was thinking. I only checked it on my phone, so it certainly isn't a careful look...

I think this should be discussed in a separate thread, for visibility.

FWIW, I'd like to additionally add marker files in INIT and remove them in END. And create files signaling success and failure in END. That would allow automated selection of log files of failed tests...

Andres

Regards,

Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. ci: enable zstd where available.

  2. ci: compile with -Og where applicable.

  3. ci: include hints how to install OS packages.

  4. ci: fix copy-paste mistake in 16eb8231d1b.

  5. ci: macos: align sysinfo_script to other tasks.

  6. ci: Only use one artifact instruction for logs.

  7. ci: s/CCACHE_SIZE/CCACHE_MAXSIZE/.

  8. pg_basebackup: Skip a few more fsyncs if --no-sync is specified.

  9. TAP tests: check for postmaster.pid anyway when "pg_ctl start" fails.

  10. Don't enable fsync in src/test/recovery/t/008_fsm_truncation.pl.

  11. ci: windows: run initdb with --no-sync.

  12. ci: windows: enable build summary to make it easier to spot warnings / errors.

  13. ci: Add continuous integration for github repositories via cirrus-ci.

  14. Fix TestLib::slurp_file() with offset on windows.