fix(core): wire text-only Gemma3 GGUF loading #7177
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
| on: | |
| schedule: | |
| - cron: '0 0 * * 1' | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| name: Continuous integration | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| rust: [stable] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| check-metal: | |
| name: Check (metal) | |
| runs-on: macOS-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --workspace --features metal | |
| test: | |
| name: Test Suite | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| rust: [stable] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| env: | |
| TESTS_HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| with: | |
| command: test | |
| args: -p mistralrs-core -p mistralrs-quant -p mistralrs-vision | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: rustup component add rustfmt | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: rustup component add clippy | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: --workspace --tests --examples -- -D warnings | |
| docs: | |
| name: Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: doc | |
| args: --workspace | |
| typos: | |
| name: Typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - name: Typos check with custom config file | |
| uses: crate-ci/typos@master | |
| with: | |
| config: .typos.toml | |
| unicode-safety: | |
| name: Unicode Safety | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Reject bidirectional control characters (Trojan Source) | |
| run: | | |
| python3 - <<'PY' | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| # Bidi and directional controls that can visually reorder source. | |
| forbidden = { | |
| 0x202A, # LRE | |
| 0x202B, # RLE | |
| 0x202D, # LRO | |
| 0x202E, # RLO | |
| 0x202C, # PDF | |
| 0x2066, # LRI | |
| 0x2067, # RLI | |
| 0x2068, # FSI | |
| 0x2069, # PDI | |
| 0x200E, # LRM | |
| 0x200F, # RLM | |
| } | |
| files = subprocess.check_output(["git", "ls-files"], text=True).splitlines() | |
| findings = [] | |
| for file in files: | |
| path = Path(file) | |
| try: | |
| text = path.read_text(encoding="utf-8") | |
| except (UnicodeDecodeError, OSError): | |
| continue | |
| for lineno, line in enumerate(text.splitlines(), 1): | |
| for ch in line: | |
| codepoint = ord(ch) | |
| if codepoint in forbidden: | |
| findings.append((file, lineno, codepoint)) | |
| if findings: | |
| for file, lineno, codepoint in findings: | |
| print(f"{file}:{lineno}: forbidden Unicode U+{codepoint:04X}") | |
| sys.exit(1) | |
| print("No forbidden bidirectional Unicode control characters found.") | |
| PY | |
| msrv: | |
| name: MSRV Check (1.90) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: 1.90.0 | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --workspace | |
| # run `mlc` (`cargo install mlc`) | |
| # markdown-link-check: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: gaurav-nelson/github-action-markdown-link-check@v1 |