Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Add ARM64 jobs in Travis-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
odidev committed Jul 21, 2020
1 parent 544adab commit 3a1e64a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Travis config file to build psycopg packages

sudo: required
dist: trusty
dist: bionic

services:
- docker
- postgresql

addons:
postgresql: 9.6
postgresql: 10

env:
global:
Expand All @@ -28,6 +28,10 @@ matrix:
- env:
SCRIPT=./scripts/build_manylinux1_x86_64.sh
PACKAGE_NAME="psycopg2-binary"
- arch: arm64
env:
SCRIPT=./scripts/build_manylinux2014_aarch64.sh
PACKAGE_NAME="psycopg2-binary"
- os:
osx
osx_image:
Expand Down
21 changes: 13 additions & 8 deletions scripts/build_libpq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ set -euo pipefail
set -x

OPENSSL_VERSION="1.1.1d"
LDAP_VERSION="2.4.48"
LDAP_VERSION="2.4.50"
SASL_VERSION="2.1.27"
# If you change this, fix WANT_LIBPQ too in .travis.yml
POSTGRES_VERSION="11.5"

yum install -y zlib-devel krb5-devel pam-devel

# Need perl 5.10.0 to build/install openssl
curl -sL https://install.perlbrew.pl | bash
set +eu
source ~/perl5/perlbrew/etc/bashrc
set -eu
perlbrew install --notest perl-5.16.0
perlbrew switch perl-5.16.0

if [[ "$(uname -m)" != "aarch64" ]]; then
# Need perl 5.10.0 to build/install openssl
curl -sL https://install.perlbrew.pl | bash
set +eu
source ~/perl5/perlbrew/etc/bashrc
set -eu
perlbrew install --notest perl-5.16.0
perlbrew switch perl-5.16.0
else
yum install -y bzip2 gcc libtool perl
fi

# Build openssl if needed
OPENSSL_TAG="OpenSSL_${OPENSSL_VERSION//./_}"
Expand Down
9 changes: 9 additions & 0 deletions scripts/build_manylinux2014_aarch64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -euo pipefail
# set -x

docker run --rm -v $TRAVIS_BUILD_DIR:/build \
-e PSYCOPG2_TESTDB_USER=postgres -e PSYCOPG2_TEST_FAST=1 \
-e WANT_LIBPQ -e PACKAGE_NAME \
quay.io/pypa/manylinux2014_aarch64 /build/scripts/build-manylinux.sh
2 changes: 1 addition & 1 deletion scripts/configure_postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e -x

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CONFIG_DIR=/etc/postgresql/9.6/main/
CONFIG_DIR=/etc/postgresql/10/main/

# Listen on all the hosts
sed -i "s/^\s*#\?\s*listen_addresses.*/listen_addresses = '*'/" \
Expand Down

0 comments on commit 3a1e64a

Please sign in to comment.