mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-07 17:15:29 +00:00
### Description When API docs workflows fail, we typically don't catch the issue until the most recently generated artifact expires. The current artifact retention is 60 days, so by decreasing to 30 days, we can ensure that we're resolving the workflow failures more quickly. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Update C/C++ API Docs
|
|
|
|
# Run when the C API changes or every month so that the artifact does not expire
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- include/onnxruntime/core/session/**
|
|
- orttraining/orttraining/training_api/include/**
|
|
schedule:
|
|
- cron: '0 0 1 * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "apidocs-c"
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Generate C/C++ API docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install doxygen and dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get install libclang-dev
|
|
sudo apt-get install libclang-cpp14
|
|
wget https://www.doxygen.nl/files/doxygen-1.9.8.linux.bin.tar.gz
|
|
tar xvzf doxygen-1.9.8.linux.bin.tar.gz
|
|
- name: Run doxygen
|
|
run: |
|
|
mkdir -p build/doxygen
|
|
cd docs/c_cxx
|
|
../../doxygen-1.9.8/bin/doxygen
|
|
- name: Log source commit
|
|
run: git rev-parse --short HEAD > build/doxygen/html/source-version.txt
|
|
- name: Move C/C++ docs into site
|
|
run: |
|
|
mkdir -p _site/docs/api
|
|
rm -rf site/docs/api/c
|
|
mv build/doxygen/html _site/docs/api/c
|
|
- name: Upload new site
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: onnxruntime-c-apidocs
|
|
path: _site
|
|
retention-days: 30
|