-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (96 loc) · 3.01 KB
/
Copy pathswift.yml
File metadata and controls
113 lines (96 loc) · 3.01 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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
spm:
name: SwiftPM (macOS)
runs-on: macos-15
timeout-minutes: 20
env:
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
steps:
- uses: actions/checkout@v6
- name: Show toolchain
run: |
swift --version
xcodebuild -version
- name: Cache SwiftPM build
uses: actions/cache@v5
with:
path: |
.build
~/Library/Caches/org.swift.swiftpm
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved', 'Package.swift') }}
restore-keys: ${{ runner.os }}-spm-
- name: Resolve dependencies
run: swift package resolve
- name: Build (warnings as errors)
run: swift build -v -Xswiftc -warnings-as-errors
- name: Test
run: swift test -v --parallel
ios-build:
name: Build for iOS Simulator
runs-on: macos-15
timeout-minutes: 25
env:
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
steps:
- uses: actions/checkout@v6
- name: Show toolchain
run: xcodebuild -version
- name: Build CodingPlanAuth for iOS Simulator
run: |
set -o pipefail
xcodebuild \
-scheme CodingPlanAuth \
-destination 'generic/platform=iOS Simulator' \
-skipPackagePluginValidation \
-derivedDataPath .derivedData \
build
- name: Build CodingPlanCodex for iOS Simulator
if: success() || failure()
run: |
set -o pipefail
xcodebuild \
-scheme CodingPlanCodex \
-destination 'generic/platform=iOS Simulator' \
-skipPackagePluginValidation \
-derivedDataPath .derivedData \
build
docc:
name: Build DocC archives
runs-on: macos-15
timeout-minutes: 20
env:
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
steps:
- uses: actions/checkout@v6
- name: Cache SwiftPM build
uses: actions/cache@v5
with:
path: |
.build
~/Library/Caches/org.swift.swiftpm
key: ${{ runner.os }}-docc-${{ hashFiles('Package.resolved', 'Package.swift') }}
restore-keys: ${{ runner.os }}-docc-
- name: Generate CodingPlanAuth docs
run: |
swift package --allow-writing-to-directory ./docs generate-documentation \
--target CodingPlanAuth \
--output-path ./docs/CodingPlanAuth \
--disable-indexing
continue-on-error: true
- name: Generate CodingPlanCodex docs
run: |
swift package --allow-writing-to-directory ./docs generate-documentation \
--target CodingPlanCodex \
--output-path ./docs/CodingPlanCodex \
--disable-indexing
continue-on-error: true