Skip to content

Commit e510a4c

Browse files
authored
Release Candidate 3.0.0 (#22)
Release Candidate `3.0.0`
2 parents 22b569a + a120b99 commit e510a4c

File tree

182 files changed

+8577
-959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+8577
-959
lines changed

.github/workflows/ci.yml

Lines changed: 204 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ on:
88
pull_request:
99
paths:
1010
- '.swiftlint.yml'
11-
branches:
12-
- main
13-
- dev
14-
15-
concurrency:
16-
group: ci
17-
cancel-in-progress: true
11+
- ".github/workflows/**"
12+
- "Package.swift"
13+
- "Source/**"
14+
- "Tests/**"
1815

1916
jobs:
2017
SwiftLint:
@@ -27,39 +24,216 @@ jobs:
2724
args: --strict
2825
env:
2926
DIFF_BASE: ${{ github.base_ref }}
30-
Latest:
31-
name: Test Latest (iOS, macOS, tvOS, watchOS)
32-
runs-on: macOS-12
27+
macOS:
28+
name: ${{ matrix.name }}
29+
runs-on: ${{ matrix.runsOn }}
30+
env:
31+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
32+
timeout-minutes: 20
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
- xcode: "Xcode_15.0"
38+
runsOn: macos-13
39+
name: "macOS 13, Xcode 15.0, Swift 5.9.0"
40+
- xcode: "Xcode_14.3.1"
41+
runsOn: macos-13
42+
name: "macOS 13, Xcode 14.3.1, Swift 5.8.0"
43+
- xcode: "Xcode_14.2"
44+
runsOn: macOS-12
45+
name: "macOS 12, Xcode 14.2, Swift 5.7.2"
46+
- xcode: "Xcode_14.1"
47+
runsOn: macOS-12
48+
name: "macOS 12, Xcode 14.1, Swift 5.7.1"
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: ${{ matrix.name }}
52+
run: xcodebuild test -scheme "Flare" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
53+
- name: Upload coverage reports to Codecov
54+
uses: codecov/codecov-action@v3.1.0
55+
with:
56+
token: ${{ secrets.CODECOV_TOKEN }}
57+
xcode: true
58+
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
59+
- uses: actions/upload-artifact@v4
60+
with:
61+
name: ${{ matrix.name }}
62+
path: test_output
63+
64+
iOS:
65+
name: ${{ matrix.name }}
66+
runs-on: ${{ matrix.runsOn }}
67+
env:
68+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
69+
timeout-minutes: 20
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
include:
74+
- destination: "OS=17.0.1,name=iPhone 14 Pro"
75+
name: "iOS 17.0.1"
76+
xcode: "Xcode_15.0"
77+
runsOn: macos-13
78+
- destination: "OS=16.4,name=iPhone 14 Pro"
79+
name: "iOS 16.4"
80+
xcode: "Xcode_14.3.1"
81+
runsOn: macos-13
82+
steps:
83+
- uses: actions/checkout@v3
84+
- name: Install Dependencies
85+
run: make setup_build_tools
86+
- name: Generate project
87+
run: make generate
88+
- name: ${{ matrix.name }}
89+
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
90+
- uses: actions/upload-artifact@v4
91+
with:
92+
name: ${{ matrix.name }}
93+
path: test_output
94+
95+
tvOS:
96+
name: ${{ matrix.name }}
97+
runs-on: ${{ matrix.runsOn }}
98+
env:
99+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
100+
timeout-minutes: 20
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
include:
105+
- destination: "OS=17.0,name=Apple TV"
106+
name: "tvOS 17.0"
107+
xcode: "Xcode_15.0"
108+
runsOn: macos-13
109+
- destination: "OS=16.4,name=Apple TV"
110+
name: "tvOS 16.4"
111+
xcode: "Xcode_14.3.1"
112+
runsOn: macos-13
113+
steps:
114+
- uses: actions/checkout@v3
115+
- name: Install Dependencies
116+
run: make setup_build_tools
117+
- name: Generate project
118+
run: make generate
119+
- name: ${{ matrix.name }}
120+
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
121+
- name: Upload coverage reports to Codecov
122+
uses: codecov/codecov-action@v3.1.0
123+
with:
124+
token: ${{ secrets.CODECOV_TOKEN }}
125+
xcode: true
126+
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
127+
- uses: actions/upload-artifact@v4
128+
with:
129+
name: ${{ matrix.name }}
130+
path: test_output
131+
132+
watchOS:
133+
name: ${{ matrix.name }}
134+
runs-on: ${{ matrix.runsOn }}
33135
env:
34-
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
35-
timeout-minutes: 10
136+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
137+
timeout-minutes: 20
36138
strategy:
37139
fail-fast: false
38140
matrix:
39141
include:
40-
- destination: "OS=16.1,name=iPhone 14 Pro"
41-
name: "iOS"
42-
scheme: "Flare"
43-
sdk: iphonesimulator
44-
- destination: "OS=16.1,name=Apple TV"
45-
name: "tvOS"
46-
scheme: "Flare"
47-
sdk: appletvsimulator
48-
- destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
49-
name: "watchOS"
50-
scheme: "Flare"
51-
sdk: watchsimulator
52-
- destination: "platform=macOS"
53-
name: "macOS"
54-
scheme: "Flare"
55-
sdk: macosx
142+
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)"
143+
name: "watchOS 10.0"
144+
xcode: "Xcode_15.0"
145+
runsOn: macos-13
146+
- destination: "OS=9.4,name=Apple Watch Series 8 (45mm)"
147+
name: "watchOS 9.4"
148+
xcode: "Xcode_14.3.1"
149+
runsOn: macos-13
150+
- destination: "OS=8.5,name=Apple Watch Series 7 (45mm)"
151+
name: "watchOS 8.5"
152+
xcode: "Xcode_14.3.1"
153+
runsOn: macos-13
56154
steps:
57155
- uses: actions/checkout@v3
156+
- name: Install Dependencies
157+
run: make setup_build_tools
158+
- name: Generate project
159+
run: make generate
58160
- name: ${{ matrix.name }}
59-
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult" | xcpretty -r junit
161+
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan UnitTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
60162
- name: Upload coverage reports to Codecov
61163
uses: codecov/codecov-action@v3.1.0
62164
with:
63165
token: ${{ secrets.CODECOV_TOKEN }}
64166
xcode: true
65-
xcode_archive_path: "./${{ matrix.sdk }}.xcresult"
167+
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
168+
- uses: actions/upload-artifact@v4
169+
with:
170+
name: ${{ matrix.name }}
171+
path: test_output
172+
173+
spm:
174+
name: ${{ matrix.name }}
175+
runs-on: ${{ matrix.runsOn }}
176+
env:
177+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
178+
timeout-minutes: 20
179+
strategy:
180+
fail-fast: false
181+
matrix:
182+
include:
183+
- name: "Xcode 15"
184+
xcode: "Xcode_15.0"
185+
runsOn: macos-13
186+
- name: "Xcode 14"
187+
xcode: "Xcode_14.3.1"
188+
runsOn: macos-13
189+
steps:
190+
- uses: actions/checkout@v3
191+
- name: ${{ matrix.name }}
192+
run: swift build -c release --target Flare
193+
194+
merge-test-reports:
195+
needs: [iOS, macOS, watchOS, tvOS]
196+
runs-on: macos-13
197+
steps:
198+
- name: Download artifacts
199+
uses: actions/download-artifact@v4
200+
with:
201+
path: test_output
202+
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
203+
- name: Upload Merged Artifact
204+
uses: actions/upload-artifact@v4
205+
with:
206+
name: MergedResult
207+
path: test_output/final
208+
209+
discover-typos:
210+
name: Discover Typos
211+
runs-on: macOS-12
212+
env:
213+
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
214+
steps:
215+
- uses: actions/checkout@v2
216+
- name: Discover typos
217+
run: |
218+
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
219+
python3 -m pip install --upgrade pip
220+
python3 -m pip install codespell
221+
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
222+
223+
# Beta:
224+
# name: ${{ matrix.name }}
225+
# runs-on: firebreak
226+
# env:
227+
# DEVELOPER_DIR: "/Applications/Xcode_15.0.app/Contents/Developer"
228+
# timeout-minutes: 10
229+
# strategy:
230+
# fail-fast: false
231+
# matrix:
232+
# include:
233+
# - destination: "OS=1.0,name=Apple Vision Pro"
234+
# name: "visionOS 1.0"
235+
# scheme: "Flare"
236+
# steps:
237+
# - uses: actions/checkout@v3
238+
# - name: ${{ matrix.name }}
239+
# run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean || exit 1

