Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 1 | parameters: |
| 2 | latex: false |
| 3 | upload: false |
| 4 | |
| 5 | steps: |
| 6 | - checkout: self |
| 7 | clean: true |
| 8 | fetchDepth: 5 |
| 9 | |
| 10 | - task: UsePythonVersion@0 |
| 11 | displayName: 'Use Python 3.6 or later' |
| 12 | inputs: |
| 13 | versionSpec: '>=3.6' |
| 14 | |
Julien Palard | c8a10d2 | 2020-12-15 17:23:03 +0100 | [diff] [blame] | 15 | - script: python -m pip install sphinx==3.2.1 blurb python-docs-theme |
Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 16 | displayName: 'Install build dependencies' |
| 17 | |
| 18 | - ${{ if ne(parameters.latex, 'true') }}: |
Julien Palard | c9c6e9f | 2020-11-25 10:18:00 +0100 | [diff] [blame] | 19 | - script: make check html PYTHON=python |
Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 20 | workingDirectory: '$(build.sourcesDirectory)/Doc' |
| 21 | displayName: 'Build documentation' |
| 22 | |
| 23 | - ${{ if eq(parameters.latex, 'true') }}: |
Julien Palard | c987090 | 2019-10-22 18:13:41 +0200 | [diff] [blame] | 24 | - script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full |
Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 25 | displayName: 'Install LaTeX' |
| 26 | |
| 27 | - script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' |
| 28 | workingDirectory: '$(build.sourcesDirectory)/Doc' |
| 29 | displayName: 'Build documentation' |
| 30 | |
| 31 | - ${{ if eq(parameters.upload, 'true') }}: |
| 32 | - task: PublishBuildArtifacts@1 |
| 33 | displayName: 'Publish docs' |
Julien Palard | c8a10d2 | 2020-12-15 17:23:03 +0100 | [diff] [blame] | 34 | |
Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 35 | inputs: |
| 36 | PathToPublish: '$(build.sourcesDirectory)/Doc/build' |
| 37 | ArtifactName: docs |
| 38 | publishLocation: Container |
| 39 | |
| 40 | - ${{ if eq(parameters.latex, 'true') }}: |
| 41 | - task: PublishBuildArtifacts@1 |
| 42 | displayName: 'Publish dist' |
| 43 | inputs: |
| 44 | PathToPublish: '$(build.sourcesDirectory)/Doc/dist' |
| 45 | ArtifactName: docs_dist |
| 46 | publishLocation: Container |