File: docs.yml

package info (click to toggle)
manif 0.0.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,576 kB
  • sloc: cpp: 11,789; ansic: 8,774; python: 2,158; sh: 24; makefile: 23; xml: 21
file content (108 lines) | stat: -rw-r--r-- 2,991 bytes parent folder | download
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: documentation
on:
  push:
    branches: devel
  pull_request:
    branches:
      - devel
  workflow_dispatch:

jobs:

  # There is no way as of now to move artifacts around jobs and
  # across workflows. So we build the Python bindings here too.
  build:
    runs-on: ubuntu-20.04
    steps:

      # Build manifpy

      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.6
      - name: Setup apt
        run: |
          sudo apt update
          sudo apt install -y libeigen3-dev
      - name: Setup
        run: |
          python -m pip install --upgrade pip
          python -m pip install build
      - name: Build
        run: python -m pip install -v .

  # build:
  #   runs-on: ubuntu-20.04
  #   needs: [pybind11]
  #   steps:
  #     - name: Checkout
  #       uses: actions/checkout@v2
  #     - name: Set up Python
  #       uses: actions/setup-python@v2

      # Build documentation website

      - name: Fetch apt deps
        run: |
          sudo apt update
          sudo apt install -y libeigen3-dev flex bison graphicsmagick-imagemagick-compat

      - name: Make install Doxygen
        run: |
          git clone --depth 1 --branch Release_1_9_1 https://github.com/doxygen/doxygen.git
          cd doxygen && mkdir build && cd build
          cmake -G "Unix Makefiles" ..
          sudo make install

      - name: Fetch Python deps
        run: python -m pip install jinja2 Pygments docutils
      - name: Fetch m.css
        uses: actions/checkout@v3
        with:
          repository: mosra/m.css
          path: docs/m.css

      - name: Build Python docs
        working-directory: ${{runner.workspace}}/manif/docs
        run: python m.css/documentation/python.py conf_python.py
      - name: Build C++ docs
        working-directory: ${{runner.workspace}}/manif/docs
        run: |
          mkdir -p site/cpp
          python m.css/documentation/doxygen.py conf_cpp.py
      - name: Build site
        working-directory: ${{runner.workspace}}/manif/docs
        run: python m.css/documentation/doxygen.py conf.py

      - name: Latex equation white color
        working-directory: ${{runner.workspace}}/manif/docs
        run: ./fix_latex_color.sh

      - name: Archive artifacts
        uses: actions/upload-artifact@v2
        with:
          name: site
          path: docs/site

  deploy:
    runs-on: ubuntu-20.04
    needs: [build]
    # todo: deploy if new tag/release
    if: |
      github.repository == 'artivis/manif' &&
      github.event_name == 'push' && github.ref == 'refs/heads/devel'
    steps:
      - name: Download artifacts
        uses: actions/download-artifact@v2
        with:
          name: site
          path: site
      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@3.7.1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages
          FOLDER: site