|
| 1 | +name: Documentation |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - develop |
| 8 | + paths-ignore: |
| 9 | + - '.github/workflows/cov.yml' |
| 10 | + - '.github/workflows/fast.yml' |
| 11 | + - '.github/workflows/slow.yml' |
| 12 | + - 'tools/**' |
| 13 | + - '*.md' |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.head_ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + gcc: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - uses: actions/setup-python@v5 |
| 24 | + with: |
| 25 | + python-version: '3.12' |
| 26 | + |
| 27 | + - name: Install docbook dependencies |
| 28 | + run: | |
| 29 | + sudo apt-get update |
| 30 | + sudo apt-get install -y docbook-xsl docbook-xml xsltproc doxygen |
| 31 | +
|
| 32 | + - name: Create user-config.jam |
| 33 | + run: | |
| 34 | + echo "using xsltproc ;" > $HOME/user-config.jam |
| 35 | + echo "using boostbook : /usr/share/xml/docbook/stylesheet/nwalsh : /usr/share/xml/docbook/schema/dtd/4.2 ;" >> $HOME/user-config.jam |
| 36 | + echo "using doxygen : /usr/bin/doxygen ;" >> $HOME/user-config.jam |
| 37 | + echo "using python : 3.12 : /usr/bin/python3 ; " >> $HOME/user-config.jam |
| 38 | +
|
| 39 | + - uses: actions/checkout@v4 |
| 40 | + |
| 41 | + - name: Fetch Boost superproject |
| 42 | + run: | |
| 43 | + cd .. |
| 44 | + git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git |
| 45 | + cd boost |
| 46 | + mv -f $GITHUB_WORKSPACE/* libs/histogram |
| 47 | + git submodule update --init --depth 5 tools/build tools/boostdep tools/quickbook tools/boostbook |
| 48 | + python tools/boostdep/depinst/depinst.py --git_args "--depth 5 --jobs 3" histogram |
| 49 | + python tools/boostdep/depinst/depinst.py --git_args "--depth 5 --jobs 3" ../tools/quickbook |
| 50 | + mv -f * $GITHUB_WORKSPACE |
| 51 | +
|
| 52 | + - name: Prepare b2 |
| 53 | + run: ./bootstrap.sh |
| 54 | + |
| 55 | + - name: Build documentation |
| 56 | + run: | |
| 57 | + cd libs/histogram |
| 58 | + ../../b2 doc |
| 59 | +
|
| 60 | + - name: Upload documentation |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: histogram-docs |
| 64 | + path: libs/histogram/doc/html |
| 65 | + if-no-files-found: error |
0 commit comments