Skip to content

Commit 6a9f9f5

Browse files
leogdionclaude
andcommitted
Address PR review feedback and update swift-build to v1.5.3
- Remove unnecessary checkout steps from cleanup workflows - Remove template echo from codeql.yml build step - Add comments to lint/docs jobs explaining !failure() intent - Clarify empty matrix.type in build-macos - Improve Settings.swift comments for Strategy 1b and os(Android) - Update all swift-build references from branch ref to v1.5.3 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 37b6acd commit 6a9f9f5

5 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/SyntaxKit.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
type: wasm-embedded
7575
steps:
7676
- uses: actions/checkout@v6
77-
- uses: brightdigit/swift-build@90-windows-cache-symlinks
77+
- uses: brightdigit/swift-build@v1.5.3
7878
id: build
7979
with:
8080
type: ${{ matrix.type }}
@@ -120,7 +120,7 @@ jobs:
120120
- name: Enable git symlinks
121121
shell: pwsh
122122
run: git config --global core.symlinks true
123-
- uses: brightdigit/swift-build@90-windows-cache-symlinks
123+
- uses: brightdigit/swift-build@v1.5.3
124124
id: build
125125
with:
126126
windows-swift-version: ${{ matrix.swift.version }}
@@ -147,7 +147,7 @@ jobs:
147147
fail-fast: false
148148
matrix:
149149
include:
150-
# SPM Build
150+
# SPM Build — no platform type; matrix.type evaluates to '' by design
151151
- runs-on: macos-26
152152
xcode: "/Applications/Xcode_26.4.app"
153153

@@ -156,7 +156,7 @@ jobs:
156156

157157
- name: Build and Test
158158
id: build
159-
uses: brightdigit/swift-build@90-windows-cache-symlinks
159+
uses: brightdigit/swift-build@v1.5.3
160160
with:
161161
scheme: ${{ env.PACKAGE_NAME }}-Package
162162
type: ${{ matrix.type }}
@@ -239,7 +239,7 @@ jobs:
239239

240240
- name: Build and Test
241241
id: build
242-
uses: brightdigit/swift-build@90-windows-cache-symlinks
242+
uses: brightdigit/swift-build@v1.5.3
243243
with:
244244
scheme: ${{ env.PACKAGE_NAME }}-Package
245245
type: ${{ matrix.type }}
@@ -284,7 +284,7 @@ jobs:
284284
large-packages: true
285285
docker-images: true
286286
swap-storage: true
287-
- uses: brightdigit/swift-build@90-windows-cache-symlinks
287+
- uses: brightdigit/swift-build@v1.5.3
288288
id: build
289289
with:
290290
type: android
@@ -303,6 +303,8 @@ jobs:
303303

304304
lint:
305305
name: Linting
306+
# build-windows, build-macos-full, and build-android are skipped on feature branches;
307+
# !failure() allows this job to proceed past skipped (not failed) dependencies.
306308
if: ${{ !cancelled() && !failure() && (github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'ci skip')) }}
307309
runs-on: ubuntu-latest
308310
needs: [build-ubuntu, build-macos, build-windows, build-macos-full, build-android]
@@ -334,6 +336,7 @@ jobs:
334336

335337
docs:
336338
name: Documentation Validation
339+
# Same rationale as lint: !failure() lets this proceed when platform-specific jobs are skipped.
337340
if: ${{ !cancelled() && !failure() && (github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'ci skip')) }}
338341
needs: [build-ubuntu, build-macos, build-windows, build-macos-full, build-android]
339342
runs-on: ubuntu-latest

.github/workflows/cleanup-caches.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jobs:
99
permissions:
1010
actions: write
1111
steps:
12-
- uses: actions/checkout@v6
1312
- name: Delete branch caches
1413
uses: actions/github-script@v8
1514
with:

.github/workflows/cleanup-pr-caches.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
permissions:
1111
actions: write
1212
steps:
13-
- uses: actions/checkout@v6
1413
- name: Delete PR branch caches
1514
uses: actions/github-script@v8
1615
with:

.github/workflows/codeql.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ jobs:
8282

8383
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
8484
# If this step fails, then you should remove it and run the build manually (see below)
85-
- run: |
86-
echo "Run, Build Application using script"
87-
swift build
85+
- name: Build
86+
run: swift build
8887

8988
- name: Perform CodeQL Analysis
9089
uses: github/codeql-action/analyze@v4

Tests/SyntaxDocTests/Settings.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ internal enum Settings {
1717
return workingDir
1818
}
1919

20-
// Strategy 1b: Documentation.docc copied as last component (Android flat copy via android-copy-files)
20+
// Strategy 1b: Documentation.docc present in working directory.
21+
// The swift-build action's android-copy-files parameter copies Documentation.docc/ as
22+
// a flat sibling of the test binary. Strategy 1a always runs first, so a macOS project
23+
// root containing Sources/ will never reach this check.
2124
if FileManager.default.fileExists(
2225
atPath: workingDir.appendingPathComponent("Documentation.docc").path)
2326
{
@@ -81,7 +84,7 @@ internal enum Settings {
8184
return .init(fileURLWithPath: filePath)
8285
}
8386
} else {
84-
#if os(Android)
87+
#if os(Android) // os(Android) is a valid Swift platform condition since Swift 5.9
8588
let resolvedPath = filePath
8689
#else
8790
let resolvedPath = "Sources/SyntaxKit/" + filePath

0 commit comments

Comments
 (0)