| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- name: Build
- on: [push, pull_request, workflow_dispatch]
- env:
- BUILD_TYPE: Release
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Apt update
- run: sudo apt-get update
- - name: Install dependencies
- run: sudo apt-get install doxygen libsnmp-dev python3-pip texlive-latex-recommended texlive-fonts-recommended tex-gyre texlive-latex-extra latexmk
- - name: Install Python dependencies
- run: pip3 install -r ${{github.workspace}}/doc/requirements.txt
- - name: Show Python dependencies
- run: pip3 freeze
- - name: Configure
- shell: bash
- run: |
- cmake -E make_directory ${{github.workspace}}/build
- cmake -B ${{github.workspace}}/build -S ${{github.workspace}} \
- -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
- -DPNET_OPTION_SNMP=ON
- - name: Build
- shell: bash
- run: |
- cmake --build ${{github.workspace}}/build --target all install -j4
- - name: Test
- shell: bash
- run: |
- cmake --build ${{github.workspace}}/build --target check
- - name: Codespell
- shell: bash
- run: |
- cmake --build ${{github.workspace}}/build --target codespell
- - name: HTML documentation
- shell: bash
- run: |
- cmake --build ${{github.workspace}}/build --target sphinx-html
- - name: Store HTML documentation artifact
- uses: actions/upload-artifact@v3
- with:
- name: pnet-html
- path: ${{github.workspace}}/build/doc/sphinx/html/
- - name: PDF documentation
- shell: bash
- run: |
- cmake --build ${{github.workspace}}/build --target sphinx-pdf
- - name: Store PDF documentation artifact
- uses: actions/upload-artifact@v3
- with:
- name: pnet-pdf
- path: ${{github.workspace}}/build/doc/sphinx/latex/p-net.pdf
|