File: documentation.yml

package info (click to toggle)
open3d 0.19.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 83,496 kB
  • sloc: cpp: 206,543; python: 27,254; ansic: 8,356; javascript: 1,883; sh: 1,527; makefile: 259; xml: 69
file content (103 lines) | stat: -rw-r--r-- 3,459 bytes parent folder | download | duplicates (2)
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
name: Documentation
permissions: {}

on:
  workflow_dispatch:
    inputs:
      developer_build:
        description: 'Set to OFF for Release documentation'
        required: false
        default: 'ON'
  push:
    branches:
      - main
  pull_request:
    types: [opened, reopened, synchronize]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  headless-docs:   # Build headless and docs
    permissions:
      contents: write  # Artifact upload and release upload
    # Pinning to 22.04 instead of ubuntu-latest until 24.04 is supported
    # (see https://github.com/isl-org/Open3D/pull/7105)
    runs-on: ubuntu-22.04
    env:
      OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
      DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
    steps:
      - name: Checkout Open3D source code
        uses: actions/checkout@v4

      - name: Maximize build space
        run: |
          source util/ci_utils.sh
          maximize_ubuntu_github_actions_build_space

      - name: Checkout Open3D-ML source code
        uses: actions/checkout@v4
        with:
          repository: isl-org/Open3D-ML
          path: ${{ env.OPEN3D_ML_ROOT }}

      - name: Setup cache
        uses: actions/cache@v4
        with:
          # Ref: https://github.com/apache/incubator-mxnet/pull/18459/files
          path: ~/.ccache
          # We include the commit sha in the cache key, as new cache entries are
          # only created if there is no existing entry for the key yet.
          key: ${{ runner.os }}-ccache-${{ github.sha }}
          # Restore any ccache cache entry, if none for
          # ${{ runner.os }}-ccache-${{ github.sha }} exists.
          # Common prefix will be used so that ccache can be used across commits.
          restore-keys: |
            ${{ runner.os }}-ccache
      - name: Set up Python version
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install dependencies
        env:
          DEBIAN_FRONTEND: noninteractive
        run: |
          # the build system of the main repo expects a main branch. make sure
          # main exists
          pushd "${OPEN3D_ML_ROOT}"
          git checkout -b main || true
          popd
          source util/ci_utils.sh
          install_docs_dependencies "${OPEN3D_ML_ROOT}"
      - name: Build docs
        run: |
          PATH=/usr/lib/ccache:$PATH
          ccache -M 2G  # See .github/workflows/readme.md for ccache strategy.
          ccache -s
          source util/ci_utils.sh
          build_docs "$DEVELOPER_BUILD"
          # PWD: Open3D/docs
          ccache -s
          tar_file="open3d-${GITHUB_SHA}-docs.tar.gz"
          rm -rf "${GITHUB_WORKSPACE}/${tar_file}"
          # Docs in docs/_out/html
          tar -C _out -cvzf "${GITHUB_WORKSPACE}/${tar_file}" html

      - name: Upload docs
        uses: actions/upload-artifact@v4
        with:
          name: open3d-${{ github.sha }}-docs.tar.gz
          path: open3d-${{ github.sha }}-docs.tar.gz
          if-no-files-found: error
          compression-level: 0 # no compression

      - name: Update devel release
        if: ${{ github.ref == 'refs/heads/main' }}
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          gh release upload main-devel open3d-${{ github.sha }}-docs.tar.gz --clobber
          gh release view main-devel