1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00
pgbackrest/.cirrus.yml
David Steele 4e8d469f4d Use configure to generate Makefile variables for unit tests.
The unit test Makefile generation was a hodge-podge of constants and rules based on distros/versions that easily got out of date and did not work on an unknown system. All of this dates from the mixed Perl/C unit test implementation.

Instead use configure to generate most of the important Makefile variables, which allows the unit tests to run on multiple platforms, e.g. MacOS and FreeBSD.

There is plenty of work to be done here and not all the unit tests work on MacOS and FreeBSD for various reasons.

As a POC update the MacOS and FreeBSD tests on Cirrus-CI to run a few command unit tests.
2021-01-24 16:24:14 -05:00

46 lines
1.9 KiB
YAML

# Cirrus CI Build Definitions
# ----------------------------------------------------------------------------------------------------------------------------------
# Build the branch if it is integration or ends in -ci/-cic (-cic targets only Cirrus CI)
only_if: $CIRRUS_BRANCH == 'integration' || $CIRRUS_BRANCH =~ '.*-ci$' || $CIRRUS_BRANCH =~ '.*-cic$'
# No auto-cancel on integration
auto_cancellation: $CIRRUS_BRANCH != 'integration'
# FreeBSD 12
# ----------------------------------------------------------------------------------------------------------------------------------
freebsd_12_task:
freebsd_instance:
image_family: freebsd-12-1
cpu: 4
memory: 4G
install_script: pkg install -y git postgresql-libpqxx pkgconf libxml2 gmake perl5 p5-YAML rsync
script:
- perl ${CIRRUS_WORKING_DIR}/test/test.pl --no-gen --make-cmd=gmake --vm=none --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup --test=archive-get --test=archive-push
debug_script:
- ls -lah ${CIRRUS_WORKING_DIR}
# MacOS Catalina
# ----------------------------------------------------------------------------------------------------------------------------------
macos_catalina_task:
osx_instance:
image: catalina-xcode
environment:
LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/libpq/lib -L/usr/local/opt/libxml2/lib
CPPFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/libpq/include -I/usr/local/opt/libxml2/include/libxml2
PERL5LIB: /usr/local/opt/perl5/lib/perl5
install_script:
- brew install -q openssl@1.1 libpq libxml2 cpanm
- cpanm --local-lib=/usr/local/opt/perl5 install YAML
script:
- ${CIRRUS_WORKING_DIR}/test/test.pl --no-gen --vm=none --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup --test=archive-get --test=archive-push
debug_script:
- ls -lah ${CIRRUS_WORKING_DIR}