Skip to content

feat: Removed dependency on Foundation #39

feat: Removed dependency on Foundation

feat: Removed dependency on Foundation #39

name: Swift check API breaks
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
jobs:
analyze-api-breakage:
runs-on: [ubuntu-latest]
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libjemalloc-dev
- name: Extract default SPM library target
id: spm_target
run: |
SPM_DEFAULT_TARGET=$(swift package dump-package | jq -r '.products | .[] | select(.type | has("library")) | .name' | head -1)
echo "spmlibrarytarget=${SPM_DEFAULT_TARGET}" >> $GITHUB_ENV
- name: Build
if: ${{ env.spmlibrarytarget }}
run: swift build
- name: Analyze API breakage
if: ${{ env.spmlibrarytarget }}
run: swift package diagnose-api-breaking-changes origin/main --targets ${{ env.spmlibrarytarget }}