Skip to content
Merged
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
19 changes: 16 additions & 3 deletions .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
type: string
description: "Path to a file that will be passed as --breakage-allowlist-path to swift package diagnose-api-breaking-changes"
default: ""
api_breakage_check_baseline:
type: string
description: "The tag against which API breakages that should be used as the baseline for the API breakage check. By default the PR base is used."
default: ""
api_breakage_check_container_image:
type: string
description: "Container image for the API breakage check job. Defaults to latest Swift Ubuntu image."
Expand Down Expand Up @@ -95,19 +99,28 @@ jobs:
with:
persist-credentials: false
submodules: true
fetch-tags: true
fetch-depth: 0 # Fetching tags requires fetch-depth: 0 (https://github.com/actions/checkout/issues/1471)
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Pre-build
if: ${{ inputs.linux_pre_build_command }}
run: ${{ inputs.linux_pre_build_command }}
- name: Run API breakage check
shell: bash
run: |
git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
if [[ -z '${{ inputs.api_breakage_check_baseline }}' ]]; then
git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
BASELINE_REF='pull-base-ref'
else
BASELINE_REF='${{ inputs.api_breakage_check_baseline }}'
fi
echo "Using baseline: $BASELINE_REF"
if [[ -z '${{ inputs.api_breakage_check_allowlist_path }}' ]]; then
swift package diagnose-api-breaking-changes pull-base-ref
swift package diagnose-api-breaking-changes "$BASELINE_REF"
else
swift package diagnose-api-breaking-changes pull-base-ref --breakage-allowlist-path '${{ inputs.api_breakage_check_allowlist_path }}'
swift package diagnose-api-breaking-changes "$BASELINE_REF" --breakage-allowlist-path '${{ inputs.api_breakage_check_allowlist_path }}'
fi

docs-check:
Expand Down