chiark / gitweb /
package/ci: set up pybind11 compilation on Travis.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 21 Apr 2019 22:05:17 +0000 (00:05 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 22 Apr 2019 15:53:36 +0000 (17:53 +0200)
package/ci/setup-pybind11.sh [new file with mode: 0755]
package/ci/travis.yml

diff --git a/package/ci/setup-pybind11.sh b/package/ci/setup-pybind11.sh
new file mode 100755 (executable)
index 0000000..b3cbbdc
--- /dev/null
@@ -0,0 +1,12 @@
+set -e
+
+wget --no-clobber https://github.com/pybind/pybind11/archive/v2.2.4.tar.gz && tar -xzf v2.2.4.tar.gz
+
+cd pybind11-2.2.4
+mkdir -p build && cd build
+cmake .. \
+    -DCMAKE_INSTALL_PREFIX=$HOME/pybind11 \
+    -DPYBIND11_PYTHON_VERSION=3.6 \
+    -DPYBIND11_TEST=OFF \
+    -G Ninja
+ninja install
index 0be5829ffa8a2dca8a931c9e4c1ef1e6302b4662..b9eb0ca5915cfc5c94569f89cc8332842141f603 100644 (file)
@@ -28,6 +28,8 @@ matrix:
         apt:
           packages:
           - graphviz
+          - cmake
+          - ninja-build
       env:
       - WITH_THEME=ON
       - WITH_DOCUMENTATION=ON
@@ -63,8 +65,11 @@ script:
   # 16.04.
   - if [ "$WITH_THEME" == "ON" ]; then cd $TRAVIS_BUILD_DIR/plugins && coverage run -m unittest && cp .coverage ../.coverage.plugins; fi
 
-  # Test documentation themes. Math rendering is not tested as dvisvgm is
-  # unusable even on 16.04.
+  # Test documentation themes. Needs also to compile a bunch of things for the
+  # pybind11 tests. Math rendering is not tested as dvisvgm is unusable even on
+  # 16.04.
+  - if [ "$WITH_DOCUMENTATION" == "ON" ] && [ ! -f $HOME/pybind11/include ]; then $TRAVIS_BUILD_DIR/package/ci/setup-pybind11.sh; fi
+  - if [ "$WITH_DOCUMENTATION" == "ON" ]; then cd $TRAVIS_BUILD_DIR/documentation/test_python && mkdir -p build && cd build && cmake -DCMAKE_PREFIX_PATH=$HOME/pybind11 -DPYBIND11_PYTHON_VERSION=3.6 -G Ninja .. && ninja; fi
   - if [ "$WITH_DOCUMENTATION" == "ON" ]; then cd $TRAVIS_BUILD_DIR/documentation && coverage run -m unittest && cp .coverage ../.coverage.doxygen; fi
 
   # Test client doxygen JS
@@ -76,10 +81,11 @@ script:
   - if [ "$WITH_THEME" == "ON" ]; then cd $TRAVIS_BUILD_DIR/css && ./postprocess.sh && git diff --color=always . | cat; fi
   - if [ "$WITH_THEME" == "ON" ]; then cd $TRAVIS_BUILD_DIR/css && git diff-index --exit-code HEAD -- .; fi
 
-# Cache the downloaded doxygen
+# Cache the downloaded doxygen and pybind11
 cache:
   directories:
   - $HOME/bin
+  - $HOME/pybind11
 
 notifications:
   webhooks: