version: 2
jobs:
  build:
    # Ensures ci import for displaying oscrypto backend works
    working_directory: ~/oscrypto
    macos:
      # This is the last version using macOS 10.12, which has Python 2.6
      xcode: 9.2.0
    steps:
      - restore_cache:
          keys:
            - homebrew
      - run: brew update
      - save_cache:
          key: homebrew
          paths:
            - /usr/local/Homebrew
      - run: brew upgrade python
      - run: brew install pypy
      - checkout
      - run: /usr/bin/python2.6 run.py deps
      - run: /usr/bin/python2.6 run.py ci
      - run: /usr/bin/python2.7 run.py deps
      - run: /usr/bin/python2.7 run.py ci
      - run:
          command: /usr/bin/python2.7 run.py ci
          environment:
            OSCRYPTO_USE_OPENSSL: /usr/lib/libcrypto.dylib,/usr/lib/libssl.dylib
      - run: python3 run.py deps
      - run: python3 run.py ci
      - run:
          command: python3 run.py ci
          environment:
            OSCRYPTO_USE_OPENSSL: /usr/lib/libcrypto.dylib,/usr/lib/libssl.dylib
      - run: pypy run.py deps
      - run: pypy run.py ci

version: 2
jobs:
  build:
    # Ensures ci import for displaying oscrypto backend works
    working_directory: ~/oscrypto
    macos:
      # This is the last version using macOS 10.12, which has Python 2.6
      xcode: 9.0.1
    steps:
      - restore_cache:
          keys:
            - homebrew
      - run: brew update
      - save_cache:
          key: homebrew
          paths:
            - /usr/local/Homebrew
      - run: brew upgrade python
      - run: brew install pypy
      - checkout
      - run: /usr/bin/python2.6 run.py deps
      - run: /usr/bin/python2.6 run.py ci
      - run: /usr/bin/python2.7 run.py deps
      - run: /usr/bin/python2.7 run.py ci
      - run:
          command: /usr/bin/python2.7 run.py ci
          environment:
            OSCRYPTO_USE_OPENSSL: /usr/lib/libcrypto.dylib,/usr/lib/libssl.dylib
      - run: python3 run.py deps
      - run: python3 run.py ci
      - run:
          command: python3 run.py ci
          environment:
            OSCRYPTO_USE_OPENSSL: /usr/lib/libcrypto.dylib,/usr/lib/libssl.dylib
      - run: pypy run.py deps
      - run: pypy run.py ci

Drop down xcode version for CI since 9.2.0 is gone
Drop down xcode version for CI since 9.2.0 is gone
