|
49 | 49 | label: Minimum Python supported |
50 | 50 | extra-specs: | |
51 | 51 | python=3.9 |
| 52 | + - deps: |
| 53 | + label: Documentation |
| 54 | + extra-specs: >- |
| 55 | + doxygen |
| 56 | + mkdocs |
| 57 | + mkdocs-material |
| 58 | + pdoc |
| 59 | + pymdown-extensions |
| 60 | + # Build with CUDA so the Python CUDA extension is documented, |
| 61 | + # but don't try to run the tests since we're on a CPU-only builder. |
| 62 | + extra-cmake-args: -DWITH_CUDA=ON |
52 | 63 |
|
53 | 64 | name: Build And Test - ${{ matrix.os.label }} ${{ matrix.deps.label }} ${{ matrix.build-type }} |
54 | 65 | runs-on: ${{ matrix.os.runner || 'ubuntu-latest' }} |
|
75 | 86 | create-args: >- |
76 | 87 | ${{ env.extra-specs }} |
77 | 88 |
|
| 89 | + - name: Install CUDA Toolkit |
| 90 | + if: matrix.deps.label == 'Documentation' |
| 91 | + run: | |
| 92 | + micromamba install -c nvidia cuda |
| 93 | +
|
78 | 94 | # Fix missing conda command on macOS |
79 | 95 | - name: macOS conda command fixup |
80 | 96 | if: runner.os == 'macOS' |
|
98 | 114 | -DCMAKE_BUILD_TYPE=${{ env.build-type }} \ |
99 | 115 | -DCMAKE_INSTALL_PREFIX=$ISCE3_PREFIX \ |
100 | 116 | -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ |
| 117 | + ${{ matrix.extra-cmake-args }} \ |
101 | 118 | . |
102 | 119 |
|
103 | 120 | # Build the project |
@@ -125,7 +142,28 @@ jobs: |
125 | 142 |
|
126 | 143 | # Run ctest on the project with the intended test exclusions for this run |
127 | 144 | - name: Test Project |
| 145 | + if: matrix.deps.label != 'Documentation' |
128 | 146 | run: | |
129 | 147 | cd build |
130 | 148 | export GDAL_MEM_ENABLE_OPEN=YES |
131 | 149 | ctest --output-on-failure ${{ env.ctest-exclude }} |
| 150 | +
|
| 151 | + - name: Build documentation |
| 152 | + if: matrix.deps.label == 'Documentation' |
| 153 | + run: | |
| 154 | + mkdocs build -d build/docs-output |
| 155 | +
|
| 156 | + # XXX Manually create doxygen output dir, why doesn't CREATE_SUBDIRS in the config work? |
| 157 | + mkdir -p build/docs-output/api/cxx/ |
| 158 | +
|
| 159 | + doxygen build/doc/doxygen/Doxyfile |
| 160 | + export PYTHONPATH="$PYTHONPATH:$ISCE3_PREFIX/packages" |
| 161 | +
|
| 162 | + pdoc -o build/docs-output/api/python --math install/packages/isce3 |
| 163 | +
|
| 164 | + - name: Deploy documentation |
| 165 | + if: matrix.deps.label == 'Documentation' && github.ref == 'refs/heads/develop' |
| 166 | + uses: peaceiris/actions-gh-pages@v4 |
| 167 | + with: |
| 168 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 169 | + publish_dir: ./build/docs-output |
0 commit comments