1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Update CI to use Ubuntu 22.04 and Fedora 36.

Both have newer gcc and OpenSSL 3.

Fedora 36 runs horribly slow with valgrind enabled so run the valgrind tests on Ubuntu 22.04. Fedora 36 has a newer gcc so it is still worth testing on.
This commit is contained in:
David Steele
2022-06-06 16:32:20 -04:00
parent 08242ee6ac
commit a16cf5eac7
8 changed files with 83 additions and 49 deletions

View File

@@ -403,6 +403,11 @@ sub containerBuild
{
$strScript .= " g++-multilib";
}
if ($strOS eq VM_U22)
{
$strScript .= " valgrind";
}
}
# Add zst command-line tool and development libs when available
@@ -442,15 +447,18 @@ sub containerBuild
}
#---------------------------------------------------------------------------------------------------------------------------
my $strValgrind = 'valgrind-3.17.0';
if ($strOS ne VM_U22 && $strOS ne VM_F36)
{
my $strValgrind = 'valgrind-3.17.0';
$strScript .= sectionHeader() .
"# Build valgrind\n" .
" wget -q -O - https://sourceware.org/pub/valgrind/${strValgrind}.tar.bz2 | tar jx -C /root && \\\n" .
" cd /root/${strValgrind} && \\\n" .
" ./configure --silent && \\\n" .
" make -s -j8 install && \\\n" .
" rm -rf /root/${strValgrind}";
$strScript .= sectionHeader() .
"# Build valgrind\n" .
" wget -q -O - https://sourceware.org/pub/valgrind/${strValgrind}.tar.bz2 | tar jx -C /root && \\\n" .
" cd /root/${strValgrind} && \\\n" .
" ./configure --silent && \\\n" .
" make -s -j8 install && \\\n" .
" rm -rf /root/${strValgrind}";
}
#---------------------------------------------------------------------------------------------------------------------------
if (defined($oVm->{$strOS}{&VMDEF_LCOV_VERSION}))
@@ -484,11 +492,11 @@ sub containerBuild
" https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-" . hostArch() . "/" .
"pgdg-redhat-repo-latest.noarch.rpm && \\\n";
}
elsif ($strOS eq VM_F33)
elsif ($strOS eq VM_F36)
{
$strScript .=
" rpm -ivh \\\n" .
" https://download.postgresql.org/pub/repos/yum/reporpms/F-33-" . hostArch() . "/" .
" https://download.postgresql.org/pub/repos/yum/reporpms/F-36-" . hostArch() . "/" .
"pgdg-fedora-repo-latest.noarch.rpm && \\\n";
}
@@ -498,7 +506,7 @@ sub containerBuild
{
$strScript .=
" echo \"deb http://apt.postgresql.org/pub/repos/apt/ \$(lsb_release -s -c)-pgdg main" .
($strOS eq VM_U20 ? ' 15' : '') . "\" >> /etc/apt/sources.list.d/pgdg.list && \\\n" .
($strOS eq VM_U20 || $strOS eq VM_U22 ? ' 15' : '') . "\" >> /etc/apt/sources.list.d/pgdg.list && \\\n" .
" wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \\\n" .
" apt-get update && \\\n" .
" apt-get install -y --no-install-recommends postgresql-common libpq-dev && \\\n" .

View File

@@ -118,7 +118,7 @@ sub coverageExtract
executeTest(
(defined($strContainerImage) ? 'docker exec -i -u ' . TEST_USER . " ${strContainerImage} " : '') .
"${strLCovExe} --capture --directory=${strWorkUnitPath} --o=${strLCovOut}");
"${strLCovExe} --capture --directory=${strWorkUnitPath} --o=${strLCovOut} 2>&1");
# Generate coverage report for each module
foreach my $strCoveredModule (@stryCoveredModule)

View File

@@ -82,19 +82,21 @@ use constant VM_RH7 => 'rh7';
push @EXPORT, qw(VM_RH7);
use constant VM_RH8 => 'rh8';
push @EXPORT, qw(VM_RH8);
use constant VM_F33 => 'f33';
push @EXPORT, qw(VM_F33);
use constant VM_F36 => 'f36';
push @EXPORT, qw(VM_F36);
use constant VM_U18 => 'u18';
push @EXPORT, qw(VM_U18);
use constant VM_U20 => 'u20';
push @EXPORT, qw(VM_U20);
use constant VM_U22 => 'u22';
push @EXPORT, qw(VM_U22);
# VM aliases for run matrices (numbered oldest to newest)
use constant VM2 => VM_U18;
push @EXPORT, qw(VM2);
use constant VM3 => VM_RH7;
push @EXPORT, qw(VM3);
use constant VM4 => VM_U20;
use constant VM4 => VM_U22;
push @EXPORT, qw(VM4);
# List of default test VMs
@@ -154,11 +156,11 @@ my $oyVm =
],
},
# Fedora 33
&VM_F33 =>
# Fedora 36
&VM_F36 =>
{
&VM_OS_BASE => VM_OS_BASE_RHEL,
&VM_IMAGE => 'fedora:33',
&VM_IMAGE => 'fedora:36',
&VM_ARCH => VM_ARCH_AMD64,
&VMDEF_PGSQL_BIN => '/usr/pgsql-{[version]}/bin',
&VMDEF_COVERAGE_C => true,
@@ -168,11 +170,11 @@ my $oyVm =
&VM_DB =>
[
PG_VERSION_96,
PG_VERSION_10,
PG_VERSION_11,
PG_VERSION_12,
PG_VERSION_13,
PG_VERSION_14,
],
&VM_DB_TEST =>
@@ -249,6 +251,43 @@ my $oyVm =
PG_VERSION_15,
],
},
# Ubuntu 22.04
&VM_U22 =>
{
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
&VM_IMAGE => 'ubuntu:22.04',
&VM_ARCH => VM_ARCH_AMD64,
&VMDEF_COVERAGE_C => true,
&VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin',
&VMDEF_WITH_BACKTRACE => true,
&VMDEF_WITH_ZST => true,
&VM_DB =>
[
PG_VERSION_90,
PG_VERSION_91,
PG_VERSION_92,
PG_VERSION_93,
PG_VERSION_94,
PG_VERSION_95,
PG_VERSION_96,
PG_VERSION_10,
PG_VERSION_11,
PG_VERSION_12,
PG_VERSION_13,
PG_VERSION_14,
PG_VERSION_15,
],
&VM_DB_TEST =>
[
PG_VERSION_95,
PG_VERSION_96,
PG_VERSION_15,
],
},
};
####################################################################################################################################