|
31 | 31 | type: string |
32 | 32 | description: "Additional arguments that should be passed to docc" |
33 | 33 | default: "" |
| 34 | + docs_check_macos_enabled: |
| 35 | + type: boolean |
| 36 | + description: "Boolean to enable the macOS docs check job. Defaults to false." |
| 37 | + default: false |
| 38 | + docs_check_macos_version: |
| 39 | + type: string |
| 40 | + description: "macOS version for the macOS docs check job." |
| 41 | + default: "sequoia" |
| 42 | + docs_check_macos_arch: |
| 43 | + type: string |
| 44 | + description: "macOS arch for the macOS docs check job." |
| 45 | + default: "ARM64" |
| 46 | + docs_check_macos_xcode_version: |
| 47 | + type: string |
| 48 | + description: "Xcode version for the macOS docs check job." |
| 49 | + default: "26.0" |
| 50 | + docs_check_macos_additional_arguments: |
| 51 | + type: string |
| 52 | + description: "Additional arguments that should be passed to docc for the macOS docs check job." |
| 53 | + default: "" |
34 | 54 | unacceptable_language_check_enabled: |
35 | 55 | type: boolean |
36 | 56 | description: "Boolean to enable the acceptable language check job. Defaults to true." |
@@ -164,6 +184,42 @@ jobs: |
164 | 184 | ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }} |
165 | 185 | run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh |
166 | 186 |
|
| 187 | + docs-check-macos: |
| 188 | + name: Documentation check (macOS) |
| 189 | + if: ${{ inputs.docs_check_macos_enabled }} |
| 190 | + runs-on: [self-hosted, macos, "${{ inputs.docs_check_macos_version }}", "${{ inputs.docs_check_macos_arch }}"] |
| 191 | + timeout-minutes: 20 |
| 192 | + steps: |
| 193 | + - name: Checkout repository |
| 194 | + uses: actions/checkout@v4 |
| 195 | + with: |
| 196 | + persist-credentials: false |
| 197 | + submodules: true |
| 198 | + - name: Checkout swiftlang/github-workflows repository |
| 199 | + if: ${{ github.repository != 'swiftlang/github-workflows' }} |
| 200 | + uses: actions/checkout@v4 |
| 201 | + with: |
| 202 | + repository: swiftlang/github-workflows |
| 203 | + path: github-workflows |
| 204 | + - name: Determine script-root path |
| 205 | + id: script_path |
| 206 | + run: | |
| 207 | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then |
| 208 | + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT |
| 209 | + else |
| 210 | + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT |
| 211 | + fi |
| 212 | + - name: Select Xcode |
| 213 | + run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ inputs.docs_check_macos_xcode_version }}.app" >> $GITHUB_ENV |
| 214 | + - name: Swift version |
| 215 | + run: xcrun swift --version |
| 216 | + - name: Clang version |
| 217 | + run: xcrun clang --version |
| 218 | + - name: Run documentation check |
| 219 | + env: |
| 220 | + ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_macos_additional_arguments }} |
| 221 | + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh |
| 222 | + |
167 | 223 | unacceptable-language-check: |
168 | 224 | name: Unacceptable language check |
169 | 225 | if: ${{ inputs.unacceptable_language_check_enabled }} |
|
0 commit comments