Skip to content

Commit 51cf82b

Browse files
leogdionclaude
andcommitted
Fix CI workflow issues from PR review
- Fix Windows matrix to use proper cross-product (runs-on × swift) instead of mismatched include entries - Fix lint/docs if conditions to guard against null head_commit on PR events - Fix cache cleanup to skip tag deletions (only process branch deletes) - Add cancellation guard to build-macos-full - Remove hardcoded swift:6.3-noble container for WASM builds; use matrix version - Add paths-ignore to CodeQL to skip doc-only commits Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9f5276f commit 51cf82b

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

.github/workflows/SyntaxKit.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
name: Build on Ubuntu
5454
needs: [configure]
5555
runs-on: ubuntu-latest
56-
container: ${{ (matrix.type == 'wasm' || matrix.type == 'wasm-embedded') && 'swift:6.3-noble' || matrix.swift.nightly && format('swiftlang/swift:nightly-{0}-{1}', matrix.swift.version, matrix.os) || format('swift:{0}-{1}', matrix.swift.version, matrix.os) }}
56+
container: ${{ matrix.swift.nightly && format('swiftlang/swift:nightly-{0}-{1}', matrix.swift.version, matrix.os) || format('swift:{0}-{1}', matrix.swift.version, matrix.os) }}
5757
strategy:
5858
matrix:
5959
os: ${{ fromJSON(needs.configure.outputs.ubuntu-os) }}
@@ -95,26 +95,26 @@ jobs:
9595
fail-fast: false
9696
matrix:
9797
runs-on: [windows-2022, windows-2025]
98-
include:
99-
- swift-version: swift-6.3-release
100-
swift-build: 6.3-RELEASE
101-
- swift-version: swift-6.2-release
102-
swift-build: 6.2-RELEASE
103-
- swift-version: swift-6.1-release
104-
swift-build: 6.1-RELEASE
98+
swift:
99+
- version: swift-6.3-release
100+
build: 6.3-RELEASE
101+
- version: swift-6.2-release
102+
build: 6.2-RELEASE
103+
- version: swift-6.1-release
104+
build: 6.1-RELEASE
105105
steps:
106106
- uses: actions/checkout@v6
107107
- uses: brightdigit/swift-build@v1.5.2
108108
id: build
109109
with:
110-
windows-swift-version: ${{ matrix.swift-version }}
111-
windows-swift-build: ${{ matrix.swift-build }}
110+
windows-swift-version: ${{ matrix.swift.version }}
111+
windows-swift-build: ${{ matrix.swift.build }}
112112
- name: Upload coverage to Codecov
113113
if: steps.build.outputs.contains-code-coverage == 'true'
114114
uses: codecov/codecov-action@v6
115115
with:
116116
fail_ci_if_error: true
117-
flags: swift-${{ matrix.swift-version }},windows
117+
flags: swift-${{ matrix.swift.version }},windows
118118
verbose: true
119119
token: ${{ secrets.CODECOV_TOKEN }}
120120
os: windows
@@ -164,7 +164,7 @@ jobs:
164164
build-macos-full:
165165
name: Build on macOS (Full)
166166
needs: [configure]
167-
if: needs.configure.outputs.full-matrix == 'true'
167+
if: ${{ !cancelled() && needs.configure.result == 'success' && needs.configure.outputs.full-matrix == 'true' }}
168168
env:
169169
PACKAGE_NAME: SyntaxKit
170170
runs-on: ${{ matrix.runs-on }}
@@ -287,7 +287,7 @@ jobs:
287287

288288
lint:
289289
name: Linting
290-
if: ${{ !cancelled() && !failure() && !contains(github.event.head_commit.message, 'ci skip') }}
290+
if: ${{ !cancelled() && !failure() && (github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'ci skip')) }}
291291
runs-on: ubuntu-latest
292292
needs: [build-ubuntu, build-macos, build-windows, build-macos-full, build-android]
293293
env:
@@ -318,7 +318,7 @@ jobs:
318318

319319
docs:
320320
name: Documentation Validation
321-
if: ${{ !cancelled() && !failure() && !contains(github.event.head_commit.message, 'ci skip') }}
321+
if: ${{ !cancelled() && !failure() && (github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'ci skip')) }}
322322
needs: [build-ubuntu, build-macos, build-windows, build-macos-full, build-android]
323323
runs-on: ubuntu-latest
324324
steps:

.github/workflows/cleanup-caches.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
uses: actions/github-script@v8
1515
with:
1616
script: |
17+
if (context.payload.ref_type !== 'branch') {
18+
console.log('Not a branch deletion, skipping.');
19+
return;
20+
}
21+
1722
const ref = `refs/heads/${context.payload.ref}`;
1823
console.log(`Cleaning up caches for branch: ${ref}`);
1924

.github/workflows/codeql.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ on:
1515
push:
1616
branches-ignore:
1717
- '*WIP'
18+
paths-ignore:
19+
- '**.md'
20+
- 'Docs/**'
21+
- 'LICENSE'
22+
- '.github/ISSUE_TEMPLATE/**'
1823
pull_request:
1924
# The branches below must be a subset of the branches above
2025
branches: [ "main" ]
26+
paths-ignore:
27+
- '**.md'
28+
- 'Docs/**'
29+
- 'LICENSE'
30+
- '.github/ISSUE_TEMPLATE/**'
2131
schedule:
2232
- cron: '20 11 * * 3'
2333

0 commit comments

Comments
 (0)