From 2eced45858eb8c40a7ae7e31a20d389c046d3fb9 Mon Sep 17 00:00:00 2001 From: Tom Schammo Date: Wed, 4 Dec 2024 11:51:17 +0100 Subject: [PATCH] ci(read the docs): Set up necessary dependencies Make sure necessary dependencies are installed either through `build.apt_packages` or by installing them manually using `build.commands`. --- .readthedocs.yaml | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index cd62eca..53c5165 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,10 +9,35 @@ build: os: ubuntu-22.04 tools: python: "3.11" - # You can also specify other tool versions: - # nodejs: "20" - # rust: "1.70" - # golang: "1.20" + + apt_packages: + - cmake + - build-essential + - git + - libboost-all-dev + - libomp-dev + - make + + jobs: + post_system_dependencies: + - | + mkdir /tmp/lib + git clone https://github.com/TomSchammo/cnpy/ /tmp/cnpy + cd /tmp/cnpy + git checkout cpp17 + mkdir build && cd build + cmake .. -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -DCMAKE_INSTALL_PREFIX=/tmp/lib + make VERBOSE=1 + make install + post_install: + - | + export CXXFLAGS="-fopenmp -I/tmp/lib/include" + export CFLAGS="-fopenmp -I/tmp/lib/include" + export LD_LIBRARY_PATH="/tmp/lib/lib" + export LIBRARY_PATH="/tmp/lib/lib" + export CMAKE_PREFIX_PATH=/tmp/lib + pip install . + # Build documentation in the "docs/" directory with Sphinx sphinx: