Implement prewarm for MLXLanguageModel #245
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| test-macos: | |
| name: Swift ${{ matrix.swift }} on macOS ${{ matrix.macos }} with Xcode ${{ matrix.xcode }} | |
| runs-on: macos-${{ matrix.macos }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - macos: "15" | |
| swift: "6.1" | |
| xcode: "16.3" | |
| - macos: "26" | |
| swift: "6.2" | |
| xcode: "26.0" | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache Swift Package Manager dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/org.swift.swiftpm | |
| .build | |
| key: ${{ runner.os }}-swift-${{ matrix.swift }}-spm-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-swift-${{ matrix.swift }}-spm- | |
| - name: Lint | |
| run: swift format lint --strict --recursive . | |
| - name: Build | |
| run: swift build --build-tests --traits MLX,Llama,CoreML | |
| - name: Test | |
| run: swift test --skip-build | |
| test-linux: | |
| name: Swift ${{ matrix.swift-version }} on Linux | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| swift-version: | |
| - 6.1.0 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Swift | |
| uses: vapor/swiftly-action@v0.2 | |
| with: | |
| toolchain: ${{ matrix.swift-version }} | |
| - name: Lint | |
| run: swift format lint --strict --recursive . | |
| - name: Build | |
| run: swift build | |
| - name: Test | |
| run: swift test |