Setting up PostgreSQL buildfarm animal

Generic instructions are here

https://wiki.postgresql.org/wiki/PostgreSQL_Buildfarm_Howto

Following instructions are setting up an MSVC-based buildfarm animal for Windows on Arm machine.

Install build dependencies

See https://www.postgresql.org/docs/14/install-windows-full.html

Tested with the following tools and seems to work.

  • Strawberry Perl

  • Make

  • Flex and bison (Installed with MSYS2 works)

  • MSVC toolchain (v142)

  • OpenSSL (Installed with vcpkg)

  • Python 3.10

Enable Developer Mode

Buildfarm scripts require mklink to create symbolic links. By default, only admins can create symbolic links unless developer mode is enabled.

https://consumer.huawei.com/en/support/content/en-us15594140/

Download and configure buildfarm animal scripts

Download scripts from

Copy build_farm.config.sample to build_farm.config and make following changes

  1. Add credentials for buildfarm animal

animal => "Linaro", secret => "...",

To request credentials -

2. Add SCM repository

Default is a community git repository but can be changed to either use GitHub official mirror or a fork

scmrepo => 'https://github.com/nsait-linaro/postgres.git', # default

3. Enable MSVC

using_msvc => 1,

4. Set MAX_CONNECTIONS in build_env

MAX_CONNECTIONS => '3',

5. Set base_port

Note: This might not be required after upstreaming local changes

base_port => 5432

6. Change MSVC setup to match the following config

Remember to add required paths to $vsenv->{PATH}

Example buildfarm.config used for a successful run.