-
Notifications
You must be signed in to change notification settings - Fork 194
68 lines (56 loc) · 1.93 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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