Commit b5d5caae authored by Laurent Belcour's avatar Laurent Belcour

[CI] Ensure that numpy and python3 is installed

parent f0154017
......@@ -7,6 +7,11 @@ build:
environment:
matrix:
- builder: cmake
PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.3"
PYTHON_ARCH: "64"
PIP: "C:\\Python36-x64\\Scripts\\pip"
- builder: scons
init:
......@@ -14,11 +19,13 @@ init:
install:
- SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- python -m ensurepip
- pip install -U setuptools
- pip install -U wheel
- pip install scons==2.4.1
- if "%builder%" == "scons" (
python --version &
python -m ensurepip &
pip install -U setuptools &
pip install -U wheel &
pip install scons==2.4.1
)
- cinst nsis.portable
- hg clone https://bitbucket.org/eigen/eigen external\eigen3
- cd external\eigen3
......@@ -95,7 +102,7 @@ test_script:
- if "%builder%" == "scons" (
scons --cfg=./configs/scons/config-windows-appveyor.py tests
appveoyr PushArtifact build\sources\tests\*.log
) else
) else (
cd build &
nmake test &
appveyor PushArtifact Testing\Temporary\LastTest.log &
......
......@@ -17,6 +17,7 @@ addons:
- cmake
- libeigen3-dev
- libpython3-dev
- python3-numpy
before_install:
- OMP_NUM_THREADS=2
......
import alta
import numpy
fail = 0
......@@ -35,17 +34,36 @@ for i in range(0,len(y)):
if l[i] != y[i]:
fail += 1
# Print the test result
if fail > 0:
print("Testing python 'vec' interface failed!")
exit(1)
else:
print("Testing python 'vec' interface passed!")
exit(0)
###########################################################
## ##
## SPECIAL TEST: Interoperability with the numpy library ##
## ##
###########################################################
fail = 0
import numpy
# Conversion to a numpy array
na = numpy.array(y)
for i in range(0,len(y)):
if na[i] != y[i]:
fail += 1
# Print the test result
if fail > 0:
print("Testing python 'vec' interface failed!")
print("Testing python 'vec' interface with 'numpy' failed!")
exit(1)
else:
print("Testing python 'vec' interface passed!")
print("Testing python 'vec' interface with 'numpy' passed!")
exit(0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment