Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 23 additions & 33 deletions .github/workflows/VerifyChanges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ on:
branches: ["main"]

env:
XCODE_VERSION: 26.0.1
XCODE_VERSION: 26.3

jobs:
lint:
name: Lint
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Select Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app
- name: Lint
run: |
Scripts/lint
run: Scripts/lint

build-and-test:
name: Build and Test (${{ matrix.platform }})
Expand All @@ -30,22 +29,14 @@ jobs:
fail-fast: false
matrix:
include:
# - platform: iOS
# xcode_destination: "platform=iOS Simulator,name=GitHub_Actions_Simulator"
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.iPhone-16-Pro"
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-0"
- platform: iOS
xcode_destination: "platform=iOS Simulator,name=iPhone 17 Pro"
- platform: macOS
xcode_destination: "platform=macOS,arch=arm64"
# simulator_device_type: ""
# simulator_runtime: ""
# - platform: tvOS
# xcode_destination: "platform=tvOS Simulator,name=GitHub_Actions_Simulator"
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-3rd-generation-4K"
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.tvOS-26-0"
# - platform: watchOS
# xcode_destination: "platform=watchOS Simulator,name=GitHub_Actions_Simulator"
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-10-46mm"
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.watchOS-26-0"
- platform: tvOS
xcode_destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)"
- platform: watchOS
xcode_destination: "platform=watchOS Simulator,name=Apple Watch Series 11 (46mm)"

env:
DEV_BUILDS: DevBuilds/Sources
Expand All @@ -59,36 +50,35 @@ jobs:

steps:
- name: Select Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Checkout DevBuilds
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: DevKitOrganization/DevBuilds
path: DevBuilds

- name: Restore XCTestProducts
if: github.event_name != 'push'
id: cache-xctestproducts-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ env.XCODE_VERSION }}-${{ github.sha }}
key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}

- uses: irgaly/xcode-cache@v1
if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-${{ env.XCODE_VERSION }}-${{ github.sha }}
key: xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}
restore-keys: |
xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-
xcode-cache-deriveddata-
xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-
xcode-cache-deriveddata-${{ env.XCODE_VERSION }}
deriveddata-directory: .build/DerivedData
sourcepackages-directory: .build/DerivedData/SourcePackages
swiftpm-package-resolved-file: Package.resolved
verbose: true

- name: Build for Testing
id: build-for-testing
Expand All @@ -101,8 +91,8 @@ jobs:
run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action test-without-building

- name: Save XCTestProducts
if: failure() && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
if: (cancelled() || failure()) && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
key: ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }}
Expand All @@ -125,7 +115,7 @@ jobs:

- name: Upload Logs and XCResults
if: success() || failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Logs_and_XCResults-${{ matrix.platform }}
path: |
Expand All @@ -135,7 +125,7 @@ jobs:

- name: Upload xccovPretty output
if: github.event_name != 'push'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: xccovPrettyOutput-${{ matrix.platform }}
path: .build/xccovPretty-${{ matrix.platform }}.output
Expand All @@ -151,7 +141,7 @@ jobs:

steps:
- name: Download xccovPretty output
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: xccovPrettyOutput-macOS

Expand Down
5 changes: 5 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
builder:
configs:
- documentation_targets: [DevConfiguration]
swift_version: 6.2
5 changes: 3 additions & 2 deletions .swift-format
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"lineBreakBetweenDeclarationAttributes": false,
"lineLength": 120,
"maximumBlankLines": 2,
"multilineTrailingCommaBehavior": "alwaysUsed",
"multiElementCollectionTrailingCommas": true,
"noAssignmentInExpressions": {
"allowedFunctions": []
Expand Down Expand Up @@ -58,14 +59,14 @@
"ReplaceForEachWithForLoop": true,
"ReturnVoidInsteadOfEmptyTuple": true,
"TypeNamesShouldBeCapitalized": true,
"UseEarlyExits": true,
"UseEarlyExits": false,
"UseExplicitNilCheckInConditions": true,
"UseLetInEveryBoundCaseVariable": true,
"UseShorthandTypeNames": true,
"UseSingleLinePropertyGetter": true,
"UseSynthesizedInitializer": true,
"UseTripleSlashForDocumentationComments": true,
"UseWhereClausesInForLoops": true,
"UseWhereClausesInForLoops": false,
"ValidateDocumentationComments": false
},
"spacesAroundRangeFormationOperators": true,
Expand Down
10 changes: 6 additions & 4 deletions App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,12 @@
REGISTER_APP_GROUPS = YES;
SDKROOT = auto;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,7";
TARGETED_DEVICE_FAMILY = "1,2";
XROS_DEPLOYMENT_TARGET = 26.2;
};
name = Debug;
Expand Down Expand Up @@ -319,11 +320,12 @@
REGISTER_APP_GROUPS = YES;
SDKROOT = auto;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,7";
TARGETED_DEVICE_FAMILY = "1,2";
XROS_DEPLOYMENT_TARGET = 26.2;
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion App/Sources/App/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct ContentView: View {
.sheet(isPresented: $isPresentingConfigEditor) {
ConfigVariableEditor(
reader: viewModel.configVariableReader,
customSectionTitle: "Actions"
customSectionTitle: "Actions",
) {
Button("Do something", role: .destructive) {
print("Did something!")
Expand Down
6 changes: 3 additions & 3 deletions App/Sources/App/ContentViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ final class ContentViewModel {
.metadata(\.isEditable, false)
let stringArrayVariable = ConfigVariable(
key: "string_array",
defaultValue: ["Thom", "Jonny", "Ed", "Colin", "Phil"]
defaultValue: ["Thom", "Jonny", "Ed", "Colin", "Phil"],
).metadata(\.displayName, "String Array Example")

let jsonVariable = ConfigVariable(
key: "complexConfig",
defaultValue: ComplexConfiguration(field1: "a", field2: 1),
content: .json(representation: .string())
content: .json(representation: .string()),
).metadata(\.displayName, "Complex Config")

let intBackedVariable = ConfigVariable(key: "favoriteCardSuit", defaultValue: CardSuit.spades, isSecret: true)
Expand All @@ -56,7 +56,7 @@ final class ContentViewModel {
NamedConfigProvider(inMemoryProvider, displayName: "In-Memory"),
],
eventBus: eventBus,
isEditorEnabled: true
isEditorEnabled: true,
)

configVariableReader.register(boolVariable)
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ repository.

- **Lint**: `Scripts/lint` (uses `swift format lint --recursive --strict`)
- **Format**: `Scripts/format`
- **Setup git hooks**: `Scripts/install-git-hooks` (auto-formats on commit)
- **Setup git hooks**: `Scripts/install-git-hooks` (lints on push)

### GitHub Actions

The repository uses GitHub Actions for CI/CD with the workflow in
`.github/workflows/VerifyChanges.yaml`. The workflow:

- Lints code on PRs using `swift format`
- Builds and tests on macOS only (other platforms disabled due to GitHub Actions stability)
- Builds and tests on iOS, macOS, tvOS, and watchOS
- Generates code coverage reports using xccovPretty
- Requires Xcode 26.0.1 and macOS 26 runners
- Requires Xcode 26.3 and macOS 26 runners


## Architecture Overview
Expand Down
Loading
Loading