API Stability CI #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API Stability CI | |
on: | |
workflow_dispatch: | |
jobs: | |
build_linux: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04, macos-latest] | |
swift: ["5.9", "5.8", "5.7"] | |
name: Check Swift ${{ matrix.swift }} API Stability on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- if: ${{ runner.os == 'Linux' }} | |
uses: slashmo/install-swift@v0.4.0 | |
with: | |
version: ${{ matrix.swift }} | |
- if: ${{ runner.os == 'macOS' }} | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest | |
- name: Setup SSH Key | |
run: | | |
rm -rf ~/.ssh | |
mkdir -m 0700 ~/.ssh | |
echo "${{ secrets.WORKFLOWS_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | |
echo "${{ secrets.WORKFLOWS_SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub | |
chmod 0600 ~/.ssh/id_ed25519 | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
#- name: Reconfigure Private Repo URLs | |
# run: sed -i 's/git@github.com:/https:\/\/${{ secrets.ACCESS_TOKEN }}@github.com\//g' Package.swift | |
- name: Check API Stability | |
run: swift package diagnose-api-breaking-changes `git tag | sort --version-sort | tail -n1` |