From 7d5045153722952b1b662620290e4d3f462d4fe8 Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Thu, 10 Sep 2026 09:54:51 -0700 Subject: [PATCH 1/4] pin mustache version --- .github/workflows/publish-objectivec-apidocs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-objectivec-apidocs.yml b/.github/workflows/publish-objectivec-apidocs.yml index 139ce756db9ea..ef70f3084357c 100644 --- a/.github/workflows/publish-objectivec-apidocs.yml +++ b/.github/workflows/publish-objectivec-apidocs.yml @@ -39,9 +39,11 @@ jobs: add-cmake-to-path: 'true' disable-terrapin: 'true' - - name: Install Jazzy + - name: Install Jazzy and dependencies run: | - sudo gem install jazzy --version 0.14.3 + gem install 'jazzy:0.14.3' \ + 'mustache:<1.1.3' # pin version as workaround for issue: https://github.com/realm/jazzy/issues/1435 + - name: Generate Objective-C docs run: | From 51a335d8d2cc396621ae011756a1c2fc5b947545 Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Thu, 10 Sep 2026 11:02:23 -0700 Subject: [PATCH 2/4] Fix Objective-C API docs gem resolution Use Bundler to constrain Jazzy's Mustache dependency and execute Jazzy with the resolved bundle. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/publish-objectivec-apidocs.yml | 12 +++++++----- objectivec/docs/Gemfile | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 objectivec/docs/Gemfile diff --git a/.github/workflows/publish-objectivec-apidocs.yml b/.github/workflows/publish-objectivec-apidocs.yml index ef70f3084357c..83260902211bc 100644 --- a/.github/workflows/publish-objectivec-apidocs.yml +++ b/.github/workflows/publish-objectivec-apidocs.yml @@ -30,6 +30,7 @@ jobs: timeout-minutes: 120 steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@d19341fb036c43a947a2c0e4a53ad4d15e10bc5c # v0.0.9 with: vcpkg-version: '2025.08.27' @@ -40,12 +41,13 @@ jobs: disable-terrapin: 'true' - name: Install Jazzy and dependencies - run: | - gem install 'jazzy:0.14.3' \ - 'mustache:<1.1.3' # pin version as workaround for issue: https://github.com/realm/jazzy/issues/1435 - + env: + BUNDLE_GEMFILE: ./objectivec/docs/Gemfile + run: bundle install - name: Generate Objective-C docs + env: + BUNDLE_GEMFILE: ./objectivec/docs/Gemfile run: | set -e @@ -55,7 +57,7 @@ jobs: "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 \ + bundle exec jazzy --config ./objectivec/docs/jazzy_config.yaml \ --clean --output ./_site/docs/api/objectivec shell: bash diff --git a/objectivec/docs/Gemfile b/objectivec/docs/Gemfile new file mode 100644 index 0000000000000..f17f980628813 --- /dev/null +++ b/objectivec/docs/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "jazzy", "0.14.3" +gem "mustache", "< 1.1.3" # Work around https://github.com/realm/jazzy/issues/1435. From f79938d8ceaf97461455bac0f0e1bc43a0acd703 Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Thu, 10 Sep 2026 11:23:37 -0700 Subject: [PATCH 3/4] Document Objective-C API docs dependencies Explain how to install and run the documentation generation dependencies using the docs Gemfile and Bundler. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- objectivec/docs/readme.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/objectivec/docs/readme.md b/objectivec/docs/readme.md index 56974802900bc..894aece5ca2a3 100644 --- a/objectivec/docs/readme.md +++ b/objectivec/docs/readme.md @@ -4,12 +4,23 @@ The API should be documented with comments in the [public header files](../inclu ## Documentation Generation +Documentation generation dependencies are defined in [Gemfile](./Gemfile) and managed with +[Bundler](https://bundler.io/). + The [Jazzy](https://github.com/realm/jazzy) tool is used to generate documentation from the code. -To generate documentation, from the repo root, run: +To install the dependencies, from the repo root, run: + +```bash +BUNDLE_GEMFILE=objectivec/docs/Gemfile bundle install +``` + +Then, to generate the documentation, run: ```bash -jazzy --config objectivec/docs/jazzy_config.yaml --output +BUNDLE_GEMFILE=objectivec/docs/Gemfile bundle exec jazzy \ + --config objectivec/docs/jazzy_config.yaml \ + --output ``` The generated documentation website files will be in ``. From 3cc31a9f7444ce6822d2914cc35f5428fe1c32aa Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Thu, 10 Sep 2026 11:24:35 -0700 Subject: [PATCH 4/4] update jazzy version --- objectivec/docs/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objectivec/docs/Gemfile b/objectivec/docs/Gemfile index f17f980628813..192af7e9e482c 100644 --- a/objectivec/docs/Gemfile +++ b/objectivec/docs/Gemfile @@ -1,4 +1,4 @@ source "https://rubygems.org" -gem "jazzy", "0.14.3" +gem "jazzy", "0.15.4" gem "mustache", "< 1.1.3" # Work around https://github.com/realm/jazzy/issues/1435.