Skip to content

Commit

Permalink
Add ARM64 jobs in Travis-CI
Browse files Browse the repository at this point in the history
Signed-off-by: odidev <odidev@puresoftware.com>
  • Loading branch information
odidev committed Jul 21, 2020
1 parent cecff19 commit 17dbfc9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 23 deletions.
26 changes: 21 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,32 @@

language: python

dist: bionic

arch:
- amd64
- arm64

python:
- 3.5
- 3.6
- 3.7
- 3.8

env:
global:
- TEST_PAST=${TEST_PAST:-0}
- TEST_FUTURE=${TEST_FUTURE:-0}
- TEST_VERBOSE=${TEST_VERBOSE:-0}
- PSYCOPG2_TEST_FAST=${PSYCOPG2_TEST_FAST:-0}
- TEST_PRESENT=${TEST_PRESENT:-1}

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
Expand Down
21 changes: 12 additions & 9 deletions scripts/travis_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,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
Expand Down
22 changes: 13 additions & 9 deletions scripts/travis_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,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
Expand Down

0 comments on commit 17dbfc9

Please sign in to comment.