os: linux
dist: focal
language: python
python: '3.8'

if: (branch = main OR tag IS present) AND (type = push)

env:
  global:
  - GEOS_VERSION=3.11.2

cache:
  directories:
  - "$HOME/geosinstall"
  - "~/.cache/pip"

jobs:
  include:
  - arch: ppc64le
  - arch: s390x
  - arch: arm64

install:
- |
  export GEOS_INSTALL=$HOME/geosinstall/geos-$GEOS_VERSION
  ./ci/install_geos.sh
  export PATH=$HOME/geosinstall/geos-$GEOS_VERSION/bin:$PATH
  pip install .[test]

script:
- |
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/geosinstall/geos-$GEOS_VERSION/lib
  cd ..
  pytest -v --pyargs shapely.tests
