Re: Adding CI to our tree

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
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-03-09T17:47:23Z
Lists: pgsql-hackers
I'm curious what you think of this patch.

It makes check-world on freebsd over 30% faster - saving 5min.

Apparently gcc -Og was added in gcc 4.8 (c. 2013).

On Wed, Mar 02, 2022 at 02:50:58PM -0600, Justin Pryzby wrote:
> From d180953d273c221a30c5e9ad8d74b1b4dfc60bd1 Mon Sep 17 00:00:00 2001
> From: Justin Pryzby <pryzbyj@telsasoft.com>
> Date: Sun, 27 Feb 2022 15:17:50 -0600
> Subject: [PATCH 7/7] cirrus: compile with -Og..
> 
> To improve performance of check-world, and improve debugging, without
> significantly slower builds (they're cached anyway).
> 
> This makes freebsd check-world run in 8.5 minutes rather than 15 minutes.
> ---
>  .cirrus.yml                      | 12 +++++++-----
>  src/tools/msvc/MSBuildProject.pm |  4 ++--
>  2 files changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/.cirrus.yml b/.cirrus.yml
> index 6f05d420c85..8b673bf58cf 100644
> --- a/.cirrus.yml
> +++ b/.cirrus.yml
> @@ -113,7 +113,7 @@ task:
>          \
>          CC="ccache cc" \
>          CXX="ccache c++" \
> -        CFLAGS="-O0 -ggdb"
> +        CFLAGS="-Og -ggdb"
>      EOF
>    build_script: su postgres -c "gmake -s -j${BUILD_JOBS} world-bin"
>    upload_caches: ccache
> @@ -208,8 +208,8 @@ task:
>          CC="ccache gcc" \
>          CXX="ccache g++" \
>          CLANG="ccache clang" \
> -        CFLAGS="-O0 -ggdb" \
> -        CXXFLAGS="-O0 -ggdb"
> +        CFLAGS="-Og -ggdb" \
> +        CXXFLAGS="-Og -ggdb"
>      EOF
>    build_script: su postgres -c "make -s -j${BUILD_JOBS} world-bin"
>    upload_caches: ccache
> @@ -329,8 +329,8 @@ task:
>        CC="ccache cc" \
>        CXX="ccache c++" \
>        CLANG="ccache ${brewpath}/llvm/bin/ccache" \
> -      CFLAGS="-O0 -ggdb" \
> -      CXXFLAGS="-O0 -ggdb" \
> +      CFLAGS="-Og -ggdb" \
> +      CXXFLAGS="-Og -ggdb" \
>        \
>        LLVM_CONFIG=${brewpath}/llvm/bin/llvm-config \
>        PYTHON=python3
> @@ -383,6 +383,8 @@ task:
>      # -fileLoggerParameters1: write to msbuild.warn.log.
>      MSBFLAGS: -m -verbosity:minimal "-consoleLoggerParameters:Summary;ForceNoAlign" /p:TrackFileAccess=false -nologo -fileLoggerParameters1:warningsonly;logfile=msbuild.warn.log
>  
> +    MSBUILD_OPTIMIZE: MaxSpeed
> +
>      # If tests hang forever, cirrus eventually times out. In that case log
>      # output etc is not uploaded, making the problem hard to debug. Of course
>      # tests internally should have shorter timeouts, but that's proven to not
> diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
> index 5e312d232e9..05e0c41eb5c 100644
> --- a/src/tools/msvc/MSBuildProject.pm
> +++ b/src/tools/msvc/MSBuildProject.pm
> @@ -85,7 +85,7 @@ EOF
>  		$f, 'Debug',
>  		{
>  			defs    => "_DEBUG;DEBUG=1",
> -			opt     => 'Disabled',
> +			opt     => $ENV{MSBUILD_OPTIMIZE} || 'Disabled',
>  			strpool => 'false',
>  			runtime => 'MultiThreadedDebugDLL'
>  		});
> @@ -94,7 +94,7 @@ EOF
>  		'Release',
>  		{
>  			defs    => "",
> -			opt     => 'Full',
> +			opt     => $ENV{MSBUILD_OPTIMIZE} || 'Full',
>  			strpool => 'true',
>  			runtime => 'MultiThreadedDLL'
>  		});
> -- 
> 2.17.1
> 



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.