mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-26 19:52:38 +00:00
Add workflow to update Objective-C docs. (#15413)
Add workflow to update Objective-C API docs. Remove the Objective-C API doc generation step from the packaging pipeline. There are similar workflows for automatically updating other language API docs. This change enables this for Objective-C too.
This commit is contained in:
parent
8db86f2c52
commit
666aff56a4
6 changed files with 54 additions and 19 deletions
51
.github/workflows/publish-objectivec-apidocs.yml
vendored
Normal file
51
.github/workflows/publish-objectivec-apidocs.yml
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
name: Update Objective-C API Docs
|
||||
|
||||
# Run when the Objective-C API changes or every month so that the artifact does not expire
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- objectivec
|
||||
schedule:
|
||||
- cron: '0 0 1 * *'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: "apidocs-objectivec"
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Generate Objective-C API docs
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Jazzy
|
||||
run: |
|
||||
sudo gem install jazzy --version 0.14.3
|
||||
|
||||
- name: Generate Objective-C docs
|
||||
run: |
|
||||
set -e
|
||||
|
||||
# add commit info to main page of generated docs
|
||||
ORT_COMMIT_SHORT="$(git rev-parse --short HEAD)"
|
||||
printf "\n%s\n" \
|
||||
"This documentation was generated from the ONNX Runtime source at commit ${ORT_COMMIT_SHORT}." \
|
||||
>> ./objectivec/docs/main_page.md
|
||||
|
||||
jazzy --config ./objectivec/docs/jazzy_config.yaml \
|
||||
--clean --output ./_site/docs/api/objectivec
|
||||
shell: bash
|
||||
|
||||
- name: Upload new site
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: onnxruntime-objectivec-apidocs
|
||||
path: ./_site
|
||||
retention-days: 60
|
||||
|
|
@ -7,7 +7,7 @@ objc: true
|
|||
umbrella_header: ../include/onnxruntime.h
|
||||
framework_root: ..
|
||||
|
||||
readme: ./docs.readme.md
|
||||
readme: ./main_page.md
|
||||
|
||||
hide_documentation_coverage: true
|
||||
undocumented_text: ""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ The API should be documented with comments in the [public header files](../inclu
|
|||
|
||||
The [Jazzy](https://github.com/realm/jazzy) tool is used to generate documentation from the code.
|
||||
|
||||
For example, to generate documentation for a release version, from the repo root, run:
|
||||
To generate documentation, from the repo root, run:
|
||||
|
||||
```bash
|
||||
jazzy --config objectivec/docs/jazzy_config.yaml --output <output directory>
|
||||
|
|
@ -14,4 +14,4 @@ jazzy --config objectivec/docs/jazzy_config.yaml --output <output directory>
|
|||
|
||||
The generated documentation website files will be in `<output directory>`.
|
||||
|
||||
[docs.readme.md](./docs.readme.md) contains content for the main page of the generated documentation website.
|
||||
[main_page.md](./main_page.md) contains content for the main page of the generated documentation website.
|
||||
|
|
|
|||
|
|
@ -53,12 +53,3 @@ assemble_and_upload_pod "onnxruntime-mobile-c"
|
|||
assemble_and_upload_pod "onnxruntime-mobile-objc"
|
||||
assemble_and_upload_pod "onnxruntime-c"
|
||||
assemble_and_upload_pod "onnxruntime-objc"
|
||||
|
||||
cd ${BINARIES_STAGING_DIR}/objc_api_docs
|
||||
zip -r ${ARTIFACTS_STAGING_DIR}/objc_api_docs.zip *
|
||||
|
||||
cat > ${ARTIFACTS_STAGING_DIR}/readme.txt <<'EOM'
|
||||
Release TODO:
|
||||
- publish the podspecs
|
||||
- publish the Objective-C API documentation
|
||||
EOM
|
||||
|
|
|
|||
|
|
@ -175,13 +175,6 @@ jobs:
|
|||
--token $(app_center_api_token)
|
||||
displayName: "[Full] Run E2E tests on App Center"
|
||||
|
||||
- bash: |
|
||||
set -e
|
||||
gem install jazzy
|
||||
jazzy --config objectivec/docs/jazzy_config.yaml \
|
||||
--output "$(Build.BinariesDirectory)/staging/objc_api_docs"
|
||||
displayName: "Generate Objective-C API docs"
|
||||
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'AIInfraBuildOnnxRuntimeOSS'
|
||||
|
|
|
|||
Loading…
Reference in a new issue