Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/scripts/check-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2024 Apple Inc. and the Swift project authors
## Copyright (c) 2025 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See https://swift.org/LICENSE.txt for license information
Expand All @@ -23,7 +23,10 @@ if [ ! -f .spi.yml ]; then
fi

if ! command -v yq &> /dev/null; then
apt -q update && apt -yq install yq
case "$(uname -s)" in
Darwin*) echo brew install yq;;
Linux*) echo apt -q update && apt -yq install yq;;
esac
fi

package_files=$(find . -maxdepth 1 -name 'Package*.swift')
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ on:
type: string
description: "Additional arguments that should be passed to docc"
default: ""
docs_check_macos_enabled:
type: boolean
description: "Boolean to enable the macOS docs check job. Defaults to false."
default: false
docs_check_macos_version:
type: string
description: "macOS version for the macOS docs check job."
default: "sequoia"
docs_check_macos_arch:
type: string
description: "macOS arch for the macOS docs check job."
default: "ARM64"
docs_check_macos_xcode_version:
type: string
description: "Xcode version for the macOS docs check job."
default: "26.0"
docs_check_macos_additional_arguments:
type: string
description: "Additional arguments that should be passed to docc for the macOS docs check job."
default: ""
unacceptable_language_check_enabled:
type: boolean
description: "Boolean to enable the acceptable language check job. Defaults to true."
Expand Down Expand Up @@ -164,6 +184,42 @@ jobs:
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }}
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh

docs-check-macos:
name: Documentation check (macOS)
if: ${{ inputs.docs_check_macos_enabled }}
runs-on: [self-hosted, macos, "${{ inputs.docs_check_macos_version }}", "${{ inputs.docs_check_macos_arch }}"]
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Select Xcode
run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ inputs.docs_check_macos_xcode_version }}.app" >> $GITHUB_ENV
- name: Swift version
run: xcrun swift --version
- name: Clang version
run: xcrun clang --version
- name: Run documentation check
env:
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_macos_additional_arguments }}
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh

unacceptable-language-check:
name: Unacceptable language check
if: ${{ inputs.unacceptable_language_check_enabled }}
Expand Down
Loading