Add ARM64 jobs in Travis-CI

Signed-off-by: odidev <odidev@puresoftware.com>
This commit is contained in:
odidev 2020-07-14 15:39:35 +05:30
parent f7618f8bf5
commit 6de8c0c6d2
3 changed files with 49 additions and 23 deletions

View File

@ -2,16 +2,24 @@
language: python
dist: bionic
arch:
- amd64
- arm64
python:
- 3.5
- 3.6
- 3.7
- 3.8
matrix:
include:
- python: 2.7
- python: 3.8
- python: 3.7
- python: 3.6
- python: 3.5
- python: 3.4
install:
- sudo apt-get install -y bc
- pip install -U pip setuptools wheel
- pip install .
- rm -rf psycopg2.egg-info

View File

@ -13,6 +13,11 @@ set -e -x
#
# The variables can be set in the travis configuration
# (https://travis-ci.org/psycopg/psycopg2/settings)
export TEST_PAST=${TEST_PAST:-0}
export TEST_FUTURE=${TEST_FUTURE:-0}
export TEST_VERBOSE=${TEST_VERBOSE:-0}
export PSYCOPG2_TEST_FAST=${PSYCOPG2_TEST_FAST:-0}
export TEST_PRESENT=${TEST_PRESENT:-1}
set_param () {
# Set a parameter in a postgresql.conf file
@ -115,16 +120,19 @@ create () {
# Would give a permission denied error in the travis build dir
cd /
# Postgres versions supported by Travis CI
if (( ! "$DONT_TEST_PRESENT" )); then
create 12
create 11
create 10
create 9.6
create 9.5
create 9.4
if (( "$TEST_PRESENT" )); then
if [[ ${TRAVIS_CPU_ARCH} == "arm64" ]]; then
# Postgres versions supported by ARM64
create 10
else
create 12
create 11
create 10
create 9.6
create 9.5
create 9.4
fi
fi
# Unsupported postgres versions that we still support
# Images built by https://github.com/psycopg/psycopg2-wheels/tree/build-dinosaurs
if (( "$TEST_PAST" )); then

View File

@ -13,6 +13,12 @@
set -e -x
export TEST_PAST=${TEST_PAST:-0}
export TEST_FUTURE=${TEST_FUTURE:-0}
export TEST_VERBOSE=${TEST_VERBOSE:-0}
export PSYCOPG2_TEST_FAST=${PSYCOPG2_TEST_FAST:-0}
export TEST_PRESENT=${TEST_PRESENT:-1}
run_test () {
VERSION=$1
DBNAME=psycopg2_test
@ -44,16 +50,20 @@ run_test () {
$VERBOSE
}
# Postgres versions supported by Travis CI
if (( ! "$DONT_TEST_PRESENT" )); then
run_test 12
run_test 11
run_test 10
run_test 9.6
run_test 9.5
run_test 9.4
if (( "$TEST_PRESENT" )); then
if [[ "${TRAVIS_CPU_ARCH}" == "arm64" ]]; then
# Postgres versions supported by ARM64
run_test 10
else
# Postgres versions supported by Travis CI
run_test 12
run_test 11
run_test 10
run_test 9.6
run_test 9.5
run_test 9.4
fi
fi
# Unsupported postgres versions that we still support
# Images built by https://github.com/psycopg/psycopg2-wheels/tree/build-dinosaurs
if (( "$TEST_PAST" )); then