Skip to content

Commit bb1de8b

Browse files
RISCfutureclaude
andcommitted
Package updates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b52ef14 commit bb1de8b

6 files changed

Lines changed: 25 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,33 @@ concurrency:
1313
jobs:
1414
tests:
1515
name: Build
16-
runs-on: ${{ matrix.os }}
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
os: [macos-14, macos-latest]
21-
swift: ["6.0"]
16+
runs-on: macos-26
2217
steps:
2318
- uses: actions/checkout@v6
19+
- uses: maxim-lobanov/setup-xcode@v1
20+
with:
21+
xcode-version: "26.3"
2422
- uses: SwiftyLab/setup-swift@latest
2523
with:
26-
swift-version: ${{ matrix.swift }}
24+
swift-version: "6.2"
2725
- name: Build
2826
run: swift build -v
2927
lint:
30-
name: Run Swiftlint
28+
name: Run SwiftLint
3129
runs-on: ubuntu-latest
3230
steps:
3331
- uses: actions/checkout@v6
3432
- uses: norio-nomura/action-swiftlint@3.2.1
3533
swift-format:
3634
name: Run swift-format
3735
runs-on: ubuntu-latest
36+
container:
37+
image: swift:latest
3838
steps:
3939
- uses: actions/checkout@v6
40-
- uses: SwiftyLab/setup-swift@latest
41-
with:
42-
swift-version: "6.0"
43-
- name: Download .swift-format
44-
run: |
45-
curl -o .swift-format https://gist.githubusercontent.com/RISCfuture/e0c21afb7bd80a88d128a42bf40d2ecd/raw/7c4af5558f34e9deefc70701f7f7e289d0934187/.swift-format
46-
- name: Install swift-format
40+
- name: Download .swift-format config
4741
run: |
48-
git clone https://github.com/apple/swift-format.git
49-
cd swift-format
50-
swift build -c release
51-
sudo cp .build/release/swift-format /usr/local/bin/
42+
apt-get update && apt-get install -y wget
43+
wget -O .swift-format https://gist.githubusercontent.com/RISCfuture/e0c21afb7bd80a88d128a42bf40d2ecd/raw/.swift-format
5244
- name: Run swift-format lint
53-
run: swift-format lint -r .
45+
run: swift format lint -r .

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ DerivedData/
77
.netrc
88
.swiftlint
99
.swift-format
10+
11+
12+
# SwiftLint Remote Config Cache
13+
.swiftlint/RemoteConfigCache

Package.resolved

Lines changed: 5 additions & 5 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 6.2
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

Sources/GameGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct GameGenerator: AsyncParsableCommand {
4545
let words = Words()
4646
try await words.load(from: dictionary)
4747

48-
if let output = output { FileManager.default.createFile(atPath: output.path(), contents: nil) }
48+
if let output { FileManager.default.createFile(atPath: output.path(), contents: nil) }
4949
let outputStream =
5050
output == nil ? FileHandle.standardOutput : try FileHandle(forWritingTo: output!)
5151
let signalSource = DispatchSource.makeSignalSource(signal: SIGINT, queue: .main)
@@ -55,7 +55,7 @@ struct GameGenerator: AsyncParsableCommand {
5555
try? outputStream.synchronize()
5656
try? outputStream.write(contentsOf: "]".data(using: .ascii)!)
5757
try? outputStream.close()
58-
GameGenerator.exit()
58+
Self.exit()
5959
}
6060
signalSource.resume()
6161

Sources/lib/GameFinder.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,14 @@ actor GameFinder {
5050
}
5151

5252
private static var tileSizes: [Int: [Int]] {
53-
validWordLengths.reduce([:]) { dict, wordLength in
54-
var dict = dict
53+
validWordLengths.reduce(into: [:]) { dict, wordLength in
5554
dict[wordLength] = Array(repeating: minCharactersPerTile, count: numTilesPerFourtile)
5655
while dict[wordLength]!.reduce(0, +) < wordLength {
5756
guard let index = dict[wordLength]!.firstIndex(where: { $0 < maxCharactersPerTile }) else {
5857
fatalError("Couldn’t generate tileSizes")
5958
}
6059
dict[wordLength]![index] += 1
6160
}
62-
63-
return dict
6461
}
6562
}
6663

0 commit comments

Comments
 (0)