-
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (104 loc) · 3.75 KB
/
ci.yml
File metadata and controls
130 lines (104 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
PRIVATE_REPO_TOKEN: ${{ secrets.PRIVATE_REPO_TOKEN }}
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# Primary development workflow: Latest Swift on macOS with debug build
macos-latest:
name: macOS (Swift 6.2, debug)
runs-on: macos-26
steps:
- uses: actions/checkout@v5
- name: Configure private repo access
run: git config --global url."https://${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Select Xcode 26.0
run: sudo xcode-select -s /Applications/Xcode_26.0.app
- name: Print Swift version
run: swift --version
- name: Cache Swift packages
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }}
restore-keys: |
${{ runner.os }}-spm-
# Note: swift test builds automatically, no separate build step needed
- name: Test
run: swift test -c debug
- name: Validate Package.swift
run: swift package dump-package
- name: Run README verification tests
run: swift test --filter ReadmeVerificationTests
- name: Check for API breaking changes
run: |
swift package diagnose-api-breaking-changes \
--breakage-allowlist-path .swift-api-breakage-allowlist || true
continue-on-error: true
# Production validation: Latest Swift on Linux with release build
linux-latest:
name: Ubuntu (Swift 6.2, release)
runs-on: ubuntu-latest
container: swift:6.2
steps:
- uses: actions/checkout@v5
- name: Configure private repo access
run: git config --global url."https://${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Cache Swift packages
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }}
restore-keys: ${{ runner.os }}-spm-
# Note: swift test builds automatically in release mode
- name: Test (release)
run: swift test -c release
# Compatibility check: Minimum supported Swift version (6.2)
linux-compat:
name: Ubuntu (Swift 6.2, compatibility)
runs-on: ubuntu-latest
container: swift:6.2
steps:
- uses: actions/checkout@v5
- name: Configure private repo access
run: git config --global url."https://${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Cache Swift packages
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-swift62-compat-spm-${{ hashFiles('Package.swift') }}
restore-keys: ${{ runner.os }}-swift62-compat-spm-
# Note: swift test builds automatically
- name: Test (Swift 6.2)
run: swift test -c release
# Windows validation
windows-latest:
name: Windows (Swift 6.2)
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Configure private repo access
run: git config --global url."https://${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Swift
uses: SwiftyLab/setup-swift@latest
with:
swift-version: "6.2"
- name: Print Swift version
run: swift --version
- name: Cache Swift packages
uses: actions/cache@v5
with:
path: .build
key: windows-swift62-spm-v3-${{ hashFiles('Package.swift', 'Package@*.swift') }}
restore-keys: windows-swift62-spm-
- name: Build
run: swift build -c release -Xswiftc -gnone