Skip to content

Commit 84737d6

Browse files
Update scripts, docs, and workflows to latest and greatest (#37)
- Re-enable non-macOS builds - Update lint rules to be slightly more permissive - Update GitHub Actions workflow to be a little more sophisticated - Clean up scripts - Update docs and guides - Fix various flaky tests on CI by increasing timeouts
1 parent 958583a commit 84737d6

10 files changed

Lines changed: 740 additions & 237 deletions

File tree

.github/workflows/VerifyChanges.yaml

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,19 @@ on:
77
branches: ["main"]
88

99
env:
10-
XCODE_VERSION: 26.0.1
10+
XCODE_VERSION: 26.3
1111

1212
jobs:
1313
lint:
1414
name: Lint
1515
runs-on: macos-26
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919
- name: Select Xcode ${{ env.XCODE_VERSION }}
20-
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
20+
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app
2121
- name: Lint
22-
run: |
23-
Scripts/lint
22+
run: Scripts/lint
2423

2524
build-and-test:
2625
name: Build and Test (${{ matrix.platform }})
@@ -30,22 +29,14 @@ jobs:
3029
fail-fast: false
3130
matrix:
3231
include:
33-
# - platform: iOS
34-
# xcode_destination: "platform=iOS Simulator,name=GitHub_Actions_Simulator"
35-
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.iPhone-16-Pro"
36-
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-0"
32+
- platform: iOS
33+
xcode_destination: "platform=iOS Simulator,name=iPhone 17 Pro"
3734
- platform: macOS
3835
xcode_destination: "platform=macOS,arch=arm64"
39-
# simulator_device_type: ""
40-
# simulator_runtime: ""
41-
# - platform: tvOS
42-
# xcode_destination: "platform=tvOS Simulator,name=GitHub_Actions_Simulator"
43-
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-3rd-generation-4K"
44-
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.tvOS-26-0"
45-
# - platform: watchOS
46-
# xcode_destination: "platform=watchOS Simulator,name=GitHub_Actions_Simulator"
47-
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-10-46mm"
48-
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.watchOS-26-0"
36+
- platform: tvOS
37+
xcode_destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)"
38+
- platform: watchOS
39+
xcode_destination: "platform=watchOS Simulator,name=Apple Watch Series 11 (46mm)"
4940

5041
env:
5142
DEV_BUILDS: DevBuilds/Sources
@@ -58,36 +49,35 @@ jobs:
5849

5950
steps:
6051
- name: Select Xcode ${{ env.XCODE_VERSION }}
61-
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
52+
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app
6253

6354
- name: Checkout
64-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
6556

6657
- name: Checkout DevBuilds
67-
uses: actions/checkout@v4
58+
uses: actions/checkout@v6
6859
with:
6960
repository: DevKitOrganization/DevBuilds
7061
path: DevBuilds
7162

7263
- name: Restore XCTestProducts
7364
if: github.event_name != 'push'
7465
id: cache-xctestproducts-restore
75-
uses: actions/cache/restore@v4
66+
uses: actions/cache/restore@v5
7667
with:
7768
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
78-
key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ env.XCODE_VERSION }}-${{ github.sha }}
69+
key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}
7970

8071
- uses: irgaly/xcode-cache@v1
8172
if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
8273
with:
83-
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-${{ env.XCODE_VERSION }}-${{ github.sha }}
74+
key: xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}
8475
restore-keys: |
85-
xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-
86-
xcode-cache-deriveddata-
76+
xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-
77+
xcode-cache-deriveddata-${{ env.XCODE_VERSION }}
8778
deriveddata-directory: .build/DerivedData
8879
sourcepackages-directory: .build/DerivedData/SourcePackages
8980
swiftpm-package-resolved-file: Package.resolved
90-
verbose: true
9181

9282
- name: Build for Testing
9383
id: build-for-testing
@@ -100,8 +90,8 @@ jobs:
10090
run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action test-without-building
10191

10292
- name: Save XCTestProducts
103-
if: failure() && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
104-
uses: actions/cache/save@v4
93+
if: (cancelled() || failure()) && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
94+
uses: actions/cache/save@v5
10595
with:
10696
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
10797
key: ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }}
@@ -124,7 +114,7 @@ jobs:
124114
125115
- name: Upload Logs and XCResults
126116
if: success() || failure()
127-
uses: actions/upload-artifact@v4
117+
uses: actions/upload-artifact@v7
128118
with:
129119
name: Logs_and_XCResults-${{ matrix.platform }}
130120
path: |
@@ -134,7 +124,7 @@ jobs:
134124

