pgbackrest.git / summary / log / commit / refs

commit    85f4eef55e62dcaf05705ce3123cb04b59c2a1f4
Author:   David Steele <david@pgmasters.net>
Date:     Thu Apr 16 18:13:53 2020 +0000

    Add Cirrus CI and Vagrant configuration for FreeBSD and MacOS.
    
    Building on these platforms gives us better coverage for our build code. Cirrus CI was chosen because it is the only service that supports FreeBSD (that we could find).
    
    The FreedBSD configuration for Vagrant is currently just enough to perform a build.
    
    The MacOS configuration is not actually for Vagrant (yet) but does show the steps needed to setup the build environment on MacOS.


.cirrus.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ test/Vagrantfile | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000..01ff0175a --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,48 @@ +# 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: + only_if: $CIRRUS_BRANCH == 'integration' || $CIRRUS_BRANCH =~ '.*-ci$' || $CIRRUS_BRANCH =~ '.*-cic$' + + freebsd_instance: + image_family: freebsd-12-1 + + install_script: pkg install -y git postgresql-libpqxx pkgconf libxml2 gmake + + script: + - cd ${CIRRUS_WORKING_DIR}/src && ./configure + - gmake -s -C ${CIRRUS_WORKING_DIR}/src + - ${CIRRUS_WORKING_DIR}/src/pgbackrest + + debug_script: + - ls -lah ${CIRRUS_WORKING_DIR} + - cat ${CIRRUS_WORKING_DIR}/src/Makefile + +# 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 + + install_script: brew install openssl@1.1 libpq libxml2 + + script: + - cd ${CIRRUS_WORKING_DIR}/src && ./configure + - make -s -C ${CIRRUS_WORKING_DIR}/src + - ${CIRRUS_WORKING_DIR}/src/pgbackrest + + debug_script: + - ls -lah ${CIRRUS_WORKING_DIR} + - cat ${CIRRUS_WORKING_DIR}/src/Makefile diff --git a/test/Vagrantfile b/test/Vagrantfile index 6705e4ef7..3b30d516f 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -119,6 +119,46 @@ Vagrant.configure(2) do |config| default.vm.synced_folder "..", "/home/vagrant/pgbackrest" end + # FreeBSD 12 + # + # Basic environment to build pgBackRest. + #------------------------------------------------------------------------------------------------------------------------------- + config.vm.define "fb12", autostart: false do |fb12| + fb12.vm.box = "generic/freebsd12" + fb12.vm.box_version = "2.0.6" + + fb12.vm.provider :virtualbox do |vb| + vb.name = "pgbackrest-test-fb12" + end + + # Provision the VM + fb12.vm.provision "shell", inline: <<-SHELL + #----------------------------------------------------------------------------------------------------------------------- + echo 'Build Begin' && date + + #----------------------------------------------------------------------------------------------------------------------- + echo 'Install Build Tools' && date + + pkg install -y git postgresql-libpqxx pkgconf libxml2 gmake + + #----------------------------------------------------------------------------------------------------------------------- + echo 'Build End' && date + SHELL + end + + # MacOS + # + # Basic environment to build pgBackRest using homebrew installed in the local user account. + #------------------------------------------------------------------------------------------------------------------------------- + # cd ~ + # mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew + # homebrew/bin/brew install libpq libxml2 + # export LDFLAGS="-L${HOME?}/homebrew/opt/openssl@1.1/lib -L${HOME?}/homebrew/opt/libpq/lib -L${HOME?}/homebrew/opt/libxml2/lib" + # export CPPFLAGS="-I${HOME?}/homebrew/opt/openssl@1.1/include -I/${HOME?}/homebrew/opt/libpq/include" + # export CPPFLAGS="${CPPFLAGS?} -I${HOME?}/homebrew/opt/libxml2/include/libxml2" + # + # cd [repo]/src && ./configure && make + # Don't share the default vagrant folder config.vm.synced_folder ".", "/vagrant", disabled: true end [parent: 09fc69f3e8a0]