mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Add 'check' target which both builds and tests
This commit is contained in:
parent
1fe5901062
commit
52ae7b1d33
@ -19,8 +19,6 @@ install:
|
||||
build_script:
|
||||
- echo Running cmake...
|
||||
- cd c:\projects\pybind11
|
||||
- cmake -G "%CMAKE_PLATFORM%" -DPYTHON_INCLUDE_DIR:PATH=%PYTHON_DIR%/include -DPYTHON_LIBRARY:FILEPATH=%PYTHON_DIR%/libs/python34.lib -DPYTHON_EXECUTABLE:FILEPATH=%PYTHON_DIR%/python.exe
|
||||
- cmake -G "%CMAKE_PLATFORM%" -DPYTHON_EXECUTABLE:FILEPATH=%PYTHON_DIR%/python.exe
|
||||
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
- set MSBuildOptions=/v:m /p:Configuration=%Configuration% /logger:%MSBuildLogger%
|
||||
- msbuild %MSBuildOptions% pybind11.sln
|
||||
- ctest -C %Configuration%
|
||||
- cmake --build . --config %Configuration% --target check -- /v:m /logger:%MSBuildLogger%
|
||||
|
11
.travis.yml
11
.travis.yml
@ -23,19 +23,18 @@ matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc-4.8
|
||||
script:
|
||||
install:
|
||||
- pyvenv-3.5 venv
|
||||
- cmake -DPYBIND11_PYTHON_VERSION=3.5 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_EXECUTABLE:FILEPATH=`pwd`/venv/bin/python3.5 -DCMAKE_CXX_COMPILER=g++-4.8
|
||||
- make -j 2
|
||||
- source venv/bin/activate
|
||||
- pip install numpy
|
||||
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
|
||||
script:
|
||||
- CXX=g++-4.8 cmake -DPYBIND11_PYTHON_VERSION=3.5
|
||||
- CTEST_OUTPUT_ON_FAILURE=TRUE make check -j 2
|
||||
- os: osx
|
||||
compiler: clang
|
||||
script:
|
||||
- cmake -DPYBIND11_PYTHON_VERSION=2.7
|
||||
- make -j 2
|
||||
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
|
||||
- CTEST_OUTPUT_ON_FAILURE=TRUE make check -j 2
|
||||
#- os: linux
|
||||
#compiler: gcc-4.8
|
||||
#script:
|
||||
|
@ -145,6 +145,7 @@ endfunction()
|
||||
if (PYBIND11_TEST)
|
||||
enable_testing()
|
||||
add_subdirectory(example)
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> DEPENDS example)
|
||||
endif()
|
||||
|
||||
if (PYBIND11_INSTALL)
|
||||
|
Loading…
Reference in New Issue
Block a user