Hi,
On 2022-10-01 18:36:41 -0700, Andres Freund wrote:
> I am wondering if we should instead introduce a new "quickcheck" task that
> just compiles and runs maybe one test and have *all* other tests depend on
> that. Wasting a precious available windows instance to just fail to build or
> immediately fail during tests doesn't really make sense.
Attached is an implementation of that idea.
I fairly randomly chose two quick tests to execute as part of the sanity
check, cube/regress pg_ctl/001_start_stop. I wanted to have coverage for
initdb, a pg_regress style test, a tap test, some other client binary.
With a primed cache this takes ~32s, not too bad imo. 12s of that is cloning
the repo.
What do you think?
We could bake a bare repo into the images to make the clone step in faster,
but that'd be for later anyway.
set -e
rm -rf /tmp/pg-clone-better
mkdir /tmp/pg-clone-better
cd /tmp/pg-clone-better
git init --bare
git remote add origin https://github.com/postgres/postgres.git --no-tags -t 'REL_*' -t master
git fetch -v
git repack -ad -f
du -sh
results in a 227MB repo.
git clone https://github.com/anarazel/postgres.git -v --depth 1000 -b ci-sanitycheck --reference /tmp/pg-clone-better
/tmp/pg-clone-better-clone
clones an example branch in ~1.35s.
Greetings,
Andres Freund