-
Notifications
You must be signed in to change notification settings - Fork 26
67 lines (56 loc) · 2.31 KB
/
Copy pathci.yml
File metadata and controls
67 lines (56 loc) · 2.31 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
maia2/requirements.txt
- name: Install release-validation environment
run: |
python -m pip install --upgrade pip
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch==2.8.0
python -m pip install -r maia2/requirements.txt
python -m pip install -e ".[dev]"
- name: Check installed dependencies
run: python -m pip check
- name: Run tests
run: python -m pytest -q
- name: Run Ruff checks
run: |
python -m ruff check maia2 tests
python -m ruff format --check maia2 tests
- name: Build distributions
if: matrix.python-version == '3.12'
run: |
python -m build
for config in maia2-training.yaml maia2-training-rapid.yaml maia2-training-blitz.yaml; do
unzip -l dist/*.whl | grep -F "maia2/configs/$config"
tar -tzf dist/*.tar.gz | grep -F "maia2/configs/$config"
done
python -m pip install --force-reinstall --no-deps dist/*.whl
python -I -c "import hashlib, pathlib, sysconfig, maia2; package = pathlib.Path(maia2.__file__).resolve().parent; purelib = pathlib.Path(sysconfig.get_paths()['purelib']).resolve(); assert package.is_relative_to(purelib); root = package / 'configs'; assert maia2.__version__ == '0.11.0'; assert {p.name for p in root.glob('*.yaml')} == {'maia2-training.yaml', 'maia2-training-rapid.yaml', 'maia2-training-blitz.yaml'}; assert hashlib.sha256((root / 'maia2-training.yaml').read_bytes()).hexdigest() == '4b06a5e6917dba8a55defaf3947ce97a73edca3ae2c9d225779a620353c1371b'"
python -m pip check