2020-05-23 23:42:09 +02:00
|
|
|
language: python
|
2021-01-20 23:15:53 +01:00
|
|
|
python: # this works for Linux but is ignored on macOS or Windows
|
|
|
|
- "3.6"
|
|
|
|
- "3.7"
|
|
|
|
- "3.8"
|
|
|
|
- "3.9"
|
2021-01-20 23:17:59 +01:00
|
|
|
# See https://docs.travis-ci.com/user/languages/python/#running-python-tests-on-multiple-operating-systems
|
2021-01-20 23:06:14 +01:00
|
|
|
jobs:
|
|
|
|
include:
|
2021-02-08 22:29:03 +01:00
|
|
|
- name: "Python on macOS"
|
2021-01-20 23:06:14 +01:00
|
|
|
os: osx
|
2021-02-08 22:29:03 +01:00
|
|
|
osx_image: xcode12.2 # Latest version at time of writing : see https://docs.travis-ci.com/user/reference/osx#macos-version
|
2021-01-20 23:06:14 +01:00
|
|
|
language: shell # 'language: python' is an error on Travis CI macOS
|
2021-02-08 22:09:31 +01:00
|
|
|
# Build requisites (only some of them)
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
# See the Dockerfiles for more details about those dependencies
|
|
|
|
- build-essential
|
|
|
|
- cmake
|
|
|
|
- g++
|
|
|
|
- git
|
|
|
|
- libffi-dev
|
|
|
|
- libssl-dev
|
|
|
|
- make
|
|
|
|
- python3-dev
|
2021-02-08 22:51:14 +01:00
|
|
|
# homebrew:
|
|
|
|
# # TODO Check this list to see if something is missing : https://docs.travis-ci.com/user/reference/osx#compilers-and-build-toolchain
|
|
|
|
# packages: rust
|
|
|
|
before_install:
|
|
|
|
- curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env
|
2020-05-23 23:42:09 +02:00
|
|
|
install:
|
2021-02-09 22:55:09 +01:00
|
|
|
- pip3 install -c constraints.txt -r requirements-build.txt -r requirements-runtime.txt
|
2021-01-20 22:32:01 +01:00
|
|
|
# Generates nicobot/version.py
|
2021-01-20 23:06:14 +01:00
|
|
|
# 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows
|
|
|
|
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
|
|
|
|
- python3 setup.py build || python setup.py build
|
2020-05-23 23:42:09 +02:00
|
|
|
script:
|
2021-01-20 23:06:14 +01:00
|
|
|
# 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows
|
|
|
|
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
|
|
|
|
- python3 -m unittest discover -s tests || python -m unittest discover -s tests
|