Skip to content

Add API stability check #5288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025
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
69 changes: 69 additions & 0 deletions .github/workflows/api-stability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: API Stability Check

on:
pull_request:
paths:
- "Sources/**"
- "test-server/**"
- ".github/workflows/api-stability.yml"
- Sentry.xcworkspace/**
- Sentry.xcodeproj/**
- "Package.swift"
- "scripts/build-xcframework.sh"

jobs:
api-stability:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./scripts/ci-select-xcode.sh 16.3

- name: Build SDK
run: |
./scripts/build-xcframework.sh iOSOnly

- name: Dump SDK at HEAD
run: |
xcrun --sdk iphoneos swift-api-digester \
-dump-sdk \
-o out_head.json \
-abort-on-module-fail \
-avoid-tool-args \
-avoid-location \
-module Sentry \
-target arm64-apple-ios10.0 \
-iframework ./Carthage/Sentry-Dynamic.xcframework/ios-arm64_arm64e

- name: Checkout PR base
run: |
git checkout ${{ github.event.pull_request.base.sha }}

- name: Build SDK
run: |
./scripts/build-xcframework.sh iOSOnly

- name: Dump SDK at BASE
run: |
xcrun --sdk iphoneos swift-api-digester \
-dump-sdk \
-o out_base.json \
-abort-on-module-fail \
-avoid-tool-args \
-avoid-location \
-module Sentry \
-target arm64-apple-ios10.0 \
-iframework ./Carthage/Sentry-Dynamic.xcframework/ios-arm64_arm64e

- name: Diagnose breaking changes
run: |
xcrun --sdk iphoneos swift-api-digester \
-diagnose-sdk \
-o result.json \
-input-paths out_base.json \
-input-paths out_head.json \
-json \
-v
cat result.json
Loading