nicobot/.travis.yml
nicobo 73a95157d8
+ adding version constraints to prevent some automatic upgrades (that BREAK build !)
~ debian.Dockerfile : rust is copied from an existing image because it's 
just too complex to maintain
2021-02-09 22:55:09 +01:00

42 lines
1.6 KiB
YAML

language: python
python: # this works for Linux but is ignored on macOS or Windows
- "3.6"
- "3.7"
- "3.8"
- "3.9"
# See https://docs.travis-ci.com/user/languages/python/#running-python-tests-on-multiple-operating-systems
jobs:
include:
- name: "Python on macOS"
os: osx
osx_image: xcode12.2 # Latest version at time of writing : see https://docs.travis-ci.com/user/reference/osx#macos-version
language: shell # 'language: python' is an error on Travis CI macOS
# 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
# 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
install:
- pip3 install -c constraints.txt -r requirements-build.txt -r requirements-runtime.txt
# Generates nicobot/version.py
# '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
script:
# '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