Skip to content

Commit 4d1a436

Browse files
committed
api break 2
1 parent b857d7d commit 4d1a436

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ jobs:
1111
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
1212
with:
1313
license_header_check_project_name: "gRPC"
14-
# See Package.swift for an explanation of this.
15-
linux_pre_build_command: "export GRPC_SWIFT_PROTOBUF_NO_VERSION=1"
14+
# This is done by a similar job defined in soundness.yml. It needs to be
15+
# separate in order to export an environment variable.
16+
api_breakage_check_enabled: false
1617

1718
grpc-soundness:
1819
name: Soundness

.github/workflows/soundness.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,28 @@ jobs:
3535
- name: Check generated code
3636
run: |
3737
./dev/check-generated-code.sh
38+
39+
api-breakage-check:
40+
name: API breakage check
41+
runs-on: ubuntu-latest
42+
container:
43+
image: swift:latest
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
with:
48+
persist-credentials: false
49+
fetch-depth: 0 # Fetching tags requires fetch-depth: 0 (https://github.com/actions/checkout/issues/1471)
50+
- name: Mark the workspace as safe
51+
# https://github.com/actions/checkout/issues/766
52+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
53+
- name: Run API breakage check
54+
shell: bash
55+
# See package.swift for why we set GRPC_SWIFT_PROTOBUF_NO_VERSION=1
56+
run: |
57+
export GRPC_SWIFT_PROTOBUF_NO_VERSION=1
58+
59+
git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
60+
BASELINE_REF='pull-base-ref'
61+
echo "Using baseline: $BASELINE_REF"
62+
swift package diagnose-api-breaking-changes "$BASELINE_REF"

0 commit comments

Comments
 (0)