ci: fix fatal regex overlap breaking mlx-swift-lm dependencies in int… #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SwiftLM Integration Tests | |
| on: [pull_request, push] | |
| jobs: | |
| integration-test: | |
| name: Build & Test SwiftLM | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout mlx-swift (this repository) | |
| uses: actions/checkout@v4 | |
| with: | |
| path: mlx-swift | |
| submodules: recursive | |
| - name: Checkout SwiftLM | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SharpAI/SwiftLM | |
| path: SwiftLM | |
| submodules: recursive | |
| - name: Checkout mlx-swift-lm | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SharpAI/mlx-swift-lm | |
| path: mlx-swift-lm | |
| - name: Redirect Dependencies to Local Form | |
| run: | | |
| # Point SwiftLM to the local checkouts | |
| sed -i '' -E 's|\.package\(url: "https://github.com/SharpAI/mlx-swift\.git".*|\.package(path: "../mlx-swift"),|' SwiftLM/Package.swift | |
| sed -i '' -E 's|\.package\(url: "https://github.com/ml-explore/mlx-swift\.git".*|\.package(path: "../mlx-swift"),|' SwiftLM/Package.swift | |
| sed -i '' -E 's|\.package\(path: "\./mlx-swift-lm".*|\.package(path: "../mlx-swift-lm"),|' SwiftLM/Package.swift | |
| sed -i '' -E 's|\.package\(url: "https://github.com/SharpAI/mlx-swift-lm\.git".*|\.package(path: "../mlx-swift-lm"),|' SwiftLM/Package.swift | |
| # Point mlx-swift-lm to the local checkout of mlx-swift | |
| sed -i '' -E 's|\.package\(url: "https://github.com/SharpAI/mlx-swift\.git".*|\.package(path: "../mlx-swift"),|' mlx-swift-lm/Package.swift | |
| sed -i '' -E 's|\.package\(url: "https://github.com/ml-explore/mlx-swift\.git".*|\.package(path: "../mlx-swift"),|' mlx-swift-lm/Package.swift | |
| - name: Build SwiftLM | |
| run: | | |
| cd SwiftLM | |
| swift build -c release | |
| - name: Run Speculative Decoding Tests | |
| run: | | |
| cd SwiftLM | |
| bash tests/test-speculative-eval.sh |