mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-18 18:52:16 +00:00
Update C/C++ API docs automation to create a PR (instead of push to publish branch) (#10093)
This commit is contained in:
parent
5ebb857501
commit
d52d3c0052
3 changed files with 28 additions and 21 deletions
29
.github/workflows/publish-c-apidocs.yml
vendored
29
.github/workflows/publish-c-apidocs.yml
vendored
|
|
@ -1,10 +1,10 @@
|
||||||
name: Publish C/C++ API Docs
|
name: Update C/C++ API Docs
|
||||||
on:
|
on:
|
||||||
workflow_dispatch
|
workflow_dispatch
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish C/C++ API docs
|
name: Generate C/C++ API docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
@ -15,16 +15,29 @@ jobs:
|
||||||
sudo apt-get install libclang-cpp9
|
sudo apt-get install libclang-cpp9
|
||||||
wget https://www.doxygen.nl/files/doxygen-1.9.2.linux.bin.tar.gz
|
wget https://www.doxygen.nl/files/doxygen-1.9.2.linux.bin.tar.gz
|
||||||
tar xvzf doxygen-1.9.2.linux.bin.tar.gz
|
tar xvzf doxygen-1.9.2.linux.bin.tar.gz
|
||||||
|
- name: Set commit ID
|
||||||
|
id: vars
|
||||||
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
- name: Run doxygen
|
- name: Run doxygen
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build/doxygen
|
mkdir -p build/doxygen
|
||||||
cd docs/c_cxx
|
cd docs/c_cxx
|
||||||
../../doxygen-1.9.2/bin/doxygen
|
../../doxygen-1.9.2/bin/doxygen
|
||||||
- name: Publish
|
- uses: actions/checkout@v2
|
||||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
||||||
with:
|
with:
|
||||||
BRANCH: gh-pages
|
ref: gh-pages
|
||||||
FOLDER: build/doxygen/html
|
clean: false
|
||||||
TARGET_FOLDER: docs/api/c
|
- name: Move API docs into target area
|
||||||
CLEAN_EXCLUDE: '["_config.yml"]'
|
run: |
|
||||||
|
rm -rf docs/api/c
|
||||||
|
mv build/doxygen/html docs/api/c
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
branch: gh-pages-pr
|
||||||
|
base: gh-pages
|
||||||
|
title: '[Automated]: Update C/C++ API docs'
|
||||||
|
commit-message: 'Update C/C++ API docs to commit ${{ steps.vars.outputs.sha_short }}'
|
||||||
|
add-paths: docs/api/c
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
How to build the Doxygen HTML pages on Windows:
|
# ONNX Runtime C/C++ docs source files
|
||||||
|
|
||||||
* Install Doxygen (https://www.doxygen.nl/download.html)
|
This directory contains doxygen configuration to generate the C/C++ API docs for ONNX Runtime.
|
||||||
* Running from the command line:
|
|
||||||
* cd to (Repository Root)\docs\c_cxx
|
|
||||||
* Run "\Program Files\doxygen\bin\doxygen.exe" Doxyfile
|
|
||||||
* Using the Doxygen GUI app:
|
|
||||||
* Launch Doxygen GUI (Doxywizard)
|
|
||||||
* File->Open (Repository Root)\docs\c_cxx\Doxyfile
|
|
||||||
* Switch to Run tab, click 'Run doxygen'
|
|
||||||
* Generated docs are written to (Repository Root)\build\doxygen\html
|
|
||||||
|
|
||||||
The generated documentation is online in the gh-pages branch of the project: https://github.com/microsoft/onnxruntime/tree/gh-pages/docs/api/c
|
The actual generation is performed by a GitHub actions workflow: [publish-c-apidocs.yml](../../.github/workflows/publish-c-apidocs.yml).
|
||||||
|
|
||||||
|
The workflow is currently manually triggered, and generates a PR to the gh-pages branch, for publication on https://onnxruntime.ai.
|
||||||
|
|
@ -7,11 +7,11 @@
|
||||||
*
|
*
|
||||||
* <h1>C</h1>
|
* <h1>C</h1>
|
||||||
*
|
*
|
||||||
* ::OrtApi - Click here to jump to the structure with all C API functions.
|
* ::OrtApi - Click here to go to the structure with all C API functions.
|
||||||
*
|
*
|
||||||
* <h1>C++</h1>
|
* <h1>C++</h1>
|
||||||
*
|
*
|
||||||
* ::Ort - Click here to jump to the namespace holding all of the C++ wrapper classes
|
* ::Ort - Click here to go to the namespace holding all of the C++ wrapper classes
|
||||||
*
|
*
|
||||||
* It is a set of header only wrapper classes around the C API. The goal is to turn the C style return value error codes into C++ exceptions, and to
|
* It is a set of header only wrapper classes around the C API. The goal is to turn the C style return value error codes into C++ exceptions, and to
|
||||||
* automate memory management through standard C++ RAII principles.
|
* automate memory management through standard C++ RAII principles.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue