Skip to content

Dev stage for documentation actions #33

Dev stage for documentation actions

Dev stage for documentation actions #33

name: Documentation Tests
on:
pull_request:
branches:
- dev_stage
- main
jobs:
sphinx:
runs-on: windows-latest
strategy:
max-parallel: 0
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
with: # for github push action
#persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Configure cmake
run: |
cmake -S src -B build -G "Visual Studio 17 2022" -A x64 `
-DDHARTAPI_Config=All `
-DDHARTAPI_EnableTests=False `
-DCMAKE_CONFIGURATION_TYPES=Release `
-DDHARTAPI_EnablePython=True `
-DDHARTAPI_EnableCSharp=False `
-DINSTALL_GTEST=False `
-DCMAKE_INSTALL_PREFIX="D:/a/dhart/dhart/build/Python"
- name: Build
run: cmake --build build --config Release
- name: Install
run: cmake --install build --config Release
- name: Add build directory to PATH
run: |
$env:PATH += ";D:/a/dhart/dhart/build/Python/bin"
- name: Check Install Location
run: |
cd "D:/a/dhart/dhart/build/Python"
ls
cd bin
ls
cd ..
cd dhart
ls
cd bin
ls
- name: Build and Install Wheel
run: |
cd "D:/a/dhart/dhart/build/Python"
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy matplotlib scipy
python -m pip install -i https://test.pypi.org/simple/ dhart
- name: Check Python Install
run: |
python -c "from dhart.spatialstructures import Graph"
python -c "import platform; print(platform.architecture())"
python -c "import dhart; print(dhart.__file__)"
- name: Install dependencies
run: |
python -m pip install flake8 pytest
- name: Install documentation dependencies
run: |
python -m pip install sphinx numpydoc matplotlib
- name: Check installed package
run: |
pip show dhart
python -c "import platform; print(platform.architecture())"
python -c "import dhart; print(dhart.__file__)"
- name: Build documentation with sphinx
run: |
cd "docs/Python Docs"
ls
./make.bat clean
./make.bat html
# make latexpdf
cd build
ls
cd html
ls
- name: Run sphinx doctests
run: |
cd "docs/Python Docs"
ls
./make.bat clean
./make.bat doctest
- name: Run pytest
run: |
cd "build/Python"
ls
pytest --doctest-modules --ignore-glob="*/Rhino*.py"