.github/workflows/danger.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Danger
2+
3+
on:
4+
pull_request:
5+
types: [synchronize, opened, reopened, labeled, unlabeled, edited]
6+
7+
env:
8+
LC_CTYPE: en_US.UTF-8
9+
LANG: en_US.UTF-8
10+
11+
jobs:
12+
run-danger:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: ruby setup
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: 3.1.4
19+
bundler-cache: true
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- name: Setup gems
23+
run: |
24+
gem install bundler
25+
bundle install --clean --path vendor/bundle
26+
- name: danger
27+
env:
28+
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
29+
run: bundle exec danger --verbose

.github/workflows/publish-pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy DocC
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: macos-12
23+
steps:
24+
- name: Checkout 🛎️
25+
uses: actions/checkout@v3
26+
- name: Build DocC
27+
run: |
28+
swift build;
29+
swift package \
30+
--allow-writing-to-directory ./docs \
31+
generate-documentation \
32+
--target Flare \
33+
--output-path ./docs \
34+
--transform-for-static-hosting \
35+
--hosting-base-path flare;
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v1
38+
with:
39+
path: 'docs'
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ fastlane/test_output
8888
# https://github.com/johnno1962/injectionforxcode
8989

9090
iOSInjectionProject/
91+
*.xcodeproj

.swiftformat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
--enable redundantSelf
3737
--enable redundantVoidReturnType
3838
--enable semicolons
39-
--enable sortedImports
40-
--enable sortedSwitchCases
39+
--enable sortImports
40+
--enable sortSwitchCases
4141
--enable spaceAroundBraces
4242
--enable spaceAroundBrackets
4343
--enable spaceAroundComments

.swiftlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
excluded:
22
- Tests
33
- Package.swift
4+
- Package@swift-5.7.swift
5+
- Package@swift-5.8.swift
6+
- Sources/Flare/Classes/Generated/Strings.swift
47
- .build
58

69
# Rules
@@ -9,6 +12,7 @@ disabled_rules:
912
- trailing_comma
1013
- todo
1114
- opening_brace
15+
- unneeded_synthesized_initializer
1216

1317
opt_in_rules: # some rules are only opt-in
1418
- anyobject_protocol

0 commit comments

Comments
 (0)