Skip to content

Commit 65b8a9a

Browse files
authored
Fix SliderStepperView for Invalid Bounds (#16)
1 parent aee29dc commit 65b8a9a

File tree

68 files changed

+187
-173
lines changed

Some content is hidden

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

68 files changed

+187
-173
lines changed

.github/workflows/RadiantKit.yml

Lines changed: 82 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ on:
33
push:
44
branches-ignore:
55
- '*WIP'
6-
env:
7-
PACKAGE_NAME: RadiantKit
6+
87
jobs:
98
build-ubuntu:
109
name: Build on Ubuntu
@@ -13,7 +12,7 @@ jobs:
1312
if: "!contains(github.event.head_commit.message, 'ci skip')"
1413
runs-on: ubuntu-latest
1514
container:
16-
image: swift:6.0.1-noble
15+
image: swift:6.0
1716
steps:
1817
- uses: actions/checkout@v4
1918
- name: Cache swift package modules
@@ -40,102 +39,108 @@ jobs:
4039
flags: swift-${{ matrix.swift-version }},ubuntu
4140
verbose: true
4241
token: ${{ secrets.CODECOV_TOKEN }}
43-
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
42+
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
4443
build-macos:
4544
name: Build on macOS
46-
runs-on: ${{ matrix.os }}
45+
env:
46+
PACKAGE_NAME: RadiantKit
47+
runs-on: ${{ matrix.runs-on }}
4748
if: "!contains(github.event.head_commit.message, 'ci skip')"
4849
strategy:
50+
fail-fast: false
4951
matrix:
5052
include:
51-
- xcode: "/Applications/Xcode_16.1.app"
52-
os: macos-14
53-
iOSVersion: "18.1"
54-
watchOSVersion: "11.0"
55-
watchName: "Apple Watch Series 9 (41mm)"
56-
iPhoneName: "iPhone 15"
53+
# SPM Build Matrix
54+
- runs-on: macos-15
55+
xcode: "/Applications/Xcode_16.1.app"
56+
- runs-on: macos-15
57+
xcode: "/Applications/Xcode_16.2.app"
58+
59+
# iOS Build Matrix
60+
- type: ios
61+
runs-on: macos-15
62+
xcode: "/Applications/Xcode_16.1.app"
63+
deviceName: "iPhone 16"
64+
osVersion: "18.1"
65+
- type: ios
66+
runs-on: macos-15
67+
xcode: "/Applications/Xcode_16.2.app"
68+
deviceName: "iPhone 16 Pro"
69+
osVersion: "18.2"
70+
71+
# watchOS Build Matrix
72+
- type: watchos
73+
runs-on: macos-15
74+
xcode: "/Applications/Xcode_16.1.app"
75+
deviceName: "Apple Watch Ultra 2 (49mm)"
76+
osVersion: "11.1"
77+
- type: watchos
78+
runs-on: macos-15
79+
xcode: "/Applications/Xcode_16.2.app"
80+
deviceName: "Apple Watch Ultra 2 (49mm)"
81+
osVersion: "11.2"
82+
83+
- type: visionos
84+
runs-on: macos-15
85+
xcode: "/Applications/Xcode_16.2.app"
86+
deviceName: "Apple Vision Pro"
87+
osVersion: "2.1"
88+
5789
steps:
5890
- uses: actions/checkout@v4
91+
92+
- name: Set Xcode Name
93+
run: echo "XCODE_NAME=$(basename -- ${{ matrix.xcode }} | sed 's/\.[^.]*$//' | cut -d'_' -f2)" >> $GITHUB_ENV
94+
95+
- name: Setup Xcode
96+
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer
97+
98+
# SPM Cache Step
5999
- name: Cache swift package modules
60100
id: cache-spm-macos
61101
uses: actions/cache@v4
62102
env:
63103
cache-name: cache-spm
64104
with:
65105
path: .build
66-
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ matrix.xcode }}-${{ hashFiles('Package.resolved') }}
67-
restore-keys: |
68-
${{ matrix.os }}-build-${{ env.cache-name }}-${{ matrix.xcode }}-
69-
- name: Cache mint
70-
if: startsWith(matrix.xcode,'/Applications/Xcode_16.1')
71-
id: cache-mint
72-
uses: actions/cache@v4
73-
env:
74-
cache-name: cache-mint
75-
with:
76-
path: .mint
77-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Mintfile') }}
106+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Package.resolved') }}
78107
restore-keys: |
79108
${{ runner.os }}-build-${{ env.cache-name }}-
80109
${{ runner.os }}-build-
81110
${{ runner.os }}-
82-
- name: Set Xcode Name
83-
run: echo "XCODE_NAME=$(basename -- ${{ matrix.xcode }} | sed 's/\.[^.]*$//' | cut -d'_' -f2)" >> $GITHUB_ENV
84-
- name: Setup Xcode
85-
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer || (sudo ls -1 /Applications | grep "Xcode")
111+
112+
- name: Build SPM
113+
if: "!matrix.type"
114+
run: swift build
115+
116+
- name: Run Swift Package tests
117+
if: "!matrix.type"
118+
run: swift test -v --enable-code-coverage
119+
86120
- name: Enable Swift Testing
87121
run: |
88122
mkdir -p ~/Library/org.swift.swiftpm/security/
89-
cp macros.json ~/Library/org.swift.swiftpm/security/
90-
- name: Install mint
91-
if: startsWith(matrix.xcode,'/Applications/Xcode_16.1')
92-
run: |
93-
brew update
94-
brew install mint
95-
- name: Build
96-
run: swift build
97-
- name: Run Swift Package tests
98-
run: swift test --enable-code-coverage
99-
- uses: sersoft-gmbh/swift-coverage-action@v4
100-
id: coverage-files-spm
101-
with:
102-
fail-on-empty-output: true
103-
- name: Upload coverage reports to Codecov
104-
uses: codecov/codecov-action@v4
123+
cp macros.json ~/Library/org.swift.swiftpm/security/
124+
125+
# Common iOS/watchOS Test Steps
126+
- name: Run Device Tests
127+
if: matrix.type
128+
run: >
129+
xcodebuild test
130+
-scheme ${{ env.PACKAGE_NAME }}-Package
131+
-sdk ${{ matrix.type == 'ios' && 'iphonesimulator' || matrix.type == 'watchos' && 'watchsimulator' || 'xrsimulator' }}
132+
-destination 'platform=${{ matrix.type == 'ios' && 'iOS Simulator' || matrix.type == 'watchos' && 'watchOS Simulator' || 'visionOS Simulator' }},name=${{ matrix.deviceName }},OS=${{ matrix.osVersion }}'
133+
-enableCodeCoverage YES
134+
build test
135+
136+
# Common Coverage Steps
137+
- name: Process Coverage
138+
uses: sersoft-gmbh/swift-coverage-action@v4
105139
with:
106-
files: ${{ join(fromJSON(steps.coverage-files-spm.outputs.files), ',') }}
107-
token: ${{ secrets.CODECOV_TOKEN }}
108-
flags: macOS,${{ env.XCODE_NAME }},${{ matrix.runs-on }}
109-
- name: Clean up spm build directory
110-
run: rm -rf .build
111-
- name: Lint
112-
run: ./scripts/lint.sh
113-
if: startsWith(matrix.xcode,'/Applications/Xcode_16.1')
114-
- name: Run iOS target tests
115-
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
116-
- uses: sersoft-gmbh/swift-coverage-action@v4
117-
id: coverage-files-iOS
118-
with:
119-
fail-on-empty-output: true
120-
- name: Upload coverage to Codecov
121-
uses: codecov/codecov-action@v4
122-
with:
123-
fail_ci_if_error: true
124-
verbose: true
125-
token: ${{ secrets.CODECOV_TOKEN }}
126-
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }}
127-
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
128-
- name: Run watchOS target tests
129-
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
130-
- uses: sersoft-gmbh/swift-coverage-action@v4
131-
id: coverage-files-watchOS
132-
with:
133140
fail-on-empty-output: true
134-
- name: Upload coverage to Codecov
135-
uses: codecov/codecov-action@v4
141+
142+
- name: Upload Coverage
143+
uses: codecov/codecov-action@v4
136144
with:
137-
fail_ci_if_error: true
138-
verbose: true
139-
token: ${{ secrets.CODECOV_TOKEN }}
140-
files: ${{ join(fromJSON(steps.coverage-files-watchOS.outputs.files), ',') }}
141-
flags: watchOS,watchOS${{ matrix.watchOSVersion }},macOS,${{ env.XCODE_NAME }}
145+
token: ${{ secrets.CODECOV_TOKEN }}
146+
flags: ${{ matrix.type && format('{0}{1}', matrix.type, matrix.osVersion) || 'spm' }}

Mintfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
apple/swift-format@4b62459
2-
peripheryapp/periphery@2.20.0
1+
apple/swift-format@600.0.0
2+
realm/SwiftLint@0.57.0

Package.resolved

Lines changed: 1 addition & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ let package = Package(
5050
)
5151
],
5252
dependencies: [
53-
.package(url: "https://github.com/swiftlang/swift-testing.git", from: "0.12.0"),
5453
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
5554
],
5655
targets: [
@@ -78,8 +77,7 @@ let package = Package(
7877
.testTarget(
7978
name: "RadiantKitTests",
8079
dependencies: [
81-
"RadiantKit",
82-
.product(name: "Testing", package: "swift-testing")
80+
"RadiantKit"
8381
]
8482
)
8583
]

Scripts/lint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,4 @@ else
4343
fi
4444

4545
$PACKAGE_DIR/scripts/header.sh -d $PACKAGE_DIR/Sources -c "Leo Dion" -o "BrightDigit" -p "RadiantKit"
46-
$MINT_RUN swift-format lint --recursive --parallel $SWIFTFORMAT_OPTIONS $PACKAGE_DIR/Sources
47-
48-
pushd $PACKAGE_DIR
49-
$MINT_RUN periphery scan $PERIPHERY_OPTIONS --disable-update-check
50-
popd
46+
$MINT_RUN swift-format lint --recursive --parallel $SWIFTFORMAT_OPTIONS $PACKAGE_DIR/Sources

Sources/RadiantDocs/Actions/OpenFileURLAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RadiantKit
44
//
55
// Created by Leo Dion.
6-
// Copyright © 2024 BrightDigit.
6+
// Copyright © 2025 BrightDigit.
77
//
88
// Permission is hereby granted, free of charge, to any person
99
// obtaining a copy of this software and associated documentation

Sources/RadiantDocs/Actions/OpenWindowWithAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RadiantKit
44
//
55
// Created by Leo Dion.
6-
// Copyright © 2024 BrightDigit.
6+
// Copyright © 2025 BrightDigit.
77
//
88
// Permission is hereby granted, free of charge, to any person
99
// obtaining a copy of this software and associated documentation

Sources/RadiantDocs/Actions/OpenWindowWithValueAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RadiantKit
44
//
55
// Created by Leo Dion.
6-
// Copyright © 2024 BrightDigit.
6+
// Copyright © 2025 BrightDigit.
77
//
88
// Permission is hereby granted, free of charge, to any person
99
// obtaining a copy of this software and associated documentation

Sources/RadiantDocs/AllowedOpenFileTypesKey.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RadiantKit
44
//
55
// Created by Leo Dion.
6-
// Copyright © 2024 BrightDigit.
6+
// Copyright © 2025 BrightDigit.
77
//
88
// Permission is hereby granted, free of charge, to any person
99
// obtaining a copy of this software and associated documentation

Sources/RadiantDocs/AppKit/NewFilePanel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RadiantKit
44
//
55
// Created by Leo Dion.
6-
// Copyright © 2024 BrightDigit.
6+
// Copyright © 2025 BrightDigit.
77
//
88
// Permission is hereby granted, free of charge, to any person
99
// obtaining a copy of this software and associated documentation

0 commit comments

Comments
 (0)