Skip to content

Commit 5eda116

Browse files
committed
chore: update CI, swiftlint, swift-format
1 parent 9d202a6 commit 5eda116

File tree

5 files changed

+45
-22
lines changed

5 files changed

+45
-22
lines changed

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: [coenttb]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: "swift"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
- package-ecosystem: "github-actions"
88
directory: "/"
99
schedule:

.github/workflows/ci.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
uses: actions/cache@v4
3232
with:
3333
path: .build
34-
key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }}
34+
key: macos-swift62-spm-${{ hashFiles('Package.swift', 'Package@*.swift') }}
3535
restore-keys: |
36-
${{ runner.os }}-spm-
36+
macos-swift62-spm-
3737
3838
# Note: swift test builds automatically, no separate build step needed
3939
- name: Test
@@ -42,6 +42,21 @@ jobs:
4242
- name: Validate Package.swift
4343
run: swift package dump-package
4444

45+
- name: Check for API breaking changes
46+
id: api-diff
47+
run: |
48+
echo "## API Breaking Changes Check" >> $GITHUB_STEP_SUMMARY
49+
if swift package diagnose-api-breaking-changes --breakage-allowlist-path .swift-api-breakage-allowlist 2>&1 | tee api-diff.txt; then
50+
echo "✅ No API breaking changes detected" >> $GITHUB_STEP_SUMMARY
51+
else
52+
echo "⚠️ API breaking changes detected:" >> $GITHUB_STEP_SUMMARY
53+
echo '```' >> $GITHUB_STEP_SUMMARY
54+
cat api-diff.txt >> $GITHUB_STEP_SUMMARY
55+
echo '```' >> $GITHUB_STEP_SUMMARY
56+
echo "::warning::API breaking changes detected. Review changes before release."
57+
fi
58+
continue-on-error: true
59+
4560
# Production validation: Latest Swift on Linux with release build
4661
linux-latest:
4762
name: Ubuntu (Swift 6.2, release)
@@ -54,28 +69,29 @@ jobs:
5469
uses: actions/cache@v4
5570
with:
5671
path: .build
57-
key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }}
58-
restore-keys: ${{ runner.os }}-spm-
72+
key: linux-swift62-spm-${{ hashFiles('Package.swift', 'Package@*.swift') }}
73+
restore-keys: linux-swift62-spm-
5974

6075
# Note: swift test builds automatically in release mode
6176
- name: Test (release)
6277
run: swift test -c release
6378

64-
# Compatibility check: Minimum supported Swift version (6.0)
79+
# Compatibility check: Minimum supported Swift version (6.2)
80+
# Update to swift:6.3 when available
6581
linux-compat:
66-
name: Ubuntu (Swift 6.0, compatibility)
82+
name: Ubuntu (Swift 6.2, compatibility)
6783
runs-on: ubuntu-latest
68-
container: swift:6.0
84+
container: swift:6.2
6985
steps:
7086
- uses: actions/checkout@v5
7187

7288
- name: Cache Swift packages
7389
uses: actions/cache@v4
7490
with:
7591
path: .build
76-
key: ${{ runner.os }}-swift60-spm-${{ hashFiles('Package.swift') }}
77-
restore-keys: ${{ runner.os }}-swift60-spm-
92+
key: linux-swift62-compat-spm-${{ hashFiles('Package.swift', 'Package@*.swift') }}
93+
restore-keys: linux-swift62-compat-spm-
7894

7995
# Note: swift test builds automatically
80-
- name: Test (Swift 6.0)
96+
- name: Test (Swift 6.2)
8197
run: swift test -c release

.github/workflows/swift-format.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ on:
55
branches:
66
- main
77

8-
concurrency:
9-
group: format-${{ github.ref }}
10-
cancel-in-progress: true
11-
128
jobs:
139
swift_format:
1410
name: swift-format
1511
runs-on: ubuntu-latest
16-
container: swift:6.0
12+
container: swift:6.2
1713
permissions:
1814
contents: write
1915
steps:
@@ -29,15 +25,15 @@ jobs:
2925
- name: Install swift-format
3026
if: steps.cache-swift-format.outputs.cache-hit != 'true'
3127
run: |
32-
git clone --depth 1 --branch main https://github.com/apple/swift-format.git
28+
git clone --depth 1 --branch $(git ls-remote --tags https://github.com/apple/swift-format.git | grep -o 'refs/tags/[0-9]*\.[0-9]*\.[0-9]*$' | sort -V | tail -1 | sed 's/refs\/tags\///') https://github.com/apple/swift-format.git
3329
cd swift-format
3430
swift build -c release
3531
cp .build/release/swift-format /usr/local/bin/
3632
cd ..
3733
rm -rf swift-format
3834
3935
- name: Format
40-
run: swift-format format --ignore-unparsable-files --recursive --in-place Sources Tests
36+
run: swift-format format --recursive --in-place --ignore-unparsable-files Sources Tests
4137

4238
- uses: stefanzweifel/git-auto-commit-action@v7
4339
with:

.github/workflows/swiftlint.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ on:
88
branches:
99
- main
1010

11-
concurrency:
12-
group: swiftlint-${{ github.ref }}
13-
cancel-in-progress: true
14-
1511
jobs:
1612
lint:
1713
name: SwiftLint

0 commit comments

Comments
 (0)