Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit 468f671

Browse files
committed
fix(ci): invalidate swift cache and ensure test bundle directory exists
1 parent bc14aac commit 468f671

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
uses: actions/cache@v4
4040
with:
4141
path: packages/swift/.build
42-
key: swift-build-v2-${{ runner.os }}-${{ hashFiles('packages/swift/Package.resolved', 'packages/swift/Package.swift', 'packages/swift/Sources/**/*.swift') }}
42+
key: swift-build-v3-${{ runner.os }}-${{ hashFiles('packages/swift/Package.resolved', 'packages/swift/Package.swift', 'packages/swift/Sources/**/*.swift') }}
4343
restore-keys: |
44-
swift-build-v2-${{ runner.os }}-
44+
swift-build-v3-${{ runner.os }}-
4545
4646
- name: Cache Xcode DerivedData
4747
uses: actions/cache@v4
@@ -77,13 +77,14 @@ jobs:
7777
- name: Run Swift unit tests
7878
working-directory: ./packages/swift
7979
run: |
80-
# Build tests with testing enabled
80+
# Build tests with testing enabled (builds everything including library)
8181
swift build -c release -Xswiftc -enable-testing --build-tests
8282
8383
# Copy Metal library to test bundle location
8484
TEST_BUNDLE=".build/arm64-apple-macosx/release/NodeMLXPackageTests.xctest/Contents/MacOS"
8585
METALLIB=".build/arm64-apple-macosx/release/mlx-swift_Cmlx.bundle/Contents/Resources/default.metallib"
8686
if [ -f "$METALLIB" ]; then
87+
mkdir -p "$TEST_BUNDLE"
8788
cp "$METALLIB" "$TEST_BUNDLE/mlx.metallib"
8889
echo "✓ Copied mlx.metallib to test bundle"
8990
else

0 commit comments

Comments
 (0)