Repository navigation
48 lines (45 loc) · 1.56 KB
/
Copy pathci.yml
File metadata and controls
48 lines (45 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: ci
on:
push:
pull_request:
jobs:
website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Check project website and demo paths
run: |
node --check website/assets/app.js
node website/check.mjs
checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
transformers: ["4.57.1", "5.13.0"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install (CPU torch)
run: |
python -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
.venv/bin/python -m pip install ".[dev]" "transformers==${{ matrix.transformers }}"
.venv/bin/python -m pip check
.venv/bin/python -c 'import rclc, sys; from pathlib import Path; assert Path(rclc.__file__).is_relative_to(Path(sys.prefix))'
scripts/install-hooks.sh
- name: Harness
run: .venv/bin/python scripts/check.py
- name: Build and check distributions
run: |
python -m venv /tmp/rclc-build
/tmp/rclc-build/bin/python -m pip install build twine
/tmp/rclc-build/bin/python -m build --outdir /tmp/rclc-dist
/tmp/rclc-build/bin/python -m twine check --strict /tmp/rclc-dist/*