mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
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.
This commit is contained in:
parent
09fc69f3e8
commit
85f4eef55e
48
.cirrus.yml
Normal file
48
.cirrus.yml
Normal file
@ -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
|
40
test/Vagrantfile
vendored
40
test/Vagrantfile
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user