Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
183 lines (157 sloc) 5.47 KB
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6.4
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v3-dependencies-{{ checksum "requirements.txt" }}
- v3-dependencies-
- run:
name: install apt-transport-https
command: |
sudo apt-get update
sudo apt-get install apt-transport-https
- run:
name: install mono
command: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https
echo "deb https://download.mono-project.com/repo/debian stable-jessie main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
sudo apt-get install mono-devel ca-certificates-mono
- run:
name: install dotnet
command: |
curl -sSL "https://packages.microsoft.com/keys/microsoft.asc" | sudo -E apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get update
sudo -E apt-get -yq update &>> ~/apt-get-update.log
sudo -E apt-get -yqf --no-install-suggests --no-install-recommends --force-yes install dotnet-sdk-2.1.200
- run:
name: install clang
command: |
sudo apt-get install clang
- run:
name: Install pandoc
command: |
sudo apt-get update
wget https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-1-amd64.deb
sudo dpkg -i pandoc-2.2.1-1-amd64.deb
- run:
name: Install tex
command: |
sudo apt-get install -y texlive
sudo apt-get install -y texlive-latex-extra
sudo apt-get install -y dvipng
- run:
name: Install 7z, unrar
command: |
sudo apt-get install -y p7zip-full
- run:
name: Install InkScape
command: |
sudo apt-get install -y inkscape
- run:
name: Install graphviz
command: |
sudo apt-get install -y graphviz
- run:
name: install pythonnet
command: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel pycparser
dotnet --help
git clone https://github.com/pythonnet/pythonnet.git
cd pythonnet
python3 setup.py install --xplat
cd ..
- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install -r requirements.txt
python3 -m pip install scipy scikit-learn
- save_cache:
paths:
- ./venv
key: v3-dependencies-{{ checksum "requirements.txt" }}
- run:
name: build extension release
command: |
. venv/bin/activate
export DOTNET_CLI_TELEMETRY_OPTOUT=1
python3 setup.py build_ext --inplace Release
- run:
name: build extension debug
command: |
. venv/bin/activate
export DOTNET_CLI_TELEMETRY_OPTOUT=1
python3 setup.py build_ext --inplace Debug
- run:
name: run C# tests core debug
env:
DOTNET_CLI_TELEMETRY_OPTOUT:1
command: |
. venv/bin/activate
cd cscode
dotnet test -c Debug TestCSharpyCore
cd ..
- run:
name: run C# tests core release
env:
DOTNET_CLI_TELEMETRY_OPTOUT:1
command: |
. venv/bin/activate
cd cscode
dotnet test -c Release TestCSharpyCore
cd ..
- run:
name: builds csharpy Release
env:
DOTNET_CLI_TELEMETRY_OPTOUT:1
command: |
. venv/bin/activate
python3 setup.py build_ext --inplace Release
- run:
name: builds csharpy Debug
env:
DOTNET_CLI_TELEMETRY_OPTOUT:1
command: |
. venv/bin/activate
python3 setup.py build_ext --inplace Debug
- run:
name: run python tests
env:
DOTNET_CLI_TELEMETRY_OPTOUT:1
command: |
. venv/bin/activate
python3 setup.py unittests
- run:
name: wheel
env:
DOTNET_CLI_TELEMETRY_OPTOUT:1
command: |
. venv/bin/activate
python3 setup.py bdist_wheel
mkdir -p test-reports/dist
cp dist/*.whl test-reports/dist
- run:
name: documentation
command: |
. venv/bin/activate
python3 setup.py build_sphinx
- run:
name: copy documentation
command: |
mkdir -p test-reports/doc
zip -r -9 test-reports/doc/documentation_html.zip _doc/sphinxdoc/build/html
- store_artifacts:
path: test-reports
destination: test-reports