Skip to content

Commit 26156af

Browse files
committed
perf(ci): optimize build pipeline and fix release mode crash
- Remove redundant 'swift build' step (swift test builds everything anyway) - Switch from release to debug mode (fixes inline snapshot crash in release) - Fix Linux cache key to use Package.swift instead of Package.resolved - Reduce timeout from 20m to 15m (faster debug builds) Expected CI time reduction: 20+ minutes → 10-12 minutes (~50% faster) Fixes segfault: 'Bad pointer dereference' in swift_isUniquelyReferenced_nonNull_native during inline snapshot testing in release mode.
1 parent 8aef4f1 commit 26156af

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,9 @@ jobs:
4545
${{ runner.os }}-xcode-${{ matrix.xcode }}-spm-
4646
${{ runner.os }}-spm-
4747
48-
- name: Build (Release)
49-
run: swift build -c release
50-
timeout-minutes: 20
51-
52-
- name: Run tests (Release)
53-
run: swift test -c release --parallel
54-
timeout-minutes: 20
48+
- name: Build and test
49+
run: swift test --parallel
50+
timeout-minutes: 15
5551

5652
linux:
5753
name: Linux (Swift ${{ matrix.swift }})
@@ -75,18 +71,14 @@ jobs:
7571
uses: actions/cache@v4
7672
with:
7773
path: .build
78-
key: linux-swift-${{ matrix.swift }}-spm-${{ hashFiles('Package.resolved') }}
74+
key: linux-swift-${{ matrix.swift }}-spm-${{ hashFiles('Package.swift') }}
7975
restore-keys: |
8076
linux-swift-${{ matrix.swift }}-spm-
8177
linux-spm-
8278
83-
- name: Build (Release)
84-
run: swift build -c release
85-
timeout-minutes: 20
86-
87-
- name: Run tests (Release)
88-
run: swift test -c release --parallel
89-
timeout-minutes: 20
79+
- name: Build and test
80+
run: swift test --parallel
81+
timeout-minutes: 15
9082

9183
documentation:
9284
name: Documentation

0 commit comments

Comments
 (0)