135125
- name: Upload xccovPretty output
136126
if: github.event_name != 'push'
137-
uses: actions/upload-artifact@v4
127+
uses: actions/upload-artifact@v7
138128
with:
139129
name: xccovPrettyOutput-${{ matrix.platform }}
140130
path: .build/xccovPretty-${{ matrix.platform }}.output
@@ -150,7 +140,7 @@ jobs:
150140

151141
steps:
152142
- name: Download xccovPretty output
153-
uses: actions/download-artifact@v4
143+
uses: actions/download-artifact@v8
154144
with:
155145
name: xccovPrettyOutput-macOS
156146

.swift-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@
5959
"ReplaceForEachWithForLoop": true,
6060
"ReturnVoidInsteadOfEmptyTuple": true,
6161
"TypeNamesShouldBeCapitalized": true,
62-
"UseEarlyExits": true,
62+
"UseEarlyExits": false,
6363
"UseExplicitNilCheckInConditions": true,
6464
"UseLetInEveryBoundCaseVariable": true,
6565
"UseShorthandTypeNames": true,
6666
"UseSingleLinePropertyGetter": true,
6767
"UseSynthesizedInitializer": true,
6868
"UseTripleSlashForDocumentationComments": true,
69-
"UseWhereClausesInForLoops": true,
69+
"UseWhereClausesInForLoops": false,
7070
"ValidateDocumentationComments": false
7171
},
7272
"spacesAroundRangeFormationOperators": true,

CLAUDE.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ The repository uses GitHub Actions for CI/CD with the workflow in
2626
`.github/workflows/VerifyChanges.yaml`. The workflow:
2727

2828
- Lints code on PRs using `swift format`
29-
- Builds and tests on macOS only (iOS, tvOS, and watchOS builds disabled due to poor
30-
stability and performance in GitHub Actions)
29+
- Builds and tests on iOS, macOS, tvOS, and watchOS
3130
- Generates code coverage reports using xccovPretty
32-
- Requires Xcode 16.4 and macOS 15 runners
33-
34-
**Note**: For comprehensive cross-platform testing, use `Scripts/test-all-platforms` locally
35-
or the pre-push git hook which runs all platform tests before pushing.
31+
- Uses Xcode 26.3 and macOS 26 runners
3632

3733

3834
## Architecture Overview
@@ -214,6 +210,36 @@ Follow the project's Markdown Style Guide:
214210
- **Terminology**: Use "function" over "method", "type" over "class"
215211

216212

213+
## Code Formatting and Spacing
214+
215+
The project follows strict spacing conventions for readability and consistency:
216+
217+
- **2 blank lines between major sections** including:
218+
- Between the last property declaration and first function declaration
219+
- Between all function/computed property implementations at the same scope level
220+
- Between top-level type declarations (class, struct, enum, protocol, extension)
221+
- Before MARK comments that separate major sections
222+
- **1 blank line** for minor separations:
223+
- Between property declarations and nested type definitions
224+
- Between all function definitions in protocols
225+
- After headers in documentation
226+
- After MARK comments that separate major sections
227+
- **File endings**: All Swift files must end with exactly one blank line
228+
229+
230+
## Documentation Style
231+
232+
When writing Markdown documentation, reference `@Documentation/MarkdownStyleGuide.md` to
233+
ensure consistent formatting, structure, and style across all project documentation. Key
234+
standards:
235+
236+
- **Line Length**: 100 characters maximum
237+
- **Code Blocks**: Use 4-space indentation instead of fenced blocks
238+
- **Lists**: Use `-` for bullets with proper indentation alignment
239+
- **Spacing**: 2 blank lines between major sections, 1 blank line after headers
240+
- **Terminology**: Use "function" over "method", "type" over "class"
241+
242+
217243
## Development Notes
218244

219245
- Follows Swift API Design Guidelines

Documentation/MarkdownStyleGuide.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Markdown Style Guide
22

3-
This document defines the Markdown formatting standards for documentation in the Shopper iOS
4-
codebase.
3+
This document defines the Markdown formatting standards for documentation in this project.
54

65

76
## General Formatting

0 commit comments

Comments
 (0)